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

du: add support of --dereference-args & minor changes #4723

Merged
merged 8 commits into from
Apr 13, 2023

Conversation

sylvestre
Copy link
Contributor

Should make tests/du/deref.sh pass

@sylvestre sylvestre force-pushed the deref branch 4 times, most recently from 553c29c to caa2e67 Compare April 10, 2023 16:21
@github-actions
Copy link

github-actions bot commented Apr 10, 2023

GNU testsuite comparison:

Congrats! The gnu test tests/du/deref is no longer failing!
Congrats! The gnu test tests/du/deref-args is no longer failing!

@sylvestre
Copy link
Contributor Author

I wasn't expecting to fix two at once :)

@sylvestre
Copy link
Contributor Author

i have some other changes pending to improve the readability of this
https://github.com/sylvestre/coreutils/tree/deref2

src/uu/du/src/du.rs Outdated Show resolved Hide resolved
src/uu/du/src/du.rs Outdated Show resolved Hide resolved
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/du/deref is no longer failing!
Congrats! The gnu test tests/du/deref-args is no longer failing!

@cakebaker
Copy link
Contributor

test_du_dereference_args fails here with:

---- test_du::test_du_dereference_args stdout ----
mkdir_all: /tmp/.tmpH7d87s/subdir
symlink: /tmp/.tmpH7d87s/subdir,/tmp/.tmpH7d87s/sublink
run: /home/dho/projects/coreutils/target/debug/coreutils du -D -s sublink
thread 'test_du::test_du_dereference_args' panicked at ''24     sublink
' does not contain '40  sublink
'', tests/by-util/test_du.rs:303:12

@sylvestre
Copy link
Contributor Author

@cakebaker here ? :)

@cakebaker
Copy link
Contributor

Here == on my local machine with (Arch) Linux :)

@sylvestre
Copy link
Contributor Author

@cakebaker I think the test is fixed
@tertsdiepraam i pushed the small refactoring (moving some codes in functions)

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/du/deref is no longer failing!
Congrats! The gnu test tests/du/deref-args is no longer failing!

@cakebaker
Copy link
Contributor

Yes, the test is working now.

};
let secs = matches
.get_one::<String>(options::TIME)
.map(|s| get_time_secs(s, &stat))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultimately this should probably happen outside of the loop. Could be a good-first-issue. So make some intermediate enum for in Options and then match on that instead of the string of the args.

@tertsdiepraam
Copy link
Member

Just one error on windows still, but can be merged once that's fixed

@sylvestre sylvestre force-pushed the deref branch 2 times, most recently from 6088029 to d452ec8 Compare April 13, 2023 11:31
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/du/deref is no longer failing!
Congrats! The gnu test tests/du/deref-args is no longer failing!
Congrats! The gnu test tests/misc/seq-long-double is no longer failing!
GNU test failed: tests/tail-2/inotify-dir-recreate. tests/tail-2/inotify-dir-recreate is passing on 'main'. Maybe you have to rebase?

@sylvestre sylvestre merged commit 63f608d into uutils:main Apr 13, 2023
@sylvestre sylvestre deleted the deref branch April 13, 2023 14:05
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.

3 participants