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

ls: fix error sub dir output #6521

Merged
merged 2 commits into from
Jul 5, 2024

Conversation

CausingBrick
Copy link
Contributor

Close #6492

  • Fix error output when hyperlink options combines with recursive

@sylvestre
Copy link
Contributor

Fails on windows:


--- TRY 3 STDERR:        coreutils::tests test_ls::test_ls_hyperlink_recursive_dirs ---
thread 'test_ls::test_ls_hyperlink_recursive_dirs' panicked at tests\by-util\test_ls.rs:4583:5:
assertion failed: &lines.next().unwrap().ends_with("/example\u{7}example\u{1b}]8;;\u{7}:")
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\panicking.rs:652
   1: core::panicking::panic_fmt
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\core\src\panicking.rs:72
   2: core::panicking::panic
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\core\src\panicking.rs:146
   3: tests::test_ls::test_ls_hyperlink_recursive_dirs
             at .\tests\by-util\test_ls.rs:4583
   4: tests::test_ls::test_ls_hyperlink_recursive_dirs::closure$0
             at .\tests\by-util\test_ls.rs:4569
   5: core::ops::function::FnOnce::call_once<tests::test_ls::test_ls_hyperlink_recursive_dirs::closure_env$0,tuple$<> >
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081\library\core\src\ops\function.rs:250
   6: core::ops::function::FnOnce::call_once
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\core\src\ops\function.rs:250
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@CausingBrick
Copy link
Contributor Author

Fails on windows:


--- TRY 3 STDERR:        coreutils::tests test_ls::test_ls_hyperlink_recursive_dirs ---
thread 'test_ls::test_ls_hyperlink_recursive_dirs' panicked at tests\by-util\test_ls.rs:4583:5:
assertion failed: &lines.next().unwrap().ends_with("/example\u{7}example\u{1b}]8;;\u{7}:")
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\std\src\panicking.rs:652
   1: core::panicking::panic_fmt
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\core\src\panicking.rs:72
   2: core::panicking::panic
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\core\src\panicking.rs:146
   3: tests::test_ls::test_ls_hyperlink_recursive_dirs
             at .\tests\by-util\test_ls.rs:4583
   4: tests::test_ls::test_ls_hyperlink_recursive_dirs::closure$0
             at .\tests\by-util\test_ls.rs:4569
   5: core::ops::function::FnOnce::call_once<tests::test_ls::test_ls_hyperlink_recursive_dirs::closure_env$0,tuple$<> >
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081\library\core\src\ops\function.rs:250
   6: core::ops::function::FnOnce::call_once
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library\core\src\ops\function.rs:250
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Maybe I should assert whole path is valid , but I don't find any method to get hostname on TestScenario 🧐

@CausingBrick
Copy link
Contributor Author

@sylvestre Hi, could you review this again?

@sylvestre sylvestre force-pushed the fix-ls-recursive-hyperlink branch from b9926ef to 2b14ec4 Compare July 5, 2024 05:37
Copy link

github-actions bot commented Jul 5, 2024

GNU testsuite comparison:

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

@sylvestre sylvestre merged commit 1e80d3e into uutils:main Jul 5, 2024
64 of 68 checks passed
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.

ls: --hyperlink -R omits parent dir when displaying child dir
2 participants