1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #7754 from BenWiederhake/dev-du-move-dir-while-traversing

du: already passes GNU test in spirit, adjust test
This commit is contained in:
Sylvestre Ledru 2025-04-14 10:47:11 +02:00 committed by GitHub
commit 771143a724
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 1 deletions

View file

@ -8,3 +8,4 @@ tests_invalid_opt.patch
tests_ls_no_cap.patch tests_ls_no_cap.patch
tests_sort_merge.pl.patch tests_sort_merge.pl.patch
tests_tsort.patch tests_tsort.patch
tests_du_move_dir_while_traversing.patch

View file

@ -0,0 +1,16 @@
Index: gnu/tests/du/move-dir-while-traversing.sh
===================================================================
--- gnu.orig/tests/du/move-dir-while-traversing.sh
+++ gnu/tests/du/move-dir-while-traversing.sh
@@ -91,9 +91,7 @@ retry_delay_ nonempty .1 5 || fail=1
# Before coreutils-8.10, du would abort.
returns_ 1 du -a $t d2 2> err || fail=1
-# check for the new diagnostic
-printf "du: fts_read failed: $t/3/a/b: No such file or directory\n" > exp \
- || fail=1
-compare exp err || fail=1
+# check that it doesn't crash
+grep -Pq "^du: cannot read directory '$t/3/a/b.*': No such file or directory" err || fail=1
Exit $fail

View file

@ -2,7 +2,7 @@ Index: gnu/tests/env/env-S.pl
=================================================================== ===================================================================
--- gnu.orig/tests/env/env-S.pl --- gnu.orig/tests/env/env-S.pl
+++ gnu/tests/env/env-S.pl +++ gnu/tests/env/env-S.pl
@@ -209,27 +209,28 @@ my @Tests = @@ -212,27 +212,28 @@ my @Tests =
{ERR=>"$prog: no terminating quote in -S string\n"}], {ERR=>"$prog: no terminating quote in -S string\n"}],
['err5', q[-S'A=B\\q'], {EXIT=>125}, ['err5', q[-S'A=B\\q'], {EXIT=>125},
{ERR=>"$prog: invalid sequence '\\q' in -S\n"}], {ERR=>"$prog: invalid sequence '\\q' in -S\n"}],