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: show error for nul names with --files0-from #5772

Merged

Conversation

cakebaker
Copy link
Contributor

This PR shows an "invalid zero-length file name" error when using printf "\0" | du --files0-from=-. The same error is shown if such a name is listed in the file specified with --files0-from=some-file.

It makes the tests nul-1 and nul-2 in https:/coreutils/coreutils/blob/master/tests/du/files0-from.pl pass.

Copy link

github-actions bot commented Jan 2, 2024

GNU testsuite comparison:

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

@sylvestre
Copy link
Contributor

Indeed:


2024-01-02T15:58:06.2321313Z FAIL: tests/du/files0-from
2024-01-02T15:58:06.2321402Z ==========================
2024-01-02T15:58:06.2321406Z 
2024-01-02T15:58:06.2321495Z du 0.0.23
2024-01-02T15:58:06.2321601Z f-extra-arg...
2024-01-02T15:58:06.2321684Z missing...
2024-01-02T15:58:06.2321800Z minus-in-stdin...
2024-01-02T15:58:06.2321881Z empty...
2024-01-02T15:58:06.2321999Z empty-nonreg...
2024-01-02T15:58:06.2322097Z nul-1...
2024-01-02T15:58:06.2322304Z nul-2...
2024-01-02T15:58:06.2322391Z 1...
2024-01-02T15:58:06.2322469Z 1a...
2024-01-02T15:58:06.2322553Z 2...
2024-01-02T15:58:06.2322894Z files0-from.pl: test 2: stdout mismatch, comparing 2.1 (expected) and 2.O (actual)
2024-01-02T15:58:06.2323050Z --- 2.1	2024-01-02 15:47:45.815355703 +0000
2024-01-02T15:58:06.2323208Z +++ 2.O	2024-01-02 15:47:45.819355669 +0000
2024-01-02T15:58:06.2323315Z @@ -1 +1,2 @@
2024-01-02T15:58:06.2323396Z  0	g
2024-01-02T15:58:06.2323474Z +0	g
2024-01-02T15:58:06.2323552Z 2a...
2024-01-02T15:58:06.2323904Z files0-from.pl: test 2a: stdout mismatch, comparing 2a.1 (expected) and 2a.O (actual)
2024-01-02T15:58:06.2324066Z --- 2a.1	2024-01-02 15:47:45.823355637 +0000
2024-01-02T15:58:06.2324226Z +++ 2a.O	2024-01-02 15:47:45.827355604 +0000
2024-01-02T15:58:06.2324327Z @@ -1 +1,2 @@
2024-01-02T15:58:06.2324411Z  0	g
2024-01-02T15:58:06.2324488Z +0	g
2024-01-02T15:58:06.2324591Z zero-len...
2024-01-02T15:58:06.2324772Z FAIL tests/du/files0-from.pl (exit status: 1)

@sylvestre sylvestre merged commit 8df064e into uutils:main Jan 2, 2024
55 of 56 checks passed
@cakebaker cakebaker deleted the du_files0_from_zero_length_file_name branch January 3, 2024 06:00
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.

2 participants