generic/294: filter quotes from mknod
PATCH v2 1/1 generic/294: filter quotes from mknod
Since coreutils v8.25, mknod errors omit quotes around filenames, and this breaks generic/294's golden image.
Checked on Ubuntu 16.04.
See coreutils: 08e8fd7 all: avoid quoting file names when possible
https://github.com/coreutils/coreutils/commit/08e8fd7e38f2dae7c69c54eb22d508b6517e66e5
v2: added comment to _filter_mknod.
--- common/filter | 7 +++++++ tests/generic/294 | 2 +- tests/generic/294.out | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-)
common/filter +7 -0
@@ -385,5 +385,12 @@ _filter_od() ' } +# Remove quotes from failed mknod calls. Starting with Coreutils v8.25, +# mknod errors print unquoted filenames +_filter_mknod() +{ + sed -e "s/mknod: '\(.*\)': File exists/mknod: \1: File exists/" +} + # make sure this script returns success /bin/true
tests/generic/294 +1 -1
@@ -55,7 +55,7 @@ THIS_TEST_DIR=$SCRATCH_MNT/$seq.test _create_files() { - mknod $THIS_TEST_DIR/testnode c 1 3 + mknod $THIS_TEST_DIR/testnode c 1 3 2>&1 | _filter_mknod mkdir $THIS_TEST_DIR/testdir touch $THIS_TEST_DIR/testtarget ln -s $THIS_TEST_DIR/testtarget $THIS_TEST_DIR/testlink 2>&1 | _filter_ln
tests/generic/294.out +1 -1
@@ -1,5 +1,5 @@ QA output created by 294 -mknod: 'SCRATCH_MNT/294.test/testnode': File exists +mknod: SCRATCH_MNT/294.test/testnode: File exists mkdir: cannot create directory 'SCRATCH_MNT/294.test/testdir': File exists touch: cannot touch 'SCRATCH_MNT/294.test/testtarget': Read-only file system ln: creating symbolic link 'SCRATCH_MNT/294.test/testlink': File exists
Signature · 1 line
2.5.5
Quoted 9 lines · Omer Zilberberg
Since coreutils v8.25, mknod errors omit quotes around filenames, and this breaks generic/294's golden image.
Checked on Ubuntu 16.04.
See coreutils: 08e8fd7 all: avoid quoting file names when possible
https://github.com/coreutils/coreutils/commit/08e8fd7e38f2dae7c69c54eb22d508b6517e66e5Signed-off-by Omer Zilberberg <[email protected]>
Thanks for all the testing! I've queued it up for next pull request.
Quoted 2 lines
v2: added comment to
_filter_mknod.
This should go under the "---" below so the revision history doesn't go to commit log :)
Thanks,
Eryu
Quoted 54 lines
--- common/filter | 7 +++++++ tests/generic/294 | 2 +- tests/generic/294.out | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-)common/filter +7
-0@@ -385,5 +385,12 @@ _filter_od() ' } +# Remove quotes from failed mknod calls. Starting with Coreutils v8.25, +# mknod errors print unquoted filenames +_filter_mknod() +{ + sed -e "s/mknod: '\(.*\)': File exists/mknod: \1: File exists/" +} + # make sure this script returns success /bin/truetests/generic/294 +1
-1@@ -55,7 +55,7 @@ THIS_TEST_DIR=$SCRATCH_MNT/$seq.test _create_files() { - mknod $THIS_TEST_DIR/testnode c 1 3 + mknod $THIS_TEST_DIR/testnode c 1 3 2>&1 | _filter_mknod mkdir $THIS_TEST_DIR/testdir touch $THIS_TEST_DIR/testtarget ln -s $THIS_TEST_DIR/testtarget $THIS_TEST_DIR/testlink 2>&1 | _filter_lntests/generic/294.out +1
-1@@ -1,5 +1,5 @@ QA output created by 294 -mknod: 'SCRATCH_MNT/294.test/testnode': File exists +mknod: SCRATCH_MNT/294.test/testnode: File exists mkdir: cannot create directory 'SCRATCH_MNT/294.test/testdir': File exists touch: cannot touch 'SCRATCH_MNT/294.test/testtarget': Read-only file system ln: creating symbolic link 'SCRATCH_MNT/294.test/testlink': File existsSignature · 6 lines
2.5.5 -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Omer Zilberberg
Since coreutils v8.25, mknod errors omit quotes around filenames, and this breaks generic/294's golden image.
Checked on Ubuntu 16.04.
See coreutils: 08e8fd7 all: avoid quoting file names when possible
https://github.com/coreutils/coreutils/commit/08e8fd7e38f2dae7c69c54eb22d508b6517e66e5
Quoted 8 lines
Signed-off-by Omer Zilberberg <[email protected]>v2: added comment to
_filter_mknod.--- common/filter | 7 +++++++ tests/generic/294 | 2 +- tests/generic/294.out | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-)
$ git grep -l mknod common/ tests/ common/dmflakey common/populate tests/btrfs/004 tests/generic/062 tests/generic/085 tests/generic/117 tests/generic/157 tests/generic/158 tests/generic/184 tests/generic/294 tests/generic/294.out tests/generic/306 tests/overlay/003 tests/xfs/106 $
Do any of these other tests that call mknod need this filtering?
Cheers,
Dave.
Signature · 2 lines
Dave Chinner [email protected]
Quoted 35 lines · Dave Chinner
Quoted 8 lines · Omer Zilberberg
Since coreutils v8.25, mknod errors omit quotes around filenames, and this breaks generic/294's golden image.
Checked on Ubuntu 16.04.
See coreutils: 08e8fd7 all: avoid quoting file names when possible
https://github.com/coreutils/coreutils/commit/08e8fd7e38f2dae7c69c54eb22d508b6517e66e5Quoted 8 lines
Signed-off-by Omer Zilberberg <[email protected]>v2: added comment to
_filter_mknod.--- common/filter | 7 +++++++ tests/generic/294 | 2 +- tests/generic/294.out | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-)$ git grep -l mknod common/ tests/ common/dmflakey common/populate tests/btrfs/004 tests/generic/062 tests/generic/085 tests/generic/117 tests/generic/157 tests/generic/158 tests/generic/184 tests/generic/294 tests/generic/294.out tests/generic/306 tests/overlay/003 tests/xfs/106 $
Quoted 1 line
Do any of these other tests that call mknod need this filtering?
To the best of my understanding, no.
The coreutils patch affects formatting of mknod error messages, and these all begin with "mknod:". As you can see in your grep above, only generic/294 has "mknod" in its expected output.
All others do not expect mknod failure messages, so do not require filtering.
Quoted 5 lines
Cheers,
Dave.
Thanks