diff options
author | Jakob Unterwurzacher | 2024-11-11 22:27:42 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2024-11-11 22:33:07 +0100 |
commit | 86891054ef2a5d1b0b59c7c140aae284e7c5bd87 (patch) | |
tree | 7e863db4486656fd18ed5a1144e0669fb085bf58 /tests | |
parent | 12c0f3a0bdd11444b8bf880af7c63ea7850391f2 (diff) |
Report inode number for the root node
Now that https://github.com/hanwen/go-fuse/issues/399 has
landed we can report an inode number for the root node.
Fixes https://github.com/rfjakob/gocryptfs/issues/580
Diffstat (limited to 'tests')
-rw-r--r-- | tests/matrix/matrix_test.go | 10 | ||||
-rw-r--r-- | tests/plaintextnames/plaintextnames_test.go | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/matrix/matrix_test.go b/tests/matrix/matrix_test.go index 0d9c22c..417e126 100644 --- a/tests/matrix/matrix_test.go +++ b/tests/matrix/matrix_test.go @@ -972,3 +972,13 @@ func TestPwd(t *testing.T) { os.Mkdir(dir, 0700) } } + +// TestRootIno checks that inode number of the root dir is set +// https://github.com/hanwen/go-fuse/issues/399 +func TestRootIno(t *testing.T) { + var st syscall.Stat_t + syscall.Stat(test_helpers.DefaultPlainDir, &st) + if st.Ino == 0 { + t.Errorf("inode number of root dir is zero") + } +} diff --git a/tests/plaintextnames/plaintextnames_test.go b/tests/plaintextnames/plaintextnames_test.go index 8892c39..4de0730 100644 --- a/tests/plaintextnames/plaintextnames_test.go +++ b/tests/plaintextnames/plaintextnames_test.go @@ -125,3 +125,13 @@ func TestInoReuseEvil(t *testing.T) { t.Logf("file ino = %d", st.Ino) } } + +// TestRootIno checks that inode number of the root dir is set +// https://github.com/hanwen/go-fuse/issues/399 +func TestRootIno(t *testing.T) { + var st syscall.Stat_t + syscall.Stat(cDir, &st) + if st.Ino == 0 { + t.Errorf("inode number of root dir is zero") + } +} |