+
Skip to content

tail: show end of device #8037

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

martinkunkel2
Copy link
Contributor

gnu coreutils will show end of device for block devices. In current implementation this is skipped as a block devices are recognized as untailable.

The change ensures that we first try to output the end of any file and only then tell the observer that the file is not observable.

Copy link

GNU testsuite comparison:

GNU test failed: tests/df/df-output. tests/df/df-output is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/sort/sort-stale-thread-mem. tests/sort/sort-stale-thread-mem is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/tail/tail-sysfs. tests/tail/tail-sysfs is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/tail/end-of-device is no longer failing!

gnu coreutils will show end of device for block devices.
In current implementation this is skipped as a block devices
are recognized as untailable.

The change ensures that we first try to output the end of any
file and only then tell the observer that the file is not
observable.
Copy link

GNU testsuite comparison:

GNU test failed: tests/du/8gb. tests/du/8gb is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/sort/sort-stale-thread-mem. tests/sort/sort-stale-thread-mem is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/tail/end-of-device is no longer failing!
Note: The gnu test tests/du/2g is now being skipped but was previously passing.

Copy link

GNU testsuite comparison:

GNU test failed: tests/sort/sort-stale-thread-mem. tests/sort/sort-stale-thread-mem is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/tail/end-of-device is no longer failing!
Note: The gnu test tests/du/2g is now being skipped but was previously passing.

Copy link

github-actions bot commented Jul 6, 2025

GNU testsuite comparison:

GNU test failed: tests/cp/same-file. tests/cp/same-file is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/sparse. tests/cp/sparse is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/sparse-to-pipe. tests/cp/sparse-to-pipe is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/sort/sort-stale-thread-mem. tests/sort/sort-stale-thread-mem is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/tail/truncate. tests/tail/truncate is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/misc/tee (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)
Congrats! The gnu test tests/tail/end-of-device is no longer failing!

@bvinc
Copy link
Contributor

bvinc commented Jul 9, 2025

Sorry, but you need to rebase again.

I think after this rebase, you will no longer need to change the if statement that chooses between unbounded_tail and bounded_tail.

I am in full support of moving the is_tailable check down to observer.add_path. I came to this same conclusion myself.

And if anyone asks for a unit test: I'm not sure how you would test tailing a block device. This is currently a root-only test in the GNU coreutils. The GNU test finds a mounted block device and tails it, which is generally something that only root can do.

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 compatibility: tail does not output end of device
2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载