* tail: fix panic on write error in bounded_tail
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* tail: increase test file size to ensure bounded_tail path
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* tests/by-util/test_tail.rs (test_follow_name_multiple): Increase
the delay on macOS to 2000ms to avoid intermittent failures due to
slower follow-name change detection on macOS CI.
Increases the retry delay from 100ms to 400ms and sleep interval from 0.1s to 0.2s in test_retry9 to address flaky test behavior caused by timing sensitivity.
* tail: report PermissionDenied instead of No such file when metadata fails
* #10193 PermissionDenied tests
* style: run cargo fmt.
* Style: run cargo fmt and cargo clippy
* Update tests/by-util/test_tail.rs
Replace make_file with touch
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* Update tests/by-util/test_tail.rs
Simplify tests
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* 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>
* tail: fix --pid with FIFO by using non-blocking open
* Address review comments: propagate fcntl errors and remove Windows stub
---------
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
Co-authored-by: Sylvestre Ledru <sylvestre.ledru@gmail.com>
This comes up a lot for quoted strings in messages: OS strings can be
quoted directly and this prevents information loss.
This commit removes ~60% of the calls to these methods (modulo
tests). Some of the remaining calls are benign, for example because
they convert solely to check for the presence of ASCII
characters. Others are nontrivial to improve.