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_tail::test_follow_with_pid fails on freebsd #4306

Closed
sylvestre opened this issue Jan 28, 2023 · 3 comments · Fixed by #4307
Closed

test_tail::test_follow_with_pid fails on freebsd #4306

sylvestre opened this issue Jan 28, 2023 · 3 comments · Fixed by #4307

Comments

@sylvestre
Copy link
Contributor

2023-01-27T21:17:25.3459300Z failures:
2023-01-27T21:17:25.3527170Z 
2023-01-27T21:17:25.3541950Z ---- test_tail::test_follow_with_pid stdout ----
2023-01-27T21:17:25.3555640Z current_directory_resolved: 
2023-01-27T21:17:25.3572230Z run: /Users/runner/work/coreutils/coreutils/target/debug/coreutils tail -f --pid=5483 foobar.txt foobar2.txt
2023-01-27T21:17:25.3589780Z open: /tmp/.tmp7J1aby/foobar_follow_multiple.expected
2023-01-27T21:17:25.3601920Z write(append): /tmp/.tmp7J1aby/foobar2.txt
2023-01-27T21:17:25.3609060Z write(append): /tmp/.tmp7J1aby/foobar.txt
2023-01-27T21:17:25.3612710Z open: /tmp/.tmp7J1aby/foobar_follow_multiple_appended.expected
2023-01-27T21:17:25.3639510Z write(append): /tmp/.tmp7J1aby/foobar.txt
2023-01-27T21:17:25.3647600Z thread 'test_tail::test_follow_with_pid' panicked at 'Expected stdout to be empty, but it's:
2023-01-27T21:17:25.3655790Z should
2023-01-27T21:17:25.3687410Z be
2023-01-27T21:17:25.3689460Z ignored
2023-01-27T21:17:25.3705700Z ', tests/by-util/test_tail.rs:694:10
2023-01-27T21:17:25.3710730Z stack backtrace:
2023-01-27T21:17:25.3713630Z    0: rust_begin_unwind
2023-01-27T21:17:25.3727760Z              at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/panicking.rs:575:5
2023-01-27T21:17:25.3730800Z    1: core::panicking::panic_fmt
2023-01-27T21:17:25.3740340Z              at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/panicking.rs:64:14
2023-01-27T21:17:25.3746820Z    2: tests::common::util::CmdResult::no_stdout
2023-01-27T21:17:25.3749800Z              at ./tests/common/util.rs:430:9
2023-01-27T21:17:25.3750580Z    3: tests::test_tail::test_follow_with_pid
2023-01-27T21:17:25.3754630Z              at ./tests/by-util/test_tail.rs:689:5
2023-01-27T21:17:25.3758620Z    4: tests::test_tail::test_follow_with_pid::{{closure}}
2023-01-27T21:17:25.3764420Z              at ./tests/by-util/test_tail.rs:636:27
2023-01-27T21:17:25.3764750Z    5: core::ops::function::FnOnce::call_once
2023-01-27T21:17:25.3766410Z              at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/ops/function.rs:507:5
2023-01-27T21:17:25.3769420Z    6: core::ops::function::FnOnce::call_once
2023-01-27T21:17:25.3778600Z              at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/ops/function.rs:507:5
2023-01-27T21:17:25.3781080Z note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
2023-01-27T21:17:25.3781880Z 
2023-01-27T21:17:25.3783010Z 
2023-01-27T21:17:25.3790450Z failures:
2023-01-27T21:17:25.3794280Z     test_tail::test_follow_with_pid
2023-01-27T21:17:25.3795100Z 
2023-01-27T21:17:25.3795780Z test result: FAILED. 2363 passed; 1 failed; 38 ignored; 0 measured; 0 filtered out; finished in 164.95s

@Joining7943 rings a bell ? :)

@Joining7943
Copy link
Contributor

rings a bell ? :)

Not really, to be honest :) Why?

However, I think I've seen this error before once, so I guess it's an intermittent failure? I couldn't reproduce this behavior when I ran this test a several times locally with freebsd installed in a virtual box but I'll try to figure it out.

@sylvestre
Copy link
Contributor Author

because I saw your name in the blame and you recently touched a bunch of things :)

No worries if you don't know
We could just ignore this test on freebsd. wdyt ?

@Joining7943
Copy link
Contributor

Joining7943 commented Jan 28, 2023

because I saw your name in the blame and you recently touched a bunch of things :)

I hope for the better but it's right, I changed the test to adjust it to use UChild and added additional assertions. The test structure itself hasn't changed.

No worries if you don't know

yeah I don't know, but since this test only fails on freebsd sometimes, I guess the delay after the kill should be raised. macos and freebsd are really slow in the ci and looking at the code in tail::follow::watch, it's not impossible that the appended content is printed after the 1 secs delay even without the followed process being alive.

We could just ignore this test on freebsd. wdyt ?

Ok. Let's ignore it on freebsd for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants