public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] generic/294: fix output for nfs
@ 2017-06-20  9:35 Xiao Yang
  2017-06-21  8:37 ` Eryu Guan
  0 siblings, 1 reply; 2+ messages in thread
From: Xiao Yang @ 2017-06-20  9:35 UTC (permalink / raw)
  To: fstests; +Cc: Xiao Yang

In nfs environment, both mkdir and mknod are optimized and
return EROFS instead of EEXIST when asking to create an
already-existing entity on an RO filesystem.  We add specific
output of nfs to fix it.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 tests/generic/294             | 3 +++
 tests/generic/294.cfg         | 1 +
 tests/generic/294.out         | 5 -----
 tests/generic/294.out.default | 5 +++++
 tests/generic/294.out.nfs     | 5 +++++
 5 files changed, 14 insertions(+), 5 deletions(-)
 create mode 100644 tests/generic/294.cfg
 delete mode 100644 tests/generic/294.out
 create mode 100644 tests/generic/294.out.default
 create mode 100644 tests/generic/294.out.nfs

diff --git a/tests/generic/294 b/tests/generic/294
index fb5d9aa..bc20dad 100755
--- a/tests/generic/294
+++ b/tests/generic/294
@@ -22,6 +22,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
@@ -48,6 +49,8 @@ _supported_fs generic
 _supported_os Linux
 _require_scratch
 
+_link_out_file_named $seqfull.out $FSTYP
+
 rm -f $seqres.full
 _scratch_mkfs > $seqres.full 2>&1 || _fail "Could not mkfs scratch device"
 
diff --git a/tests/generic/294.cfg b/tests/generic/294.cfg
new file mode 100644
index 0000000..d02b0ce
--- /dev/null
+++ b/tests/generic/294.cfg
@@ -0,0 +1 @@
+nfs: nfs
diff --git a/tests/generic/294.out b/tests/generic/294.out
deleted file mode 100644
index 7802472..0000000
--- a/tests/generic/294.out
+++ /dev/null
@@ -1,5 +0,0 @@
-QA output created by 294
-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
diff --git a/tests/generic/294.out.default b/tests/generic/294.out.default
new file mode 100644
index 0000000..7802472
--- /dev/null
+++ b/tests/generic/294.out.default
@@ -0,0 +1,5 @@
+QA output created by 294
+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
diff --git a/tests/generic/294.out.nfs b/tests/generic/294.out.nfs
new file mode 100644
index 0000000..71ebeec
--- /dev/null
+++ b/tests/generic/294.out.nfs
@@ -0,0 +1,5 @@
+QA output created by 294
+mknod: 'SCRATCH_MNT/294.test/testnode': Read-only file system
+mkdir: cannot create directory 'SCRATCH_MNT/294.test/testdir': Read-only file system
+touch: cannot touch 'SCRATCH_MNT/294.test/testtarget': Read-only file system
+ln: creating symbolic link 'SCRATCH_MNT/294.test/testlink': File exists
-- 
1.8.3.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-21  8:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-20  9:35 [PATCH] generic/294: fix output for nfs Xiao Yang
2017-06-21  8:37 ` Eryu Guan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox