linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: david@fromorbit.com, darrick.wong@oracle.com
Cc: linux-ext4@vger.kernel.org, fstests@vger.kernel.org,
	linux-btrfs@vger.kernel.org, xfs@oss.sgi.com
Subject: [PATCH 03/11] generic/15[78]: fix error messages in the golden output
Date: Sat, 19 Dec 2015 01:11:12 -0800	[thread overview]
Message-ID: <20151219091112.15320.45890.stgit@birch.djwong.org> (raw)
In-Reply-To: <20151219091052.15320.94973.stgit@birch.djwong.org>

Fix the error messages in the golden output for generic/15[78], which
examine the responses to invalid inputs as returned by the
clone/clone_range/extent_same ioctls.  Also fix a filtering omission.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/generic/157     |   18 +++++++++++++-----
 tests/generic/157.out |    6 +++---
 tests/generic/158     |   18 +++++++++++++-----
 tests/generic/158.out |    8 ++++----
 4 files changed, 33 insertions(+), 17 deletions(-)


diff --git a/tests/generic/157 b/tests/generic/157
index a43fb0d..f68ff52 100755
--- a/tests/generic/157
+++ b/tests/generic/157
@@ -75,10 +75,18 @@ mkdir "$TESTDIR1/dir1"
 seq 1 $((2 * BLKSZ / 250)) | while read f; do
 	touch "$TESTDIR1/dir1/$f"
 done
-mknod "$TESTDIR1/dev1" b 8 0
+mknod "$TESTDIR1/dev1" c 1 3
 mkfifo "$TESTDIR1/fifo1"
 sync
 
+_filter_enotty() {
+	sed -e 's/Inappropriate ioctl for device/Invalid argument/g'
+}
+
+_filter_einval() {
+	sed -e 's/Invalid argument/Bad file descriptor/g'
+}
+
 echo "Try cross-device reflink"
 _reflink_range "$TESTDIR1/file1" 0 "$TESTDIR2/file1" 0 $BLKSZ
 
@@ -98,16 +106,16 @@ echo "Try to reflink a device"
 _reflink_range "$TESTDIR1/dev1" 0 "$TESTDIR1/file2" 0 $BLKSZ
 
 echo "Try to reflink to a dir"
-_reflink_range "$TESTDIR1/file1" 0 "$TESTDIR1/dir1" 0 $BLKSZ
+_reflink_range "$TESTDIR1/file1" 0 "$TESTDIR1/dir1" 0 $BLKSZ 2>&1 | _filter_test_dir
 
 echo "Try to reflink to a device"
-_reflink_range "$TESTDIR1/file1" 0 "$TESTDIR1/dev1" 0 $BLKSZ
+_reflink_range "$TESTDIR1/file1" 0 "$TESTDIR1/dev1" 0 $BLKSZ 2>&1 | _filter_enotty
 
 echo "Try to reflink to a fifo"
-_reflink_range "$TESTDIR1/file1" 0 "$TESTDIR1/fifo1" 0 $BLKSZ -n
+_reflink_range "$TESTDIR1/file1" 0 "$TESTDIR1/fifo1" 0 $BLKSZ -n 2>&1 | _filter_enotty
 
 echo "Try to reflink an append-only file"
-_reflink_range "$TESTDIR1/file1" 0 "$TESTDIR1/file3" 0 $BLKSZ -a
+_reflink_range "$TESTDIR1/file1" 0 "$TESTDIR1/file3" 0 $BLKSZ -a 2>&1 | _filter_einval
 
 echo "Reflink two files"
 _reflink_range "$TESTDIR1/file1" 0 "$TESTDIR1/file2" 0 $BLKSZ >> "$seqres.full"
diff --git a/tests/generic/157.out b/tests/generic/157.out
index 177e7f8..ac3c440 100644
--- a/tests/generic/157.out
+++ b/tests/generic/157.out
@@ -14,11 +14,11 @@ XFS_IOC_CLONE_RANGE: Is a directory
 Try to reflink a device
 XFS_IOC_CLONE_RANGE: Invalid argument
 Try to reflink to a dir
-/mnt/test-157/dir1: Is a directory
+TEST_DIR/test-157/dir1: Is a directory
 Try to reflink to a device
-XFS_IOC_CLONE_RANGE: Operation not supported
+XFS_IOC_CLONE_RANGE: Invalid argument
 Try to reflink to a fifo
-XFS_IOC_CLONE_RANGE: Operation not supported
+XFS_IOC_CLONE_RANGE: Invalid argument
 Try to reflink an append-only file
 XFS_IOC_CLONE_RANGE: Bad file descriptor
 Reflink two files
diff --git a/tests/generic/158 b/tests/generic/158
index a499b21..749b186 100755
--- a/tests/generic/158
+++ b/tests/generic/158
@@ -76,10 +76,18 @@ mkdir "$TESTDIR1/dir1"
 seq 1 $((2 * BLKSZ / 250)) | while read f; do
 	touch "$TESTDIR1/dir1/$f"
 done
