Skip to contentSkip to conversation

generic/294: filter quotes from mknod

PATCH Superseded Omer Zilberberg 2 participants 4 messages Jun 26, 2016 – Jun 27, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 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

---
 common/filter         | 5 +++++
 tests/generic/294     | 2 +-
 tests/generic/294.out | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)
common/filter +5 -0
index 244621a..a16ef70 100644
@@ -385,5 +385,10 @@ _filter_od()
 	'
 }
 
+_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
index 3fa6ba2..fb5d9aa 100755
@@ -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
index 1ac1c67..7802472 100644
@@ -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
#1 lore raw
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/08e8fd7e38f2dae7c69c54eb22d508b6517e66e5

It looks good to me. But I took a look at the above coreutils commit and noticed that many other commands are affected as well, like touch, cp, mv etc.

Did you see other failures caused by other commands? If so, I'm thinking about a more generic way to fix it, rather than adding filters to each command. Something like fstests commit 774f4dd77534 ("xfstests:
unify apostrophes in output files").

Quoted 11 lines
---
 common/filter         | 5 +++++
 tests/generic/294     | 2 +-
 tests/generic/294.out | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)
common/filter +0 -0
index 244621a..a16ef70 100644

common/filter _filter_od() · line 387

Quoted 3 lines
common/filter +0 -0
@@ -385,5 +385,10 @@ _filter_od()
 	'
 }
 

Comment on why this filter is needed, like most other filters do, e.g. _filter_fstrim, _filter_ro_mount

Thanks,
Eryu

Quoted 38 lines
common/filter +5 -0
+_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
index 3fa6ba2..fb5d9aa 100755
@@ -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
index 1ac1c67..7802472 100644
@@ -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 · 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
#2 lore raw
Quoted 11 lines · Eryu Guan
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/08e8fd7e38f2dae7c69c54eb22d508b6517e66e5

Quoted 8 lines

It looks good to me. But I took a look at the above coreutils commit and noticed that many other commands are affected as well, like touch, cp, mv etc.

Did you see other failures caused by other commands? If so, I'm thinking about a more generic way to fix it, rather than adding filters to each command. Something like fstests commit 774f4dd77534 ("xfstests:
unify apostrophes in output files").

Surprisingly no, even though I was expecting more failures..
However, I usually run only the 'generic' tests.
I'll try running xfs and btrfs tests on that system, see whether something comes up.

Quoted 7 lines
Quoted 7 lines
---
 common/filter         | 5 +++++
 tests/generic/294     | 2 +-
 tests/generic/294.out | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)
Quoted 11 lines

common/filter _filter_od() · line 387

Quoted 8 lines
common/filter +0 -0
index 244621a..a16ef70 100644
@@ -385,5 +385,10 @@ _filter_od()
 	'
 }
 

Comment on why this filter is needed, like most other filters do, e.g. _filter_fstrim, _filter_ro_mount

Agreed, I will send v2 if nothing else comes up in xfs and btrfs reruns.

Quoted 42 lines

Thanks,
Eryu

Quoted 38 lines
common/filter +5 -0
+_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
index 3fa6ba2..fb5d9aa 100755
@@ -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
index 1ac1c67..7802472 100644
@@ -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 · 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
#3 lore raw
Quoted 16 lines · Omer Zilberberg
Quoted 15 lines · Eryu Guan
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/08e8fd7e38f2dae7c69c54eb22d508b6517e66e5

It looks good to me. But I took a look at the above coreutils commit and noticed that many other commands are affected as well, like touch, cp, mv etc.

Quoted 7 lines
Quoted 4 lines

Did you see other failures caused by other commands? If so, I'm thinking about a more generic way to fix it, rather than adding filters to each command. Something like fstests commit 774f4dd77534 ("xfstests:
unify apostrophes in output files").

Surprisingly no, even though I was expecting more failures..
However, I usually run only the 'generic' tests.
I'll try running xfs and btrfs tests on that system, see whether something comes up.

Could not run all tests on my env, but what I did run did not fail on quotation issues. I've also tried to run failing instances of cp, touch, chown manually. All error messages I saw had quotes in them.

So I think we should keep this specific for mknod for the time being, until this proves to be a bigger issue...

Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
---
 common/filter         | 5 +++++
 tests/generic/294     | 2 +-
 tests/generic/294.out | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)
Quoted 11 lines

common/filter _filter_od() · line 387

Quoted 8 lines
common/filter +0 -0
index 244621a..a16ef70 100644
@@ -385,5 +385,10 @@ _filter_od()
 	'
 }
 

Comment on why this filter is needed, like most other filters do, e.g. _filter_fstrim, _filter_ro_mount

Quoted 1 line

Agreed, I will send v2 if nothing else comes up in xfs and btrfs reruns.

Sending v2 now.

Quoted 3 lines
Quoted 3 lines

Thanks,
Eryu

Thank you

Quoted 39 lines
Quoted 39 lines
Quoted 39 lines
common/filter +5 -0
+_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
index 3fa6ba2..fb5d9aa 100755
@@ -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
index 1ac1c67..7802472 100644
@@ -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 · 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