uutils / coreutils

Cross-platform Rust rewrite of the GNU coreutils
https://uutils.github.io/
MIT License
17.26k stars 1.24k forks source link

ls: fix error sub dir output #6521

Closed CausingBrick closed 4 days ago

CausingBrick commented 1 week ago

Close #6492

sylvestre commented 1 week ago

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 commented 1 week ago

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 commented 4 days ago

@sylvestre Hi, could you review this again?

github-actions[bot] commented 4 days ago

GNU testsuite comparison:

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