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

Find MountInfo properly when symlink is used #4929

Merged
merged 11 commits into from
Jun 10, 2023
Merged

Conversation

kropacf
Copy link
Contributor

@kropacf kropacf commented Jun 1, 2023

Fixes #4607

According to GNU implementation the entered path is being compared with the canonicalized device name
in MountInfo.

Frantisek Kropac added 3 commits June 1, 2023 19:40
According to GNU implementation the entered path is
being compared with the canonicalized device name
in MountInfo.
Tests with mount_info_from_path are actually filesystem dependent.
@sylvestre sylvestre force-pushed the df-symlink branch 2 times, most recently from fbec846 to 90f59d8 Compare June 4, 2023 07:46
@uutils uutils deleted a comment from github-actions bot Jun 4, 2023
@uutils uutils deleted a comment from github-actions bot Jun 4, 2023
Frantisek Kropac added 3 commits June 4, 2023 18:47
According to GNU implementation the entered path is
being compared with the canonicalized device name
in MountInfo.
Tests with mount_info_from_path are actually filesystem dependent.
@sylvestre
Copy link
Contributor

On windows, it fails with :

---- filesystem::tests::mount_info_from_path::test_dev_name_match stdout ----
thread 'filesystem::tests::mount_info_from_path::test_dev_name_match' panicked at 'called `Option::unwrap()` on a `None` value', src\uu\df\src\filesystem.rs:230:73
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library\std\src\panicking.rs:584
   1: core::panicking::panic_fmt
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library\core\src\panicking.rs:142
   2: core::panicking::panic
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library\core\src\panicking.rs:48
   3: enum$<core::option::Option<ref$<uucore::features::fsext::MountInfo> >, 1, 18446744073709551615, Some>::unwrap<ref$<uucore::features::fsext::MountInfo> >
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52\library\core\src\option.rs:775
   4: uu_df::filesystem::tests::mount_info_from_path::test_dev_name_match
             at .\src\filesystem.rs:230
   5: uu_df::filesystem::tests::mount_info_from_path::test_dev_name_match::closure$0
             at .\src\filesystem.rs:223
   6: core::ops::function::FnOnce::call_once<uu_df::filesystem::tests::mount_info_from_path::test_dev_name_match::closure_env$0,tuple$<> >
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52\library\core\src\ops\function.rs:248
   7: core::ops::function::FnOnce::call_once
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library\core\src\ops\function.rs:248
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@github-actions
Copy link

github-actions bot commented Jun 8, 2023

GNU testsuite comparison:

GNU test failed: tests/ls/sort-width-option. tests/ls/sort-width-option is passing on 'main'. Maybe you have to rebase?

@sylvestre sylvestre merged commit ad96a1b into uutils:main Jun 10, 2023
@sylvestre
Copy link
Contributor

thanks!

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.

df is missing some tabs
2 participants