Skip to content

Conversation

@ChrisDryden
Copy link
Collaborator

@ChrisDryden ChrisDryden commented Jan 10, 2026

When looking at the test cases in tail.pl I concerned that I could find equivalent examples in our integration tests that expect different results. It turns out that this is because the behavior of tail actually changed in 9.6 to clamp large integers instead of throwing an error, so some of our code was no longer valid.

Because we already have the helper functions that follow this behavior the change is very simple, changing parse_signed_num to parse_signed_num_max and then changing:

 let Some(num) = num.checked_mul(multiplier) else {
        return Some(Err(ParseError::Overflow));
    };

to

    let num = num.saturating_mul(multiplier);

Then there was an error message that had an extra quote and now all of the tail.pl test cases are passing

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/tail/tail is no longer failing!

@github-actions
Copy link

GNU testsuite comparison:

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

@sylvestre sylvestre merged commit 04c81ce into uutils:main Jan 10, 2026
132 checks passed
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