diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2017-08-03 13:07:30 +0200 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2017-08-03 13:08:40 +0200 |
commit | 1243beff209eebadc917700e34542e3d12702120 (patch) | |
tree | 2371c8d2b5c6c0fcdfeb6d02532950ab41d12447 | |
parent | 2ba345b16d869f4aa470d0f123ad619dbc41fd64 (diff) |
Don't check st_nlink value for mkdir
Some filesystems don't track this for directories.
Fixes: #180.
-rw-r--r-- | ChangeLog.rst | 2 | ||||
-rwxr-xr-x | test/test_examples.py | 1 | ||||
-rw-r--r-- | test/test_syscalls.c | 4 |
3 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog.rst b/ChangeLog.rst index c233bcd..c697cbe 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -10,6 +10,8 @@ Unreleased Changes * Fixed a symbol versioning problem that resulted in very strange failures (segfaults, unexpected behavior) in different situations. +* Fixed a test failure when /tmp is on btrfs. + libfuse 3.1.0 (2017-07-08) ========================== diff --git a/test/test_examples.py b/test/test_examples.py index 5234a7d..0a2f3fd 100755 --- a/test/test_examples.py +++ b/test/test_examples.py @@ -266,6 +266,7 @@ def tst_mkdir(mnt_dir): fstat = os.stat(fullname) assert stat.S_ISDIR(fstat.st_mode) assert os.listdir(fullname) == [] + # Some filesystem (e.g. BTRFS) don't track st_nlink for directories assert fstat.st_nlink in (1,2) assert dirname in os.listdir(mnt_dir) diff --git a/test/test_syscalls.c b/test/test_syscalls.c index 281f218..e30cfc1 100644 --- a/test/test_syscalls.c +++ b/test/test_syscalls.c @@ -1329,7 +1329,9 @@ static int test_mkdir(void) if (res == -1) return -1; err += check_mode(testdir, 0755); - err += check_nlink(testdir, 2); + /* Some file systems (like btrfs) don't track link + count for directories */ + //err += check_nlink(testdir, 2); err += check_dir_contents(testdir, dir_contents); res = rmdir(testdir); if (res == -1) { |