Skip to content

tail: fix behaviour of tail -n0 in follow mode#9114

Merged
sylvestre merged 3 commits intouutils:mainfrom
AnandajithS:fix_tail
Jan 18, 2026
Merged

tail: fix behaviour of tail -n0 in follow mode#9114
sylvestre merged 3 commits intouutils:mainfrom
AnandajithS:fix_tail

Conversation

@AnandajithS
Copy link
Contributor

Fixed incorrect handling of tail -n0 -f in the bounded execution path.

Also added logic to handle the case where the file size is less than blksize_limit, which causes it to follow the unbounded execution path

Fixes #9102

@sylvestre
Copy link
Contributor

Could you please add a test to make sure we don't regress in the future? Thanks

@github-actions
Copy link

github-actions bot commented Nov 2, 2025

GNU testsuite comparison:

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

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

Copy link
Contributor

@sylvestre sylvestre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the unrelated changes

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 10, 2025

CodSpeed Performance Report

Merging #9114 will not alter performance

Comparing AnandajithS:fix_tail (9ce8ebb) with main (2d718f2)

Summary

✅ 127 untouched
⏩ 6 skipped1

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

@AnandajithS
Copy link
Contributor Author

@sylvestre It should be fixed now

@sylvestre sylvestre merged commit 7654075 into uutils:main Jan 18, 2026
128 checks passed
@sylvestre
Copy link
Contributor

sorry for the latency

mattsu2020 pushed a commit to mattsu2020/coreutils that referenced this pull request Jan 23, 2026
* tail: fix behaviour of -n0 in follow mode

* tests: added test for checking -n0 in follow mode

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
@xtqqczze
Copy link
Contributor

xtqqczze commented Feb 7, 2026

some CI runs for this PR are still queued!

https://github.com/uutils/coreutils/actions/runs/19142997114

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.

tail -n 0 is not respected when -f is used

3 participants