libfuse / pyfuse3

Python 3 bindings for libfuse 3 with asynchronous API (Trio compatible)
https://pyfuse3.readthedocs.io/
Other
162 stars 48 forks source link

test: fix integer overflow on 32-bit arches, fixes #47 #65

Closed ThomasWaldmann closed 1 year ago

ThomasWaldmann commented 1 year ago

On 32-bit arches, the secs value used in tst_rounding overflows:

Traceback (most recent call last): File "/tmp/autopkgtest.pj5DKH/build.qGL/src/test/test_examples.py", line 82, in test_tmpfs tst_rounding(mnt_dir) File "/tmp/autopkgtest.pj5DKH/build.qGL/src/test/test_examples.py", line 355, in tst_rounding os.utime(filename, None, ns=(atime_ns, mtime_ns)) OverflowError: timestamp out of range for platform time_t

To fix this, use the secs value from the very similar test_rounding test, since it does not overflow 32-bit integers.

Ported from:

https://github.com/python-llfuse/python-llfuse/commit/0a5be3b023050757db3496da0fb3bbd5f40019a4