-mknod "$TESTDIR1/dev1" b 8 0
+mknod "$TESTDIR1/dev1" c 1 3
 mkfifo "$TESTDIR1/fifo1"
 sync
 
+_filter_enotty() {
+	sed -e 's/Inappropriate ioctl for device/Invalid argument/g'
+}
+
+_filter_eperm() {
+	sed -e 's/Permission denied/Invalid argument/g'
+}
+
 echo "Try cross-device dedupe"
 _dedupe_range "$TESTDIR1/file1" 0 "$TESTDIR2/file1" 0 $BLKSZ
 
@@ -96,16 +104,16 @@ echo "Try to dedupe a dir"
 _dedupe_range "$TESTDIR1/dir1" 0 "$TESTDIR1/file2" 0 $BLKSZ
 
 echo "Try to dedupe a device"
-_dedupe_range "$TESTDIR1/dev1" 0 "$TESTDIR1/file2" 0 $BLKSZ
+_dedupe_range "$TESTDIR1/dev1" 0 "$TESTDIR1/file2" 0 $BLKSZ 2>&1 | _filter_enotty
 
 echo "Try to dedupe to a dir"
-_dedupe_range "$TESTDIR1/file1" 0 "$TESTDIR1/dir1" 0 $BLKSZ
+_dedupe_range "$TESTDIR1/file1" 0 "$TESTDIR1/dir1" 0 $BLKSZ 2>&1 | _filter_test_dir
 
 echo "Try to dedupe to a device"
-_dedupe_range "$TESTDIR1/file1" 0 "$TESTDIR1/dev1" 0 $BLKSZ
+_dedupe_range "$TESTDIR1/file1" 0 "$TESTDIR1/dev1" 0 $BLKSZ 2>&1 | _filter_eperm
 
 echo "Try to dedupe to a fifo"
-_dedupe_range "$TESTDIR1/file1" 0 "$TESTDIR1/fifo1" 0 $BLKSZ -n
+_dedupe_range "$TESTDIR1/file1" 0 "$TESTDIR1/fifo1" 0 $BLKSZ -n 2>&1 | _filter_eperm
 
 echo "Try to dedupe an append-only file"
 _dedupe_range "$TESTDIR1/file1" 0 "$TESTDIR1/file3" 0 $BLKSZ -a >> "$seqres.full"
diff --git a/tests/generic/158.out b/tests/generic/158.out
index 36a3f1f..dff3692 100644
--- a/tests/generic/158.out
+++ b/tests/generic/158.out
@@ -12,13 +12,13 @@ dedupe: Invalid argument
 Try to dedupe a dir
 XFS_IOC_FILE_EXTENT_SAME: Is a directory
 Try to dedupe a device
-XFS_IOC_FILE_EXTENT_SAME: Permission denied
+XFS_IOC_FILE_EXTENT_SAME: Invalid argument
 Try to dedupe to a dir
-/mnt/test-158/dir1: Is a directory
+TEST_DIR/test-158/dir1: Is a directory
 Try to dedupe to a device
-dedupe: Permission denied
+dedupe: Invalid argument
 Try to dedupe to a fifo
-dedupe: Permission denied
+dedupe: Invalid argument
 Try to dedupe an append-only file
 Dedupe two files
 Check scratch fs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2015-12-19  9:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-19  9:10 [PATCH v4 00/11] xfstests: test the nfs/cifs/btrfs/xfs reflink/dedupe ioctls Darrick J. Wong
2015-12-19  9:10 ` [PATCH 01/11] test-scripts: test migration scripts Darrick J. Wong
2015-12-19  9:11 ` [PATCH 02/11] tests: don't leave cruft behind on the TEST_MNT Darrick J. Wong
2015-12-19  9:11 ` Darrick J. Wong [this message]
2015-12-19  9:11 ` [PATCH 04/11] xfs/128: allow larger margin for disk space usage Darrick J. Wong
2015-12-19  9:11 ` [PATCH 05/11] xfs/129: require loop Darrick J. Wong
2015-12-19  9:11 ` [PATCH 06/11] reflink: more tests Darrick J. Wong
2015-12-21  6:31   ` Dave Chinner
2016-01-04 19:47     ` Darrick J. Wong
2015-12-19  9:11 ` [PATCH 07/11] reflink: test ENOSPC when expanding btrees during reflink operations Darrick J. Wong
2015-12-19  9:11 ` [PATCH 08/11] reflink: more CoW tests for reflink and dedupe Darrick J. Wong
2015-12-19  9:11 ` [PATCH 09/11] reflink: test CoW with blocksize < pagesize Darrick J. Wong
2015-12-19  9:12 ` [PATCH 10/11] reflink: test a big CoW operation Darrick J. Wong
2015-12-19  9:12 ` [PATCH 11/11] generic: create a dedupe group Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151219091112.15320.45890.stgit@birch.djwong.org \
    --to=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).