pyfuse3 icon indicating copy to clipboard operation
pyfuse3 copied to clipboard

test_passthroughfs sometimes fails due to timestamp difference

Open ThomasWaldmann opened this issue 3 years ago • 6 comments

Seen on github actions CI:

Traceback (most recent call last):
  File "/home/runner/work/pyfuse3/pyfuse3/test/test_examples.py", line 124, in test_passthroughfs
    tst_passthrough(src_dir, mnt_dir)
  File "/home/runner/work/pyfuse3/pyfuse3/test/test_examples.py", line 412, in tst_passthrough
    assert_same_stats(src_name, mnt_name)
  File "/home/runner/work/pyfuse3/pyfuse3/test/test_examples.py", line 438, in assert_same_stats
    assert  v1 == v2, 'Attribute {} differs by {} ({} vs {})'.format(
AssertionError: Attribute st_mtime_ns differs by 4000074 (1654852943987067641 vs 1654852943983067567)
assert 1654852943987067641 == 1654852943983067567

ThomasWaldmann avatar Jun 10 '22 09:06 ThomasWaldmann

Still happens 2023-07, just have seen this with github CI.

ThomasWaldmann avatar Sep 28 '22 00:09 ThomasWaldmann

______________________________ test_passthroughfs ______________________________
Traceback (most recent call last):
   File "/home/runner/work/pyfuse3/pyfuse3/test/test_examples.py", line 124, in test_passthroughfs
    tst_passthrough(src_dir, mnt_dir)
  File "/home/runner/work/pyfuse3/pyfuse3/test/test_examples.py", line 414, in tst_passthrough
    assert_same_stats(src_name, mnt_name)
  File "/home/runner/work/pyfuse3/pyfuse3/test/test_examples.py", line 440, in assert_same_stats
    assert  v1 == v2, 'Attribute {} differs by {} ({} vs {})'.format(
AssertionError: Attribute st_mtime_ns differs by 3999985 (1691339543559117222 vs 1691339543555117237)
assert 1691339543559117222 == 1691339543555117237

ThomasWaldmann avatar Aug 06 '23 16:08 ThomasWaldmann

@Nikratio I am wondering: is this just a cosmetic issue due to timestamp granularity of different filesystems? 4ms seems a bit much for that. Or is it a bug? What do you think?

ThomasWaldmann avatar May 07 '24 09:05 ThomasWaldmann

I'm not sure what's going on here. FUSE uses ns-granularity to report the timestamp from the underlying filesystem, so there should be no loss of accuracy.

Nikratio avatar May 07 '24 10:05 Nikratio

To debug this, I'd add a sleep prior to the comparison and see if that makes the difference go up.

Nikratio avatar May 07 '24 10:05 Nikratio