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 main for failure seen in #7378 for Y2038 bug #7399

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Carreau
Copy link

@Carreau Carreau commented Mar 4, 2025

It's unclear to me how the failure seen in #7378
is related to the change in the PR, it just happen that the test need to try touching in 2068.
The 2^32 error in the test makes me strongly think of the year 2038 bug, so I added a test for that.

@Carreau Carreau force-pushed the touch-y2038 branch 3 times, most recently from 71e2c73 to 8efc9ab Compare March 4, 2025 14:39
Copy link

github-actions bot commented Mar 4, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/misc/tee is no longer failing!

Copy link

github-actions bot commented Mar 4, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@Carreau Carreau marked this pull request as ready for review March 4, 2025 19:47
@Carreau
Copy link
Author

Carreau commented Mar 4, 2025

Those three failures seem like actual failures / y2038 bugs ?

Which I'm going to guess ends up in the filetime's unix/linux.rs set_times, or utimes.rs, which both call into libc and go beyond my understanding.

@RenjiSann
Copy link
Collaborator

I don't understand why this change is in a separated PR from #7378

@Carreau
Copy link
Author

Carreau commented Mar 6, 2025

#7378 test (and fix) compatibility with gnu touch, i.e. that

  • -t 68 (or anything lower) is interpreted as years 2000s
  • -t 69 (or anything greater)is interpreted as years 1900s

So really #7378, test the mapping from 2 character years to 4 character years, and could just test parse_timestamp. this mapping is an implementation choice to match gnu touch.

This PR tests that dates just before, at, or just after y2038 bug (even when already a 4 character years) get actually written on filesystem with the correct timestamp (they are not on 32 bits systems). So it tests for a potential bug, independently of whether the year is 2 or 4 characters.

@RenjiSann
Copy link
Collaborator

Ok, that makes sense, thanks !

It's unclear to me how the failure seen in uutils#7378
is related to the change in the PR, it just happen
that the test need to try touching in 2068.
The 2^32 error in the test makes me strongly think
of  the year 2038 bug, so I added a test for that.
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.

2 participants