8000 Recent regression on `test_tail::test_stdin_default stdout` · Issue #3916 · uutils/coreutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Recent regression on test_tail::test_stdin_default stdout #3916

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

Closed
sylvestre opened this issue Sep 9, 2022 · 8 comments
Closed

Recent regression on test_tail::test_stdin_default stdout #3916

sylvestre opened this issue Sep 9, 2022 · 8 comments
Labels

Comments

@sylvestre
Copy link
Contributor

I guess it regressed by #3874

---- test_tail::test_stdin_default stdout ----
current_directory_resolved: 
open: /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/.tmpG4rm0A/foobar.txt
run: /Users/runner/work/coreutils/coreutils/target/debug/coreutils tail
open: /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/.tmpG4rm0A/foobar_stdin_default.expected
---- test_tail::test_stdin_default stderr ----
thread 'main' panicked at 'assertion failed: `(left == right)`

Diff < left / right > :
>dos
>tres
>quattro
>cinco
>seis
>siette
>ocho
>nueve
>diez
>once
>

', tests/common/util.rs:235:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    test_tail::test_stdin_default

cc @Joining7943
Full log:
https://github.com/uutils/coreutils/runs/8270803201?check_suite_focus=true

@Joining7943
Copy link
Contributor

I'll have a look into it

@Joining7943
Copy link
Contributor

Hmm, the other macos ci runs pass the same test. Maybe rerunning the ci tests would give some additional insight.

@sylvestre
Copy link
Contributor Author

Similar issue in https://github.com/uutils/coreutils/runs/8273012666?check_suite_focus=true


---- test_tail::pipe_tests::test_pipe_when_lines_option_given_multibyte_utf8_characters stdout ----
current_directory_resolved: 
run: /Users/runner/work/coreutils/coreutils/target/x86_64-apple-darwin/debug/coreutils tail -n +0
current_directory_resolved: 
run: /Users/runner/work/coreutils/coreutils/target/x86_64-apple-darwin/debug/coreutils tail -n +2
current_directory_resolved: 
run: /Users/runner/work/coreutils/coreutils/target/x86_64-apple-darwin/debug/coreutils tail -n +3
current_directory_resolved: 
run: /Users/runner/work/coreutils/coreutils/target/x86_64-apple-darwin/debug/coreutils tail -n +4
current_directory_resolved: 
run: /Users/runner/work/coreutils/coreutils/target/x86_64-apple-darwin/debug/coreutils tail -n +5
current_directory_resolved: 
run: /Users/runner/work/coreutils/coreutils/target/x86_64-apple-darwin/debug/coreutils tail -n -4
current_directory_resolved: 
run: /Users/runner/work/coreutils/coreutils/target/x86_64-apple-darwin/debug/coreutils tail -n -3
current_directory_resolved: 
run: /Users/runner/work/coreutils/coreutils/target/x86_64-apple-darwin/debug/coreutils tail -n -2
thread 'test_tail::pipe_tests::test_pipe_when_lines_option_given_multibyte_utf8_characters' panicked at 'Command was expected to succeed.
stdout = 
 stderr = thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 9, kind: Uncategorized, message: "Bad file descriptor" }', src/uu/tail/src/tail.rs:1653:60
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
', tests/common/util.rs:176:9

@Joining7943
Copy link
Contributor

I'm pretty sure this error isn't caused by #3874 but I've added a lot of tests for piped input. I've found a reference in the code of tail to the bad file descriptor problem and the checks for bad file descriptors are disabled. I'll try something to deal with the problem.

@Joining7943
Copy link
Contributor

I think #3910 together with #3919 should at least reduce these kinds of errors. I've also added some debug output in case we're running into these random errors again.

@jhscheer
Copy link
Contributor

I'm pretty sure this error isn't caused by #3874

I agree.

I've found a reference in the code of tail to the bad file descriptor problem and the checks for bad file descriptors are disabled.

These checks were ment to detect a broken FD at program start.
They are disabled because currently they're not possible with rust's stdlib, see the linked issue in the comments.

I'll try something to deal with the problem.

We could implement better error handling for the code: 9, kind: Uncategorized, message: "Bad file descriptor" error.
However I cannot reproduce the test_stdin_default issue on a x86_64 MacBook. My guess is, that it's a problem with the macOS CI. I would simply deactivate this test for macOS if it's run inside the CI.

@sylvestre
Copy link
Contributor Author
sylvestre commented Sep 12, 2022 via email

@sylvestre
Copy link
Contributor Author

maybe fixed ;)

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

No branches or pull requests

3 participants
0