Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix integer overflow on 32-bit arches #71

Merged

Conversation

enr0n
Copy link
Contributor

@enr0n enr0n commented Jul 14, 2022

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.

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.
@ThomasWaldmann
Copy link
Collaborator

Thanks for the PR, will merge after tests!

@ThomasWaldmann
Copy link
Collaborator

Can you check if the pyfuse3 code / tests have the same issue?

@ThomasWaldmann ThomasWaldmann merged commit efae82f into python-llfuse:master Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants