All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] misc. fstests changes
@ 2018-05-01 15:39 Darrick J. Wong
  2018-05-01 15:39 ` [PATCH 1/9] generic: test XATTR_REPLACE doesn't take the fs down Darrick J. Wong
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Darrick J. Wong @ 2018-05-01 15:39 UTC (permalink / raw)
  To: guaneryu, darrick.wong; +Cc: linux-xfs, fstests

Hi all,

Here are some miscellaneous tests that have been queuing up for a while.
The first patch is a reposting of the attr replace test from a couple
weeks ago, and the second to last patch is a new test that looks for
bashisms in xfsprogs scripts.  In the middle are a bunch of enhancements
to the Unicode support test to reflect new checks that we landed in
xfs_scrub 4.16.  The rest are fixes to existing tests.

--D

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

* [PATCH 1/9] generic: test XATTR_REPLACE doesn't take the fs down
  2018-05-01 15:39 [PATCH 0/9] misc. fstests changes Darrick J. Wong
@ 2018-05-01 15:39 ` Darrick J. Wong
  2018-05-02  7:33   ` Eryu Guan
  2018-05-01 15:39 ` [PATCH 2/9] xfs/439: repair corrupted filesystem afterwards Darrick J. Wong
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Darrick J. Wong @ 2018-05-01 15:39 UTC (permalink / raw)
  To: guaneryu, darrick.wong; +Cc: linux-xfs, fstests, kanda.motohiro

From: Darrick J. Wong <darrick.wong@oracle.com>

Kanda Motohiro reported that expanding a tiny xattr into a large xattr
fails on XFS because we remove the tiny xattr from a shortform fork and
then try to re-add it after converting the fork to extents format having
not removed the ATTR_REPLACE flag.  This fails because the attr is no
longer present, causing a fs shutdown.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199119
Reported-by: kanda.motohiro@gmail.com
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 .gitignore              |    1 +
 src/Makefile            |    3 +-
 src/attr_replace_test.c |   60 +++++++++++++++++++++++++++++++++++++++++
 tests/generic/706       |   68 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/generic/706.out   |    2 +
 tests/generic/group     |    1 +
 6 files changed, 134 insertions(+), 1 deletion(-)
 create mode 100644 src/attr_replace_test.c
 create mode 100755 tests/generic/706
 create mode 100644 tests/generic/706.out


diff --git a/.gitignore b/.gitignore
index 192ca35e..af9743f9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,6 +53,7 @@
 /src/append_reader
 /src/append_writer
 /src/attr-list-by-handle-cursor-test
+/src/attr_replace_test
 /src/bstat
 /src/bulkstat_unlink_test
 /src/bulkstat_unlink_test_modified
diff --git a/src/Makefile b/src/Makefile
index 6ca56366..c42d3bb1 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -25,7 +25,8 @@ LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \
 	seek_copy_test t_readdir_1 t_readdir_2 fsync-tester nsexec cloner \
 	renameat2 t_getcwd e4compact test-nextquota punch-alternating \
 	attr-list-by-handle-cursor-test listxattr dio-interleaved t_dir_type \
-	dio-invalidate-cache stat_test t_encrypted_d_revalidate
+	dio-invalidate-cache stat_test t_encrypted_d_revalidate \
+	attr_replace_test
 
 SUBDIRS = log-writes perf
 
diff --git a/src/attr_replace_test.c b/src/attr_replace_test.c
new file mode 100644
index 00000000..c870d165
--- /dev/null
+++ b/src/attr_replace_test.c
@@ -0,0 +1,60 @@
+// setattr.c by kanda.motohiro@gmail.com
+// xfs extended attribute corruption bug reproducer
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/xattr.h>
+#include <sys/stat.h>
+
+#define die() do { perror(""); \
+fprintf(stderr, "error=%d at line %d\n", errno, __LINE__); \
+exit(1); } while (0)
+
+int main(int argc, char *argv[])
+{
+	int ret;
+	int fd;
+	char *path;
+	char *name = "user.world";
+	char *value;
+	struct stat sbuf;
+	size_t size = sizeof(value);
+
+	if (argc != 2) die();
+	path = argv[1];
+
+	fd = open(path, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+	if (fd < 0) die();
+
+	/*
+	 * The value should be 3/4 the size of a fs block to ensure that we
+	 * get to extents format.
+	 */
+	ret = fstat(fd, &sbuf);
+	if (ret < 0) die();
+	size = sbuf.st_blksize * 3 / 4;
+	if (!size) die();
+	value = malloc(size);
+	if (!value) die();
+
+	// First, create a small xattr.
+	memset(value, '0', 1);
+	ret = fsetxattr(fd, name, value, 1, XATTR_CREATE);
+	if (ret < 0) die();
+	close(fd);
+
+	fd = open(path, O_RDWR);
+	if (fd < 0) die();
+
+	// Then, replace it with bigger one, forcing short form to leaf conversion.
+	memset(value, '1', size);
+	ret = fsetxattr(fd, name, value, size, XATTR_REPLACE);
+	if (ret < 0) die();
+	close(fd);
+
+	return 0;
+}
diff --git a/tests/generic/706 b/tests/generic/706
new file mode 100755
index 00000000..9f98c3b1
--- /dev/null
+++ b/tests/generic/706
@@ -0,0 +1,68 @@
+#! /bin/bash
+# FS QA Test No. 706
+#
+# Ensure that we can XATTR_REPLACE a tiny attr into a large attr.
+# Kanda Motohiro <kanda.motohiro@gmail.com> reports that XATTR_REPLACE'ing
+# a single-byte attr with a 2048-byte attr causes a fs shutdown because we
+# remove the shortform attr, convert the attr fork to long format, and then
+# try to re-add the attr having not cleared ATTR_REPLACE.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2018 Oracle.  All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#
+#-----------------------------------------------------------------------
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $testfile
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/attr
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+_supported_fs generic
+_supported_os Linux
+_require_test_program "attr_replace_test"
+_require_attrs
+_require_scratch
+
+rm -f $seqres.full
+_scratch_mkfs >>$seqres.full 2>&1
+_scratch_mount >>$seqres.full 2>&1
+
+filter_attr_output() {
+	_filter_scratch | sed -e 's/has a [0-9]* byte value/has a NNNN byte value/g'
+}
+
+./src/attr_replace_test $SCRATCH_MNT/hello
+$ATTR_PROG -l $SCRATCH_MNT/hello | filter_attr_output
+
+status=0
+exit
diff --git a/tests/generic/706.out b/tests/generic/706.out
new file mode 100644
index 00000000..61c8419a
--- /dev/null
+++ b/tests/generic/706.out
@@ -0,0 +1,2 @@
+QA output created by 706
+Attribute "world" has a NNNN byte value for SCRATCH_MNT/hello
diff --git a/tests/generic/group b/tests/generic/group
index 19be9267..54a85ea0 100644
--- a/tests/generic/group
+++ b/tests/generic/group
@@ -487,3 +487,4 @@
 482 auto metadata replay
 483 auto quick log metadata
 484 auto quick
+706 auto quick attr


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

* [PATCH 2/9] xfs/439: repair corrupted filesystem afterwards
  2018-05-01 15:39 [PATCH 0/9] misc. fstests changes Darrick J. Wong
  2018-05-01 15:39 ` [PATCH 1/9] generic: test XATTR_REPLACE doesn't take the fs down Darrick J. Wong
@ 2018-05-01 15:39 ` Darrick J. Wong
  2018-05-02  7:51   ` Eryu Guan
  2018-05-01 15:39 ` [PATCH 3/9] generic/45[34]: add unicode directional override checks Darrick J. Wong
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Darrick J. Wong @ 2018-05-01 15:39 UTC (permalink / raw)
  To: guaneryu, darrick.wong; +Cc: linux-xfs, fstests

From: Darrick J. Wong <darrick.wong@oracle.com>

After we mess with logsunit and test that we can't mount the fs, repair
the filesystem to make sure that repair can deal with it.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/xfs/439 |    1 +
 1 file changed, 1 insertion(+)


diff --git a/tests/xfs/439 b/tests/xfs/439
index 215c4b90..9d5f6892 100755
--- a/tests/xfs/439
+++ b/tests/xfs/439
@@ -79,6 +79,7 @@ fi
 _check_dmesg _filter_assert_dmesg
 
 echo "Silence is golden"
+_scratch_xfs_repair >> $seqres.full 2>&1
 
 # success, all done
 status=0


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

* [PATCH 3/9] generic/45[34]: add unicode directional override checks
  2018-05-01 15:39 [PATCH 0/9] misc. fstests changes Darrick J. Wong
  2018-05-01 15:39 ` [PATCH 1/9] generic: test XATTR_REPLACE doesn't take the fs down Darrick J. Wong
  2018-05-01 15:39 ` [PATCH 2/9] xfs/439: repair corrupted filesystem afterwards Darrick J. Wong
@ 2018-05-01 15:39 ` Darrick J. Wong
  2018-05-01 15:39 ` [PATCH 4/9] generic/45[34]: check unicode names only if xfs_scrub linked against libicu Darrick J. Wong
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Darrick J. Wong @ 2018-05-01 15:39 UTC (permalink / raw)
  To: guaneryu, darrick.wong; +Cc: linux-xfs, fstests

From: Darrick J. Wong <darrick.wong@oracle.com>

Try injecting a Unicode directional override character in the middle of
a name to see if the fs can handle it / xfs_scrub will complain.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/generic/453 |    7 +++++++
 tests/generic/454 |    7 +++++++
 2 files changed, 14 insertions(+)


diff --git a/tests/generic/453 b/tests/generic/453
index 424412e9..f2cd81fb 100755
--- a/tests/generic/453
+++ b/tests/generic/453
@@ -112,6 +112,10 @@ setf "emoji_\xf0\x9f\xa6\x91\xf0\x9f\xa6\x8b\xf0\x9f\xa6\x89\xf0\x9f\xa6\x92.txt
 # Line draw characters, because why not?
 setf "\x6c\x69\x6e\x65\x64\x72\x61\x77\x5f\x0a\xe2\x95\x94\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x97\x0a\xe2\x95\x91\x20\x6d\x65\x74\x61\x74\x61\x62\x6c\x65\x20\xe2\x95\x91\x0a\xe2\x95\x9f\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x95\xa2\x0a\xe2\x95\x91\x20\x5f\x5f\x69\x6e\x64\x65\x78\x20\x20\x20\xe2\x95\x91\x0a\xe2\x95\x9a\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x9d\x0a.txt" "ugly box because we can"
 
+# unicode rtl widgets too...
+setf "moo\xe2\x80\xaegnp.txt" "Well say hello,"
+setf "mootxt.png" "Harvey"
+
 ls -la $testdir >> $seqres.full
 
 echo "Test files"
@@ -135,6 +139,9 @@ testf "emoji_\xf0\x9f\xa6\x91\xf0\x9f\xa6\x8b\xf0\x9f\xa6\x89\xf0\x9f\xa6\x92.tx
 
 testf "\x6c\x69\x6e\x65\x64\x72\x61\x77\x5f\x0a\xe2\x95\x94\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x97\x0a\xe2\x95\x91\x20\x6d\x65\x74\x61\x74\x61\x62\x6c\x65\x20\xe2\x95\x91\x0a\xe2\x95\x9f\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x95\xa2\x0a\xe2\x95\x91\x20\x5f\x5f\x69\x6e\x64\x65\x78\x20\x20\x20\xe2\x95\x91\x0a\xe2\x95\x9a\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x9d\x0a.txt" "ugly box because we can"
 
+testf "moo\xe2\x80\xaegnp.txt" "Well say hello,"
+testf "mootxt.png" "Harvey"
+
 echo "Uniqueness of inodes?"
 stat -c '%i' "${testdir}/"* | sort | uniq -c | while read nr inum; do
 	if [ "${nr}" -gt 1 ]; then
diff --git a/tests/generic/454 b/tests/generic/454
index 24727ab3..c6530290 100755
--- a/tests/generic/454
+++ b/tests/generic/454
@@ -110,6 +110,10 @@ setf "emoji_\xf0\x9f\xa6\x91\xf0\x9f\xa6\x8b\xf0\x9f\xa6\x89\xf0\x9f\xa6\x92.txt
 # Line draw characters, because why not?
 setf "\x6c\x69\x6e\x65\x64\x72\x61\x77\x5f\x0a\xe2\x95\x94\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x97\x0a\xe2\x95\x91\x20\x6d\x65\x74\x61\x74\x61\x62\x6c\x65\x20\xe2\x95\x91\x0a\xe2\x95\x9f\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x95\xa2\x0a\xe2\x95\x91\x20\x5f\x5f\x69\x6e\x64\x65\x78\x20\x20\x20\xe2\x95\x91\x0a\xe2\x95\x9a\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x9d\x0a.txt" "ugly box because we can"
 
+# unicode rtl widgets too...
+setf "moo\xe2\x80\xaegnp.txt" "Well say hello,"
+setf "mootxt.png" "Harvey"
+
 $GETFATTR_PROG --absolute-names -d "${testfile}" >> $seqres.full
 
 echo "Test files"
@@ -133,6 +137,9 @@ testf "emoji_\xf0\x9f\xa6\x91\xf0\x9f\xa6\x8b\xf0\x9f\xa6\x89\xf0\x9f\xa6\x92.tx
 
 testf "\x6c\x69\x6e\x65\x64\x72\x61\x77\x5f\x0a\xe2\x95\x94\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x97\x0a\xe2\x95\x91\x20\x6d\x65\x74\x61\x74\x61\x62\x6c\x65\x20\xe2\x95\x91\x0a\xe2\x95\x9f\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x95\xa2\x0a\xe2\x95\x91\x20\x5f\x5f\x69\x6e\x64\x65\x78\x20\x20\x20\xe2\x95\x91\x0a\xe2\x95\x9a\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x9d\x0a.txt" "ugly box because we can"
 
+testf "moo\xe2\x80\xaegnp.txt" "Well say hello,"
+testf "mootxt.png" "Harvey"
+
 echo "Uniqueness of keys?"
 crazy_keys="$($GETFATTR_PROG --absolute-names -d "${testfile}" | egrep -c '(french_|chinese_|greek_|arabic_|urk)')"
 expected_keys=11


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

* [PATCH 4/9] generic/45[34]: check unicode names only if xfs_scrub linked against libicu
  2018-05-01 15:39 [PATCH 0/9] misc. fstests changes Darrick J. Wong
                   ` (2 preceding siblings ...)
  2018-05-01 15:39 ` [PATCH 3/9] generic/45[34]: add unicode directional override checks Darrick J. Wong
@ 2018-05-01 15:39 ` Darrick J. Wong
  2018-05-01 15:39 ` [PATCH 5/9] generic/45[34]: test unicode confusables Darrick J. Wong
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Darrick J. Wong @ 2018-05-01 15:39 UTC (permalink / raw)
  To: guaneryu, darrick.wong; +Cc: linux-xfs, fstests

From: Darrick J. Wong <darrick.wong@oracle.com>

Since we've rewriting the xfs_scrub Unicode name scanner to use libicu
to detect potential spoof names, change our check for unicode-enabled
name scanning xfs_scrub to look for libicu instead of libunistring,
adjust the golden output to reflect the new library's detection
capabilities and make sure we get all the scrub output by invoking with
-v.

Note that this requires xfsprogs 4.16 or newer; since xfs_scrub is (for
now) an experimental program, we don't care about breaking backwards
compatibility.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/generic/453 |    5 ++---
 tests/generic/454 |    5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)


diff --git a/tests/generic/453 b/tests/generic/453
index f2cd81fb..6cb2a296 100755
--- a/tests/generic/453
+++ b/tests/generic/453
@@ -158,7 +158,7 @@ check_xfs_scrub() {
 
 	# We only care if xfs_scrub has unicode string support...
 	if ! type ldd > /dev/null 2>&1 || \
-	   ! ldd "${XFS_SCRUB_PROG}" | grep -q libunistring; then
+	   ! ldd "${XFS_SCRUB_PROG}" | grep -q libicui18n; then
 		return 1
 	fi
 
@@ -166,9 +166,8 @@ check_xfs_scrub() {
 }
 
 if check_xfs_scrub; then
-	output="$(LC_ALL="C.UTF-8" ${XFS_SCRUB_PROG} -n "${SCRATCH_MNT}" 2>&1 | filter_scrub)"
+	output="$(LC_ALL="C.UTF-8" ${XFS_SCRUB_PROG} -v -n "${SCRATCH_MNT}" 2>&1 | filter_scrub)"
 	echo "${output}" | grep -q "french_" || echo "No complaints about french e accent?"
-	echo "${output}" | grep -q "chinese_" || echo "No complaints about chinese width-different?"
 	echo "${output}" | grep -q "greek_" || echo "No complaints about greek letter mess?"
 	echo "${output}" | grep -q "arabic_" || echo "No complaints about arabic expanded string?"
 	echo "Actual xfs_scrub output:" >> $seqres.full
diff --git a/tests/generic/454 b/tests/generic/454
index c6530290..ec4fb997 100755
--- a/tests/generic/454
+++ b/tests/generic/454
@@ -154,7 +154,7 @@ check_xfs_scrub() {
 
 	# We only care if xfs_scrub has unicode string support...
 	if ! type ldd > /dev/null 2>&1 || \
-	   ! ldd "${XFS_SCRUB_PROG}" | grep -q libunistring; then
+	   ! ldd "${XFS_SCRUB_PROG}" | grep -q libicui18n; then
 		return 1
 	fi
 
@@ -162,9 +162,8 @@ check_xfs_scrub() {
 }
 
 if check_xfs_scrub; then
-	output="$(LC_ALL="C.UTF-8" ${XFS_SCRUB_PROG} -n "${SCRATCH_MNT}" 2>&1 | filter_scrub)"
+	output="$(LC_ALL="C.UTF-8" ${XFS_SCRUB_PROG} -v -n "${SCRATCH_MNT}" 2>&1 | filter_scrub)"
 	echo "${output}" | grep -q "french_" || echo "No complaints about french e accent?"
-	echo "${output}" | grep -q "chinese_" || echo "No complaints about chinese width-different?"
 	echo "${output}" | grep -q "greek_" || echo "No complaints about greek letter mess?"
 	echo "${output}" | grep -q "arabic_" || echo "No complaints about arabic expanded string?"
 	echo "Actual xfs_scrub output:" >> $seqres.full


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

* [PATCH 5/9] generic/45[34]: test unicode confusables
  2018-05-01 15:39 [PATCH 0/9] misc. fstests changes Darrick J. Wong
                   ` (3 preceding siblings ...)
  2018-05-01 15:39 ` [PATCH 4/9] generic/45[34]: check unicode names only if xfs_scrub linked against libicu Darrick J. Wong
@ 2018-05-01 15:39 ` Darrick J. Wong
  2018-05-01 15:39 ` [PATCH 6/9] generic/453: test creation of malicious directory entries Darrick J. Wong
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Darrick J. Wong @ 2018-05-01 15:39 UTC (permalink / raw)
  To: guaneryu, darrick.wong; +Cc: linux-xfs, fstests

From: Darrick J. Wong <darrick.wong@oracle.com>

Test if a filesystem will allow us to create names with easily
confusable unicode sequences (character spoofing) and, if on XFS,
whether or not xfs_scrub will notice.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/generic/453 |   54 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/generic/454 |   54 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 108 insertions(+)


diff --git a/tests/generic/453 b/tests/generic/453
index 6cb2a296..91d163ca 100755
--- a/tests/generic/453
+++ b/tests/generic/453
@@ -116,6 +116,33 @@ setf "\x6c\x69\x6e\x65\x64\x72\x61\x77\x5f\x0a\xe2\x95\x94\xe2\x95\x90\xe2\x95\x
 setf "moo\xe2\x80\xaegnp.txt" "Well say hello,"
 setf "mootxt.png" "Harvey"
 
+# mixed-script confusables
+setf "mixed_t\xce\xbfp.txt" "greek omicron instead of o"
+setf "mixed_top.txt" "greek omicron instead of o"
+
+# single-script spoofing
+setf "hyphens_a\xe2\x80\x90b.txt" "hyphens"
+setf "hyphens_a-b.txt" "hyphens"
+
+setf "dz_digraph_dze.txt" "d-z digraph"
+setf "dz_digraph_\xca\xa3e.txt" "d-z digraph"
+
+# inadequate rendering
+setf "inadequate_al.txt" "is it l or is it 1"
+setf "inadequate_a1.txt" "is it l or is it 1"
+
+# symbols
+setf "prohibition_Rs.txt" "rupee symbol"
+setf "prohibition_\xe2\x82\xa8.txt" "rupee symbol"
+
+# zero width joiners
+setf "zerojoin_moocow.txt" "zero width joiners"
+setf "zerojoin_moo\xe2\x80\x8dcow.txt" "zero width joiners"
+
+# combining marks
+setf "combmark_\xe1\x80\x9c\xe1\x80\xad\xe1\x80\xaf.txt" "combining marks"
+setf "combmark_\xe1\x80\x9c\xe1\x80\xaf\xe1\x80\xad.txt" "combining marks"
+
 ls -la $testdir >> $seqres.full
 
 echo "Test files"
@@ -142,6 +169,27 @@ testf "\x6c\x69\x6e\x65\x64\x72\x61\x77\x5f\x0a\xe2\x95\x94\xe2\x95\x90\xe2\x95\
 testf "moo\xe2\x80\xaegnp.txt" "Well say hello,"
 testf "mootxt.png" "Harvey"
 
+testf "mixed_t\xce\xbfp.txt" "greek omicron instead of o"
+testf "mixed_top.txt" "greek omicron instead of o"
+
+testf "hyphens_a\xe2\x80\x90b.txt" "hyphens"
+testf "hyphens_a-b.txt" "hyphens"
+
+testf "dz_digraph_dze.txt" "d-z digraph"
+testf "dz_digraph_\xca\xa3e.txt" "d-z digraph"
+
+testf "inadequate_al.txt" "is it l or is it 1"
+testf "inadequate_a1.txt" "is it l or is it 1"
+
+testf "prohibition_Rs.txt" "rupee symbol"
+testf "prohibition_\xe2\x82\xa8.txt" "rupee symbol"
+
+testf "zerojoin_moocow.txt" "zero width joiners"
+testf "zerojoin_moo\xe2\x80\x8dcow.txt" "zero width joiners"
+
+testf "combmark_\xe1\x80\x9c\xe1\x80\xad\xe1\x80\xaf.txt" "combining marks"
+testf "combmark_\xe1\x80\x9c\xe1\x80\xaf\xe1\x80\xad.txt" "combining marks"
+
 echo "Uniqueness of inodes?"
 stat -c '%i' "${testdir}/"* | sort | uniq -c | while read nr inum; do
 	if [ "${nr}" -gt 1 ]; then
@@ -170,6 +218,12 @@ if check_xfs_scrub; then
 	echo "${output}" | grep -q "french_" || echo "No complaints about french e accent?"
 	echo "${output}" | grep -q "greek_" || echo "No complaints about greek letter mess?"
 	echo "${output}" | grep -q "arabic_" || echo "No complaints about arabic expanded string?"
+	echo "${output}" | grep -q "mixed_" || echo "No complaints about mixed script confusables?"
+	echo "${output}" | grep -q "hyphens_" || echo "No complaints about hyphenation confusables?"
+	echo "${output}" | grep -q "dz_digraph_" || echo "No complaints about single script confusables?"
+	echo "${output}" | grep -q "inadequate_" || echo "No complaints about inadequate rendering confusables?"
+	echo "${output}" | grep -q "prohibition_" || echo "No complaints about prohibited sequence confusables?"
+	echo "${output}" | grep -q "zerojoin_" || echo "No complaints about zero-width join confusables?"
 	echo "Actual xfs_scrub output:" >> $seqres.full
 	echo "${output}" >> $seqres.full
 fi
diff --git a/tests/generic/454 b/tests/generic/454
index ec4fb997..fdb5ef87 100755
--- a/tests/generic/454
+++ b/tests/generic/454
@@ -114,6 +114,33 @@ setf "\x6c\x69\x6e\x65\x64\x72\x61\x77\x5f\x0a\xe2\x95\x94\xe2\x95\x90\xe2\x95\x
 setf "moo\xe2\x80\xaegnp.txt" "Well say hello,"
 setf "mootxt.png" "Harvey"
 
+# mixed-script confusables
+setf "mixed_t\xce\xbfp.txt" "greek omicron instead of o"
+setf "mixed_top.txt" "greek omicron instead of o"
+
+# single-script spoofing
+setf "hyphens_a\xe2\x80\x90b.txt" "hyphens"
+setf "hyphens_a-b.txt" "hyphens"
+
+setf "dz_digraph_dze.txt" "d-z digraph"
+setf "dz_digraph_\xca\xa3e.txt" "d-z digraph"
+
+# inadequate rendering
+setf "inadequate_al.txt" "is it l or is it 1"
+setf "inadequate_a1.txt" "is it l or is it 1"
+
+# symbols
+setf "prohibition_Rs.txt" "rupee symbol"
+setf "prohibition_\xe2\x82\xa8.txt" "rupee symbol"
+
+# zero width joiners
+setf "zerojoin_moocow.txt" "zero width joiners"
+setf "zerojoin_moo\xe2\x80\x8ccow.txt" "zero width joiners"
+
+# combining marks
+setf "combmark_\xe1\x80\x9c\xe1\x80\xad\xe1\x80\xaf.txt" "combining marks"
+setf "combmark_\xe1\x80\x9c\xe1\x80\xaf\xe1\x80\xad.txt" "combining marks"
+
 $GETFATTR_PROG --absolute-names -d "${testfile}" >> $seqres.full
 
 echo "Test files"
@@ -140,6 +167,27 @@ testf "\x6c\x69\x6e\x65\x64\x72\x61\x77\x5f\x0a\xe2\x95\x94\xe2\x95\x90\xe2\x95\
 testf "moo\xe2\x80\xaegnp.txt" "Well say hello,"
 testf "mootxt.png" "Harvey"
 
+testf "mixed_t\xce\xbfp.txt" "greek omicron instead of o"
+testf "mixed_top.txt" "greek omicron instead of o"
+
+testf "hyphens_a\xe2\x80\x90b.txt" "hyphens"
+testf "hyphens_a-b.txt" "hyphens"
+
+testf "dz_digraph_dze.txt" "d-z digraph"
+testf "dz_digraph_\xca\xa3e.txt" "d-z digraph"
+
+testf "inadequate_al.txt" "is it l or is it 1"
+testf "inadequate_a1.txt" "is it l or is it 1"
+
+testf "prohibition_Rs.txt" "rupee symbol"
+testf "prohibition_\xe2\x82\xa8.txt" "rupee symbol"
+
+testf "zerojoin_moocow.txt" "zero width joiners"
+testf "zerojoin_moo\xe2\x80\x8ccow.txt" "zero width joiners"
+
+testf "combmark_\xe1\x80\x9c\xe1\x80\xad\xe1\x80\xaf.txt" "combining marks"
+testf "combmark_\xe1\x80\x9c\xe1\x80\xaf\xe1\x80\xad.txt" "combining marks"
+
 echo "Uniqueness of keys?"
 crazy_keys="$($GETFATTR_PROG --absolute-names -d "${testfile}" | egrep -c '(french_|chinese_|greek_|arabic_|urk)')"
 expected_keys=11
@@ -166,6 +214,12 @@ if check_xfs_scrub; then
 	echo "${output}" | grep -q "french_" || echo "No complaints about french e accent?"
 	echo "${output}" | grep -q "greek_" || echo "No complaints about greek letter mess?"
 	echo "${output}" | grep -q "arabic_" || echo "No complaints about arabic expanded string?"
+	echo "${output}" | grep -q "mixed_" || echo "No complaints about mixed script confusables?"
+	echo "${output}" | grep -q "hyphens_" || echo "No complaints about hyphenation confusables?"
+	echo "${output}" | grep -q "dz_digraph_" || echo "No complaints about single script confusables?"
+	echo "${output}" | grep -q "inadequate_" || echo "No complaints about inadequate rendering confusables?"
+	echo "${output}" | grep -q "prohibition_" || echo "No complaints about prohibited sequence confusables?"
+	echo "${output}" | grep -q "zerojoin_" || echo "No complaints about zero-width join confusables?"
 	echo "Actual xfs_scrub output:" >> $seqres.full
 	echo "${output}" >> $seqres.full
 fi


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

* [PATCH 6/9] generic/453: test creation of malicious directory entries
  2018-05-01 15:39 [PATCH 0/9] misc. fstests changes Darrick J. Wong
                   ` (4 preceding siblings ...)
  2018-05-01 15:39 ` [PATCH 5/9] generic/45[34]: test unicode confusables Darrick J. Wong
@ 2018-05-01 15:39 ` Darrick J. Wong
  2018-05-01 15:40 ` [PATCH 7/9] xfs/422: add fsstress to the freeze-and-rmap-repair race test Darrick J. Wong
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Darrick J. Wong @ 2018-05-01 15:39 UTC (permalink / raw)
  To: guaneryu, darrick.wong; +Cc: linux-xfs, fstests

From: Darrick J. Wong <darrick.wong@oracle.com>

Create malicious . and .. entries (you didn't see the zero-width
joiners at the end, did you?) in a directory to see if scrub will pick
them up.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/generic/453 |   34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)


diff --git a/tests/generic/453 b/tests/generic/453
index 91d163ca..8841f581 100755
--- a/tests/generic/453
+++ b/tests/generic/453
@@ -62,6 +62,15 @@ setf() {
 	echo "Storing ${key} ($(hexbytes "${key}")) -> ${value}" >> $seqres.full
 }
 
+setd() {
+	key="$(echo -e "$1")"
+	value="$2"
+
+	mkdir -p "${testdir}/${key}"
+	echo "${value}" > "${testdir}/${key}/value"
+	echo "Storing ${key} ($(hexbytes "${key}")) -> ${value}" >> $seqres.full
+}
+
 testf() {
 	key="$(echo -e "$1")"
 	value="$2"
@@ -80,6 +89,24 @@ testf() {
 	fi
 }
 
+testd() {
+	key="$(echo -e "$1")"
+	value="$2"
+	fname="${testdir}/${key}/value"
+
+	echo "Testing ${key} ($(hexbytes "${key}")) -> ${value}" >> $seqres.full
+
+	if [ ! -e "${fname}" ]; then
+		echo "Key ${key} does not exist for ${value} test??"
+		return
+	fi
+
+	actual_value="$(cat "${fname}")"
+	if [ "${actual_value}" != "${value}" ]; then
+		echo "Key ${key} has value ${value}, expected ${actual_value}."
+	fi
+}
+
 filter_scrub() {
 	grep 'Unicode' | sed -e 's/^.*Duplicate/Duplicate/g'
 }
@@ -143,6 +170,10 @@ setf "zerojoin_moo\xe2\x80\x8dcow.txt" "zero width joiners"
 setf "combmark_\xe1\x80\x9c\xe1\x80\xad\xe1\x80\xaf.txt" "combining marks"
 setf "combmark_\xe1\x80\x9c\xe1\x80\xaf\xe1\x80\xad.txt" "combining marks"
 
+# fake dotdot entry
+setd ".\xe2\x80\x8d" "zero width joiners in dot entry"
+setd "..\xe2\x80\x8d" "zero width joiners in dotdot entry"
+
 ls -la $testdir >> $seqres.full
 
 echo "Test files"
@@ -190,6 +221,9 @@ testf "zerojoin_moo\xe2\x80\x8dcow.txt" "zero width joiners"
 testf "combmark_\xe1\x80\x9c\xe1\x80\xad\xe1\x80\xaf.txt" "combining marks"
 testf "combmark_\xe1\x80\x9c\xe1\x80\xaf\xe1\x80\xad.txt" "combining marks"
 
+testd ".\xe2\x80\x8d" "zero width joiners in dot entry"
+testd "..\xe2\x80\x8d" "zero width joiners in dotdot entry"
+
 echo "Uniqueness of inodes?"
 stat -c '%i' "${testdir}/"* | sort | uniq -c | while read nr inum; do
 	if [ "${nr}" -gt 1 ]; then


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

* [PATCH 7/9] xfs/422: add fsstress to the freeze-and-rmap-repair race test
  2018-05-01 15:39 [PATCH 0/9] misc. fstests changes Darrick J. Wong
                   ` (5 preceding siblings ...)
  2018-05-01 15:39 ` [PATCH 6/9] generic/453: test creation of malicious directory entries Darrick J. Wong
@ 2018-05-01 15:40 ` Darrick J. Wong
  2018-05-02  8:44   ` Eryu Guan
  2018-05-01 15:40 ` [PATCH 8/9] xfs: checkbashisms in all script files Darrick J. Wong
  2018-05-01 15:40 ` [PATCH 9/9] xfs: fix blocktrash fuzzers Darrick J. Wong
  8 siblings, 1 reply; 21+ messages in thread
From: Darrick J. Wong @ 2018-05-01 15:40 UTC (permalink / raw)
  To: guaneryu, darrick.wong; +Cc: linux-xfs, fstests

From: Darrick J. Wong <darrick.wong@oracle.com>

Add fsstress to the pile of things that we race with rmap repair to
ensure that the rmap repair isolates the filesystem correctly while it
is doing its repairs.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/xfs/422 |   19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)


diff --git a/tests/xfs/422 b/tests/xfs/422
index a8fa5d5a..b2db713c 100755
--- a/tests/xfs/422
+++ b/tests/xfs/422
@@ -51,6 +51,8 @@ _supported_fs xfs
 _require_xfs_scratch_rmapbt
 _require_xfs_io_command "scrub"
 _require_xfs_io_error_injection "force_repair"
+_require_command "$KILLALL_PROG" killall
+_require_command "$FSSTRESS_PROG" fsstress
 
 echo "Format and populate"
 _scratch_mkfs > "$seqres.full" 2>&1
@@ -89,18 +91,33 @@ repair_loop() {
 		$XFS_IO_PROG -x -c 'repair rmapbt 0' -c 'repair rmapbt 1' $SCRATCH_MNT 2>&1 | filter_output
 	done
 }
+stress_loop() {
+	end="$1"
+
+	FSSTRESS_ARGS=$(_scale_fsstress_args -p 4 -d $SCRATCH_MNT -n 2000 $FSSTRESS_AVOID)
+	while [ "$(date +%s)" -lt $end ]; do
+		$FSSTRESS_PROG $FSSTRESS_ARGS >> $seqres.full
+	done
+}
 $XFS_IO_PROG -x -c 'inject force_repair' $SCRATCH_MNT
 
 start=$(date +%s)
 end=$((start + (30 * TIME_FACTOR) ))
 
 echo "Loop started at $(date --date="@${start}"), ending at $(date --date="@${end}")" >> $seqres.full
+stress_loop $end &
 freeze_loop $end &
 repair_loop $end &
 
-while [ "$(date +%s)" -lt $end ]; do
+# Wait until 2 seconds after the loops should have finished...
+while [ "$(date +%s)" -lt $((end + 2)) ]; do
 	sleep 1
 done
+
+# ...and clean up after the loops in case they didn't do it themselves.
+$KILLALL_PROG -TERM xfs_io fsstress >> $seqres.full 2>&1
+$XFS_IO_PROG -x -c 'thaw' $SCRATCH_MNT >> $seqres.full 2>&1
+
 echo "Loop finished at $(date)" >> $seqres.full
 echo "Test done"
 


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

* [PATCH 8/9] xfs: checkbashisms in all script files
  2018-05-01 15:39 [PATCH 0/9] misc. fstests changes Darrick J. Wong
                   ` (6 preceding siblings ...)
  2018-05-01 15:40 ` [PATCH 7/9] xfs/422: add fsstress to the freeze-and-rmap-repair race test Darrick J. Wong
@ 2018-05-01 15:40 ` Darrick J. Wong
  2018-05-02  8:55   ` Eryu Guan
  2018-05-02 15:03   ` [PATCH v2 " Darrick J. Wong
  2018-05-01 15:40 ` [PATCH 9/9] xfs: fix blocktrash fuzzers Darrick J. Wong
  8 siblings, 2 replies; 21+ messages in thread
From: Darrick J. Wong @ 2018-05-01 15:40 UTC (permalink / raw)
  To: guaneryu, darrick.wong; +Cc: linux-xfs, sandeen, fstests

From: Darrick J. Wong <darrick.wong@oracle.com>

Find all the /bin/sh scripts in xfsprogs and check for bashisms.

Cc: sandeen@sandeen.net
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/xfs/711     |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/711.out |    1 +
 tests/xfs/group   |    1 +
 3 files changed, 53 insertions(+)
 create mode 100755 tests/xfs/711
 create mode 100644 tests/xfs/711.out


diff --git a/tests/xfs/711 b/tests/xfs/711
new file mode 100755
index 00000000..d3dc3cd4
--- /dev/null
+++ b/tests/xfs/711
@@ -0,0 +1,51 @@
+#! /bin/bash
+# FS QA Test No. 711
+#
+# checkbashisms on all /bin/sh scripts.  This is a maintainer script.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2018 Oracle, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+
+# get standard environment
+. ./common/rc
+
+# real QA test starts here
+_supported_fs xfs
+_supported_os Linux
+export CHECKBASHISMS_PROG="`set_prog_path checkbashisms`"
+_require_command "$CHECKBASHISMS_PROG" checkbashisms
+
+test -z "$WORKAREA" && _notrun "Can't find xfsprogs source"
+
+rm -f $seqres.full
+
+find $WORKAREA -name 'xfs*.sh' -print0 | xargs -0 grep '^#!/bin/sh' | sed -e 's/:.*$//g' | while read f; do
+	$CHECKBASHISMS_PROG $f
+done
+
+status=0
diff --git a/tests/xfs/711.out b/tests/xfs/711.out
new file mode 100644
index 00000000..52ff4745
--- /dev/null
+++ b/tests/xfs/711.out
@@ -0,0 +1 @@
+QA output created by 711
diff --git a/tests/xfs/group b/tests/xfs/group
index 39e259e8..b7da3fba 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -443,3 +443,4 @@
 443 auto quick ioctl fsr
 444 auto quick
 445 auto quick filestreams
+711 auto quick


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

* [PATCH 9/9] xfs: fix blocktrash fuzzers
  2018-05-01 15:39 [PATCH 0/9] misc. fstests changes Darrick J. Wong
                   ` (7 preceding siblings ...)
  2018-05-01 15:40 ` [PATCH 8/9] xfs: checkbashisms in all script files Darrick J. Wong
@ 2018-05-01 15:40 ` Darrick J. Wong
  8 siblings, 0 replies; 21+ messages in thread
From: Darrick J. Wong @ 2018-05-01 15:40 UTC (permalink / raw)
  To: guaneryu, darrick.wong; +Cc: linux-xfs, fstests

From: Darrick J. Wong <darrick.wong@oracle.com>

The blocktrash fuzz tests for xfs will try to mount and write to the
filesystem after corrupting it.  However, the mount may not necessarily
succeed, in which case we must not write junk to the root filesystem.
Use the new _test_scratch_mount to guard against that.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/xfs/086 |   15 ++++++++-------
 tests/xfs/087 |   19 ++++++++++---------
 tests/xfs/088 |   15 ++++++++-------
 tests/xfs/089 |   15 ++++++++-------
 tests/xfs/091 |   15 ++++++++-------
 tests/xfs/093 |   19 ++++++++++---------
 tests/xfs/097 |   19 ++++++++++---------
 tests/xfs/099 |   11 ++++++-----
 tests/xfs/100 |   11 ++++++-----
 tests/xfs/101 |   11 ++++++-----
 tests/xfs/102 |   11 ++++++-----
 tests/xfs/105 |   11 ++++++-----
 tests/xfs/112 |   11 ++++++-----
 tests/xfs/113 |   11 ++++++-----
 tests/xfs/117 |   25 +++++++++++++------------
 tests/xfs/120 |   17 +++++++++--------
 tests/xfs/123 |    7 ++++---
 tests/xfs/124 |    9 +++++----
 tests/xfs/125 |    9 +++++----
 tests/xfs/126 |    9 +++++----
 tests/xfs/235 |   11 ++++++-----
 tests/xfs/337 |   11 ++++++-----
 22 files changed, 157 insertions(+), 135 deletions(-)


diff --git a/tests/xfs/086 b/tests/xfs/086
index 787f8865..98b45dde 100755
--- a/tests/xfs/086
+++ b/tests/xfs/086
@@ -93,13 +93,14 @@ done
 
 # Try to append to files; this should fail
 echo "+ mount image"
-_scratch_mount
-
-echo "+ modify files"
-for x in `seq 1 64`; do
-	$XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full
-done
-umount "${SCRATCH_MNT}"
+if _try_scratch_mount >> $seqres.full 2>&1; then
+
+	echo "+ modify files"
+	for x in `seq 1 64`; do
+		$XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full
+	done
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/087 b/tests/xfs/087
index 58ba9586..65877c7c 100755
--- a/tests/xfs/087
+++ b/tests/xfs/087
@@ -91,15 +91,16 @@ for ag in $(seq 1 $((agcount - 1))) 0; do
 done
 
 echo "+ mount image"
-_scratch_mount
-
-echo "+ modify files"
-broken=0
-for x in `seq 65 70`; do
-	touch "${TESTFILE}.${x}" 2> /dev/null || broken=1
-done
-echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+if _try_scratch_mount >> $seqres.full 2>&1; then
+
+	echo "+ modify files"
+	broken=0
+	for x in `seq 65 70`; do
+		touch "${TESTFILE}.${x}" 2> /dev/null || broken=1
+	done
+	echo "broken: ${broken}"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/088 b/tests/xfs/088
index 36745b2f..14b1f115 100755
--- a/tests/xfs/088
+++ b/tests/xfs/088
@@ -92,13 +92,14 @@ done
 
 # Try to append to files; this should fail
 echo "+ mount image"
-_scratch_mount
-
-echo "+ modify files"
-for x in `seq 1 64`; do
-	$XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full
-done
-umount "${SCRATCH_MNT}"
+if _try_scratch_mount >> $seqres.full 2>&1; then
+
+	echo "+ modify files"
+	for x in `seq 1 64`; do
+		$XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full
+	done
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/089 b/tests/xfs/089
index 52bdd542..e47f7fef 100755
--- a/tests/xfs/089
+++ b/tests/xfs/089
@@ -92,13 +92,14 @@ done
 
 # Try to append to files; this should fail
 echo "+ mount image"
-_scratch_mount
-
-echo "+ modify files"
-for x in `seq 1 64`; do
-	$XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full
-done
-umount "${SCRATCH_MNT}"
+if _try_scratch_mount >> $seqres.full 2>&1; then
+
+	echo "+ modify files"
+	for x in `seq 1 64`; do
+		$XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full
+	done
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/091 b/tests/xfs/091
index ae623370..7adbdc9e 100755
--- a/tests/xfs/091
+++ b/tests/xfs/091
@@ -92,13 +92,14 @@ done
 
 # Try to append to files; this should fail
 echo "+ mount image"
-_scratch_mount
-
-echo "+ modify files"
-for x in `seq 1 64`; do
-	$XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full
-done
-umount "${SCRATCH_MNT}"
+if _try_scratch_mount >> $seqres.full 2>&1; then
+
+	echo "+ modify files"
+	for x in `seq 1 64`; do
+		$XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full
+	done
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/093 b/tests/xfs/093
index 0f9311e9..440cdb66 100755
--- a/tests/xfs/093
+++ b/tests/xfs/093
@@ -91,15 +91,16 @@ for ag in $(seq 1 $((agcount - 1))) 0; do
 done
 
 echo "+ mount image"
-_scratch_mount
-
-echo "+ modify files"
-broken=0
-for x in `seq 65 70`; do
-	touch "${TESTFILE}.${x}" 2> /dev/null || broken=1
-done
-echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+if _try_scratch_mount >> $seqres.full 2>&1; then
+
+	echo "+ modify files"
+	broken=0
+	for x in `seq 65 70`; do
+		touch "${TESTFILE}.${x}" 2> /dev/null || broken=1
+	done
+	echo "broken: ${broken}"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/097 b/tests/xfs/097
index 303ad04f..703bd9b4 100755
--- a/tests/xfs/097
+++ b/tests/xfs/097
@@ -94,15 +94,16 @@ for ag in $(seq 1 $((agcount - 1))) 0; do
 done
 
 echo "+ mount image"
-_scratch_mount
-
-echo "+ modify files"
-broken=0
-for x in `seq 65 70`; do
-	touch "${TESTFILE}.${x}" 2> /dev/null || broken=1
-done
-echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+if _try_scratch_mount >> $seqres.full 2>&1; then
+
+	echo "+ modify files"
+	broken=0
+	for x in `seq 65 70`; do
+		touch "${TESTFILE}.${x}" 2> /dev/null || broken=1
+	done
+	echo "broken: ${broken}"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/099 b/tests/xfs/099
index 7835df9f..2d63536c 100755
--- a/tests/xfs/099
+++ b/tests/xfs/099
@@ -82,12 +82,13 @@ echo "+ corrupt dir"
 _scratch_xfs_db -x -c "inode ${inode}" -c 'dblock 0' -c "stack" -c "blocktrash -x 32 -y $((blksz * 8)) -z ${FUZZ_ARGS}" >> $seqres.full
 
 echo "+ mount image"
-_scratch_mount
+if _try_scratch_mount >> $seqres.full 2>&1; then
 
-echo "+ modify dir"
-rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
-mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
-umount "${SCRATCH_MNT}"
+	echo "+ modify dir"
+	rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
+	mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/100 b/tests/xfs/100
index ebb656d3..83146ee0 100755
--- a/tests/xfs/100
+++ b/tests/xfs/100
@@ -87,12 +87,13 @@ while true; do
 done
 
 echo "+ mount image"
-_scratch_mount
+if _try_scratch_mount >> $seqres.full 2>&1; then
 
-echo "+ modify dir"
-rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
-mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
-umount "${SCRATCH_MNT}"
+	echo "+ modify dir"
+	rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
+	mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/101 b/tests/xfs/101
index 709fc9d3..426c3e9c 100755
--- a/tests/xfs/101
+++ b/tests/xfs/101
@@ -82,12 +82,13 @@ echo "+ corrupt dir"
 _scratch_xfs_db -x -c "inode ${inode}" -c "dblock ${leaf_lblk}" -c "stack" -c "blocktrash -x 32 -y $((blksz * 8)) -z ${FUZZ_ARGS}" >> $seqres.full
 
 echo "+ mount image"
-_scratch_mount
+if _try_scratch_mount >> $seqres.full 2>&1; then
 
-echo "+ modify dir"
-rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
-mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
-umount "${SCRATCH_MNT}"
+	echo "+ modify dir"
+	rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
+	mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/102 b/tests/xfs/102
index 3d51c6a2..02bc35ca 100755
--- a/tests/xfs/102
+++ b/tests/xfs/102
@@ -87,12 +87,13 @@ while true; do
 done
 
 echo "+ mount image"
-_scratch_mount
+if _try_scratch_mount >> $seqres.full 2>&1; then
 
-echo "+ modify dir"
-rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
-mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
-umount "${SCRATCH_MNT}"
+	echo "+ modify dir"
+	rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
+	mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/105 b/tests/xfs/105
index fc91a4f5..c3a853b0 100755
--- a/tests/xfs/105
+++ b/tests/xfs/105
@@ -87,12 +87,13 @@ while true; do
 done
 
 echo "+ mount image"
-_scratch_mount
+if _try_scratch_mount >> $seqres.full 2>&1; then
 
-echo "+ modify dir"
-rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
-mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
-umount "${SCRATCH_MNT}"
+	echo "+ modify dir"
+	rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
+	mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/112 b/tests/xfs/112
index ae756845..cec3a168 100755
--- a/tests/xfs/112
+++ b/tests/xfs/112
@@ -87,12 +87,13 @@ while true; do
 done
 
 echo "+ mount image"
-_scratch_mount
+if _try_scratch_mount >> $seqres.full 2>&1; then
 
-echo "+ modify dir"
-rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
-mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
-umount "${SCRATCH_MNT}"
+	echo "+ modify dir"
+	rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
+	mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/113 b/tests/xfs/113
index c347db78..17af3b66 100755
--- a/tests/xfs/113
+++ b/tests/xfs/113
@@ -87,12 +87,13 @@ while true; do
 done
 
 echo "+ mount image"
-_scratch_mount
+if _try_scratch_mount >> $seqres.full 2>&1; then
 
-echo "+ modify dir"
-rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
-mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
-umount "${SCRATCH_MNT}"
+	echo "+ modify dir"
+	rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
+	mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/117 b/tests/xfs/117
index f0b95aa1..31eac295 100755
--- a/tests/xfs/117
+++ b/tests/xfs/117
@@ -90,18 +90,19 @@ seq "${inode}" "$((inode + 64))" | while read ino; do
 done
 
 echo "+ mount image"
-_scratch_mount
-
-echo "+ modify files"
-broken=0
-for x in `seq 1 64`; do
-	stat "${TESTFILE}.${x}" >> $seqres.full 2>&1
-	test $? -ne 0 && broken=1
-	touch "${TESTFILE}.${x}" >> $seqres.full 2>&1
-	test $? -ne 0 && broken=1
-done
-echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+if _try_scratch_mount >> $seqres.full 2>&1; then
+
+	echo "+ modify files"
+	broken=0
+	for x in `seq 1 64`; do
+		stat "${TESTFILE}.${x}" >> $seqres.full 2>&1
+		test $? -ne 0 && broken=1
+		touch "${TESTFILE}.${x}" >> $seqres.full 2>&1
+		test $? -ne 0 && broken=1
+	done
+	echo "broken: ${broken}"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/120 b/tests/xfs/120
index 5a38000c..39c41d98 100755
--- a/tests/xfs/120
+++ b/tests/xfs/120
@@ -79,14 +79,15 @@ echo "+ corrupt image"
 _scratch_xfs_db -x -c "inode ${inode}" -c "addr u.bmbt.ptrs[1]" -c "addr u3.bmbt.ptrs[1]" -c "stack" -c "blocktrash -x 32 -y $((blksz * 8)) -z ${FUZZ_ARGS}" >> $seqres.full
 
 echo "+ mount image"
-_scratch_mount
-
-echo "+ modify files"
-before="$(stat -c '%b' "${SCRATCH_MNT}/bigfile")"
-$XFS_IO_PROG -f -c "pwrite -S 0x62 ${blksz} ${blksz}" -c 'fsync' "${SCRATCH_MNT}/bigfile" >> $seqres.full 2> /dev/null
-after="$(stat -c '%b' "${SCRATCH_MNT}/bigfile")"
-test "${before}" -eq "${after}" || _fail "pwrite should fail on corrupt bmbt"
-umount "${SCRATCH_MNT}"
+if _try_scratch_mount >> $seqres.full 2>&1; then
+
+	echo "+ modify files"
+	before="$(stat -c '%b' "${SCRATCH_MNT}/bigfile")"
+	$XFS_IO_PROG -f -c "pwrite -S 0x62 ${blksz} ${blksz}" -c 'fsync' "${SCRATCH_MNT}/bigfile" >> $seqres.full 2> /dev/null
+	after="$(stat -c '%b' "${SCRATCH_MNT}/bigfile")"
+	test "${before}" -eq "${after}" || _fail "pwrite should fail on corrupt bmbt"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/123 b/tests/xfs/123
index 7355e86a..2640d675 100755
--- a/tests/xfs/123
+++ b/tests/xfs/123
@@ -78,9 +78,10 @@ echo "+ corrupt image"
 _scratch_xfs_db -x -c "inode ${inode}" -c "dblock 0" -c "stack" -c "blocktrash -x 32 -o 256 -y $((blksz * 8)) -z ${FUZZ_ARGS}" >> $seqres.full
 
 echo "+ mount image"
-_scratch_mount
-cat "${SCRATCH_MNT}/long_symlink" 2>/dev/null && _fail "symlink should be broken"
-umount "${SCRATCH_MNT}"
+if _try_scratch_mount >> $seqres.full 2>&1; then
+	cat "${SCRATCH_MNT}/long_symlink" 2>/dev/null && _fail "symlink should be broken"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/124 b/tests/xfs/124
index a828dd6b..742ef75a 100755
--- a/tests/xfs/124
+++ b/tests/xfs/124
@@ -87,11 +87,12 @@ echo "+ corrupt xattr"
 _scratch_xfs_db -x -c "inode ${inode}" -c 'ablock 0' -c "stack" -c "blocktrash -x 32 -y $((blksz * 8)) -z ${FUZZ_ARGS}" >> $seqres.full
 
 echo "+ mount image"
-_scratch_mount
+if _try_scratch_mount >> $seqres.full 2>&1; then
 
-echo "+ modify xattr"
-setfattr -x "user.x00000000" "${SCRATCH_MNT}/attrfile" 2> /dev/null && _fail "modified corrupt xattr"
-umount "${SCRATCH_MNT}"
+	echo "+ modify xattr"
+	setfattr -x "user.x00000000" "${SCRATCH_MNT}/attrfile" 2> /dev/null && _fail "modified corrupt xattr"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/125 b/tests/xfs/125
index 3afb4cc1..4ab0177d 100755
--- a/tests/xfs/125
+++ b/tests/xfs/125
@@ -87,11 +87,12 @@ echo "+ corrupt xattr"
 _scratch_xfs_db -x -c "inode ${inode}" -c 'ablock 0' -c "stack" -c "blocktrash -x 32 -o +32 -y $((blksz * 8)) -z ${FUZZ_ARGS}" >> $seqres.full
 
 echo "+ mount image"
-_scratch_mount
+if _try_scratch_mount >> $seqres.full 2>&1; then
 
-echo "+ modify xattr"
-setfattr -x "user.x00000000" "${SCRATCH_MNT}/attrfile" 2> /dev/null && _fail "modified corrupt xattr"
-umount "${SCRATCH_MNT}"
+	echo "+ modify xattr"
+	setfattr -x "user.x00000000" "${SCRATCH_MNT}/attrfile" 2> /dev/null && _fail "modified corrupt xattr"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/126 b/tests/xfs/126
index d696ff1f..de6e2fdb 100755
--- a/tests/xfs/126
+++ b/tests/xfs/126
@@ -92,11 +92,12 @@ while true; do
 done
 
 echo "+ mount image"
-_scratch_mount
+if _try_scratch_mount >> $seqres.full 2>&1; then
 
-echo "+ modify xattr"
-setfattr -x "user.x00000000" "${SCRATCH_MNT}/attrfile" 2> /dev/null && _fail "modified corrupt xattr"
-umount "${SCRATCH_MNT}"
+	echo "+ modify xattr"
+	setfattr -x "user.x00000000" "${SCRATCH_MNT}/attrfile" 2> /dev/null && _fail "modified corrupt xattr"
+	umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1
diff --git a/tests/xfs/235 b/tests/xfs/235
index 88101f2d..84725b0a 100755
--- a/tests/xfs/235
+++ b/tests/xfs/235
@@ -77,12 +77,13 @@ seq 0 $((agcount - 1)) | while read ag; do
 done
 
 echo "+ mount image"
-_scratch_mount
+if _try_scratch_mount >> $seqres.full 2>&1; then
 
-echo "+ copy more"
-$XFS_IO_PROG -f -c "pwrite -S 0x63 0 $((blksz * 64))" -c "fsync" ${SCRATCH_MNT}/file4 >> $seqres.full 2>&1
-test -s ${SCRATCH_MNT}/file4 && _fail "should not be able to copy with busted rmap btree"
-umount ${SCRATCH_MNT}
+	echo "+ copy more"
+	$XFS_IO_PROG -f -c "pwrite -S 0x63 0 $((blksz * 64))" -c "fsync" ${SCRATCH_MNT}/file4 >> $seqres.full 2>&1
+	test -s ${SCRATCH_MNT}/file4 && _fail "should not be able to copy with busted rmap btree"
+	umount ${SCRATCH_MNT}
+fi
 
 echo "+ repair fs"
 _disable_dmesg_check
diff --git a/tests/xfs/337 b/tests/xfs/337
index b61e7226..851b6439 100755
--- a/tests/xfs/337
+++ b/tests/xfs/337
@@ -85,12 +85,13 @@ _scratch_xfs_db -x -c "sb" -c "addr rrmapino" -c "addr u3.rtrmapbt.ptrs[1]" \
 	>> $seqres.full 2>&1
 
 echo "+ mount image"
-_scratch_mount
+if _try_scratch_mount >> $seqres.full 2>&1; then
 
-echo "+ copy more"
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 1" $SCRATCH_MNT/e3 >> $seqres.full 2>&1
-test -s ${SCRATCH_MNT}/f3 && echo "should not be able to copy with busted rtrmap btree"
-_scratch_unmount
+	echo "+ copy more"
+	$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 1" $SCRATCH_MNT/e3 >> $seqres.full 2>&1
+	test -s ${SCRATCH_MNT}/f3 && echo "should not be able to copy with busted rtrmap btree"
+	_scratch_unmount
+fi
 
 echo "+ repair fs"
 _repair_scratch_fs >> $seqres.full 2>&1


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

* Re: [PATCH 1/9] generic: test XATTR_REPLACE doesn't take the fs down
  2018-05-01 15:39 ` [PATCH 1/9] generic: test XATTR_REPLACE doesn't take the fs down Darrick J. Wong
@ 2018-05-02  7:33   ` Eryu Guan
  2018-05-02 14:50     ` Darrick J. Wong
  0 siblings, 1 reply; 21+ messages in thread
From: Eryu Guan @ 2018-05-02  7:33 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs, fstests, kanda.motohiro

On Tue, May 01, 2018 at 08:39:26AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Kanda Motohiro reported that expanding a tiny xattr into a large xattr
> fails on XFS because we remove the tiny xattr from a shortform fork and
> then try to re-add it after converting the fork to extents format having
> not removed the ATTR_REPLACE flag.  This fails because the attr is no
> longer present, causing a fs shutdown.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199119
> Reported-by: kanda.motohiro@gmail.com
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Thanks for the revision! Because I found more issues in v1 than I
expected, so I drop the patch from last fstests update. I should have
made that clear..

> ---
>  .gitignore              |    1 +
>  src/Makefile            |    3 +-
>  src/attr_replace_test.c |   60 +++++++++++++++++++++++++++++++++++++++++
>  tests/generic/706       |   68 +++++++++++++++++++++++++++++++++++++++++++++++
>  tests/generic/706.out   |    2 +
>  tests/generic/group     |    1 +
>  6 files changed, 134 insertions(+), 1 deletion(-)
>  create mode 100644 src/attr_replace_test.c
>  create mode 100755 tests/generic/706
>  create mode 100644 tests/generic/706.out
> 
> 
> diff --git a/.gitignore b/.gitignore
> index 192ca35e..af9743f9 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -53,6 +53,7 @@
>  /src/append_reader
>  /src/append_writer
>  /src/attr-list-by-handle-cursor-test
> +/src/attr_replace_test

Seems this should be put before attr-list-by-handle-cursor-test,
according to the result of sort.

>  /src/bstat
>  /src/bulkstat_unlink_test
>  /src/bulkstat_unlink_test_modified
> diff --git a/src/Makefile b/src/Makefile
> index 6ca56366..c42d3bb1 100644
> --- a/src/Makefile
> +++ b/src/Makefile
> @@ -25,7 +25,8 @@ LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \
>  	seek_copy_test t_readdir_1 t_readdir_2 fsync-tester nsexec cloner \
>  	renameat2 t_getcwd e4compact test-nextquota punch-alternating \
>  	attr-list-by-handle-cursor-test listxattr dio-interleaved t_dir_type \
> -	dio-invalidate-cache stat_test t_encrypted_d_revalidate
> +	dio-invalidate-cache stat_test t_encrypted_d_revalidate \
> +	attr_replace_test
>  
>  SUBDIRS = log-writes perf
>  
> diff --git a/src/attr_replace_test.c b/src/attr_replace_test.c
> new file mode 100644
> index 00000000..c870d165
> --- /dev/null
> +++ b/src/attr_replace_test.c
> @@ -0,0 +1,60 @@
> +// setattr.c by kanda.motohiro@gmail.com
> +// xfs extended attribute corruption bug reproducer
> +#include <stdio.h>
> +#include <string.h>
> +#include <fcntl.h>
> +#include <errno.h>
> +#include <stdlib.h>
> +#include <unistd.h>
> +#include <sys/types.h>
> +#include <sys/xattr.h>
> +#include <sys/stat.h>
> +
> +#define die() do { perror(""); \
> +fprintf(stderr, "error=%d at line %d\n", errno, __LINE__); \
> +exit(1); } while (0)
> +
> +int main(int argc, char *argv[])
> +{
> +	int ret;
> +	int fd;
> +	char *path;
> +	char *name = "user.world";
> +	char *value;
> +	struct stat sbuf;
> +	size_t size = sizeof(value);
> +
> +	if (argc != 2) die();

die() doesn't seem like the right thing to do (and some other places),
it'll print something like:

Success
error=0 at line NN

I'd define a new "fail()" macro and use it where appropriate.

+#define fail(...) do { \
+fprintf(stderr, __VA_ARGS__); exit (1); \
+} while (0)

I can fix the minor issues on commit, for real this time :)

Thanks,
Eryu

> +	path = argv[1];
> +
> +	fd = open(path, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
> +	if (fd < 0) die();
> +
> +	/*
> +	 * The value should be 3/4 the size of a fs block to ensure that we
> +	 * get to extents format.
> +	 */
> +	ret = fstat(fd, &sbuf);
> +	if (ret < 0) die();
> +	size = sbuf.st_blksize * 3 / 4;
> +	if (!size) die();
> +	value = malloc(size);
> +	if (!value) die();
> +
> +	// First, create a small xattr.
> +	memset(value, '0', 1);
> +	ret = fsetxattr(fd, name, value, 1, XATTR_CREATE);
> +	if (ret < 0) die();
> +	close(fd);
> +
> +	fd = open(path, O_RDWR);
> +	if (fd < 0) die();
> +
> +	// Then, replace it with bigger one, forcing short form to leaf conversion.
> +	memset(value, '1', size);
> +	ret = fsetxattr(fd, name, value, size, XATTR_REPLACE);
> +	if (ret < 0) die();
> +	close(fd);
> +
> +	return 0;
> +}
> diff --git a/tests/generic/706 b/tests/generic/706
> new file mode 100755
> index 00000000..9f98c3b1
> --- /dev/null
> +++ b/tests/generic/706
> @@ -0,0 +1,68 @@
> +#! /bin/bash
> +# FS QA Test No. 706
> +#
> +# Ensure that we can XATTR_REPLACE a tiny attr into a large attr.
> +# Kanda Motohiro <kanda.motohiro@gmail.com> reports that XATTR_REPLACE'ing
> +# a single-byte attr with a 2048-byte attr causes a fs shutdown because we
> +# remove the shortform attr, convert the attr fork to long format, and then
> +# try to re-add the attr having not cleared ATTR_REPLACE.
> +#
> +#-----------------------------------------------------------------------
> +# Copyright (c) 2018 Oracle.  All Rights Reserved.
> +#
> +# This program is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU General Public License as
> +# published by the Free Software Foundation.
> +#
> +# This program is distributed in the hope that it would be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write the Free Software Foundation,
> +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> +#
> +#-----------------------------------------------------------------------
> +
> +seq=`basename $0`
> +seqres=$RESULT_DIR/$seq
> +echo "QA output created by $seq"
> +
> +status=1	# failure is the default!
> +trap "_cleanup; exit \$status" 0 1 2 3 15
> +
> +_cleanup()
> +{
> +	cd /
> +	rm -f $testfile
> +}
> +
> +# get standard environment, filters and checks
> +. ./common/rc
> +. ./common/filter
> +. ./common/attr
> +
> +# remove previous $seqres.full before test
> +rm -f $seqres.full
> +
> +# real QA test starts here
> +_supported_fs generic
> +_supported_os Linux
> +_require_test_program "attr_replace_test"
> +_require_attrs
> +_require_scratch
> +
> +rm -f $seqres.full
> +_scratch_mkfs >>$seqres.full 2>&1
> +_scratch_mount >>$seqres.full 2>&1
> +
> +filter_attr_output() {
> +	_filter_scratch | sed -e 's/has a [0-9]* byte value/has a NNNN byte value/g'
> +}
> +
> +./src/attr_replace_test $SCRATCH_MNT/hello
> +$ATTR_PROG -l $SCRATCH_MNT/hello | filter_attr_output
> +
> +status=0
> +exit
> diff --git a/tests/generic/706.out b/tests/generic/706.out
> new file mode 100644
> index 00000000..61c8419a
> --- /dev/null
> +++ b/tests/generic/706.out
> @@ -0,0 +1,2 @@
> +QA output created by 706
> +Attribute "world" has a NNNN byte value for SCRATCH_MNT/hello
> diff --git a/tests/generic/group b/tests/generic/group
> index 19be9267..54a85ea0 100644
> --- a/tests/generic/group
> +++ b/tests/generic/group
> @@ -487,3 +487,4 @@
>  482 auto metadata replay
>  483 auto quick log metadata
>  484 auto quick
> +706 auto quick attr
> 

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

* Re: [PATCH 2/9] xfs/439: repair corrupted filesystem afterwards
  2018-05-01 15:39 ` [PATCH 2/9] xfs/439: repair corrupted filesystem afterwards Darrick J. Wong
@ 2018-05-02  7:51   ` Eryu Guan
  2018-05-02 14:54     ` Darrick J. Wong
  0 siblings, 1 reply; 21+ messages in thread
From: Eryu Guan @ 2018-05-02  7:51 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs, fstests

On Tue, May 01, 2018 at 08:39:32AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> After we mess with logsunit and test that we can't mount the fs, repair
> the filesystem to make sure that repair can deal with it.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  tests/xfs/439 |    1 +
>  1 file changed, 1 insertion(+)
> 
> 
> diff --git a/tests/xfs/439 b/tests/xfs/439
> index 215c4b90..9d5f6892 100755
> --- a/tests/xfs/439
> +++ b/tests/xfs/439
> @@ -79,6 +79,7 @@ fi
>  _check_dmesg _filter_assert_dmesg
>  
>  echo "Silence is golden"
> +_scratch_xfs_repair >> $seqres.full 2>&1

But how should we check if repair does fix the corruption? I tried
adding a "scratch_mount" after the repair and expected a success mount.
But that mount also failed, and repair didn't report anything wrong in
$seqres.full. Looks like the corruption was not detected nor repaired.

[ 8278.679149] XFS (dm-1): Mounting V5 Filesystem
[ 8278.679743] XFS (dm-1): log stripe unit 4095 bytes must be a multiple of block size
[ 8278.680583] XFS (dm-1): AAIEEE! Log failed size checks. Abort!
[ 8278.681817] XFS (dm-1): log mount failed

Note that I was using latest for-next branch of xfsprogs.

Thanks,
Eryu

>  
>  # success, all done
>  status=0
> 

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

* Re: [PATCH 7/9] xfs/422: add fsstress to the freeze-and-rmap-repair race test
  2018-05-01 15:40 ` [PATCH 7/9] xfs/422: add fsstress to the freeze-and-rmap-repair race test Darrick J. Wong
@ 2018-05-02  8:44   ` Eryu Guan
  2018-05-02 14:55     ` Darrick J. Wong
  0 siblings, 1 reply; 21+ messages in thread
From: Eryu Guan @ 2018-05-02  8:44 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs, fstests

On Tue, May 01, 2018 at 08:40:03AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Add fsstress to the pile of things that we race with rmap repair to
> ensure that the rmap repair isolates the filesystem correctly while it
> is doing its repairs.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  tests/xfs/422 |   19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 
> 
> diff --git a/tests/xfs/422 b/tests/xfs/422
> index a8fa5d5a..b2db713c 100755
> --- a/tests/xfs/422
> +++ b/tests/xfs/422
> @@ -51,6 +51,8 @@ _supported_fs xfs
>  _require_xfs_scratch_rmapbt
>  _require_xfs_io_command "scrub"
>  _require_xfs_io_error_injection "force_repair"
> +_require_command "$KILLALL_PROG" killall
> +_require_command "$FSSTRESS_PROG" fsstress

This is not needed, as we already have

export FSSTRESS_PROG="./ltp/fsstress"                                                                                                                                                          
[ ! -x $FSSTRESS_PROG ] && _fatal "fsstress not found or executable"

in common/config. I can remove it on commit.

Thanks,
Eryu

>  
>  echo "Format and populate"
>  _scratch_mkfs > "$seqres.full" 2>&1
> @@ -89,18 +91,33 @@ repair_loop() {
>  		$XFS_IO_PROG -x -c 'repair rmapbt 0' -c 'repair rmapbt 1' $SCRATCH_MNT 2>&1 | filter_output
>  	done
>  }
> +stress_loop() {
> +	end="$1"
> +
> +	FSSTRESS_ARGS=$(_scale_fsstress_args -p 4 -d $SCRATCH_MNT -n 2000 $FSSTRESS_AVOID)
> +	while [ "$(date +%s)" -lt $end ]; do
> +		$FSSTRESS_PROG $FSSTRESS_ARGS >> $seqres.full
> +	done
> +}
>  $XFS_IO_PROG -x -c 'inject force_repair' $SCRATCH_MNT
>  
>  start=$(date +%s)
>  end=$((start + (30 * TIME_FACTOR) ))
>  
>  echo "Loop started at $(date --date="@${start}"), ending at $(date --date="@${end}")" >> $seqres.full
> +stress_loop $end &
>  freeze_loop $end &
>  repair_loop $end &
>  
> -while [ "$(date +%s)" -lt $end ]; do
> +# Wait until 2 seconds after the loops should have finished...
> +while [ "$(date +%s)" -lt $((end + 2)) ]; do
>  	sleep 1
>  done
> +
> +# ...and clean up after the loops in case they didn't do it themselves.
> +$KILLALL_PROG -TERM xfs_io fsstress >> $seqres.full 2>&1
> +$XFS_IO_PROG -x -c 'thaw' $SCRATCH_MNT >> $seqres.full 2>&1
> +
>  echo "Loop finished at $(date)" >> $seqres.full
>  echo "Test done"
>  
> 

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

* Re: [PATCH 8/9] xfs: checkbashisms in all script files
  2018-05-01 15:40 ` [PATCH 8/9] xfs: checkbashisms in all script files Darrick J. Wong
@ 2018-05-02  8:55   ` Eryu Guan
  2018-05-02  9:13     ` Jan Tulak
  2018-05-02 14:59     ` Darrick J. Wong
  2018-05-02 15:03   ` [PATCH v2 " Darrick J. Wong
  1 sibling, 2 replies; 21+ messages in thread
From: Eryu Guan @ 2018-05-02  8:55 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs, sandeen, fstests

On Tue, May 01, 2018 at 08:40:10AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Find all the /bin/sh scripts in xfsprogs and check for bashisms.
> 
> Cc: sandeen@sandeen.net
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Looks fine to me, but I'd like a review from Eric too, as it's a
"maintainer script" :)

> ---
>  tests/xfs/711     |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/xfs/711.out |    1 +
>  tests/xfs/group   |    1 +
>  3 files changed, 53 insertions(+)
>  create mode 100755 tests/xfs/711
>  create mode 100644 tests/xfs/711.out
> 
> 
> diff --git a/tests/xfs/711 b/tests/xfs/711
> new file mode 100755
> index 00000000..d3dc3cd4
> --- /dev/null
> +++ b/tests/xfs/711
> @@ -0,0 +1,51 @@
> +#! /bin/bash
> +# FS QA Test No. 711
> +#
> +# checkbashisms on all /bin/sh scripts.  This is a maintainer script.
> +#
> +#-----------------------------------------------------------------------
> +# Copyright (c) 2018 Oracle, Inc.
> +#
> +# This program is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU General Public License as
> +# published by the Free Software Foundation.
> +#
> +# This program is distributed in the hope that it would be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write the Free Software Foundation,
> +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> +#
> +#-----------------------------------------------------------------------
> +#
> +
> +seq=`basename $0`
> +seqres=$RESULT_DIR/$seq
> +echo "QA output created by $seq"
> +
> +here=`pwd`
> +tmp=/tmp/$$
> +status=1	# failure is the default!
> +trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
> +
> +# get standard environment
> +. ./common/rc
> +
> +# real QA test starts here
> +_supported_fs xfs
> +_supported_os Linux
> +export CHECKBASHISMS_PROG="`set_prog_path checkbashisms`"
> +_require_command "$CHECKBASHISMS_PROG" checkbashisms
> +
> +test -z "$WORKAREA" && _notrun "Can't find xfsprogs source"
> +
> +rm -f $seqres.full
> +
> +find $WORKAREA -name 'xfs*.sh' -print0 | xargs -0 grep '^#!/bin/sh' | sed -e 's/:.*$//g' | while read f; do

Do we care about spaces between "#!" and "/bin/sh"? i.e. "#! /bin/sh",
sometimes there can be space(s).

Thanks,
Eryu

> +	$CHECKBASHISMS_PROG $f
> +done
> +
> +status=0
> diff --git a/tests/xfs/711.out b/tests/xfs/711.out
> new file mode 100644
> index 00000000..52ff4745
> --- /dev/null
> +++ b/tests/xfs/711.out
> @@ -0,0 +1 @@
> +QA output created by 711
> diff --git a/tests/xfs/group b/tests/xfs/group
> index 39e259e8..b7da3fba 100644
> --- a/tests/xfs/group
> +++ b/tests/xfs/group
> @@ -443,3 +443,4 @@
>  443 auto quick ioctl fsr
>  444 auto quick
>  445 auto quick filestreams
> +711 auto quick
> 

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

* Re: [PATCH 8/9] xfs: checkbashisms in all script files
  2018-05-02  8:55   ` Eryu Guan
@ 2018-05-02  9:13     ` Jan Tulak
  2018-05-02 14:59     ` Darrick J. Wong
  1 sibling, 0 replies; 21+ messages in thread
From: Jan Tulak @ 2018-05-02  9:13 UTC (permalink / raw)
  To: Eryu Guan; +Cc: Darrick J. Wong, linux-xfs, Eric Sandeen, fstests

On Wed, May 2, 2018 at 10:55 AM, Eryu Guan <guaneryu@gmail.com> wrote:
> On Tue, May 01, 2018 at 08:40:10AM -0700, Darrick J. Wong wrote:
>> From: Darrick J. Wong <darrick.wong@oracle.com>
>>
>> Find all the /bin/sh scripts in xfsprogs and check for bashisms.
>>
>> Cc: sandeen@sandeen.net
>> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
>
> Looks fine to me, but I'd like a review from Eric too, as it's a
> "maintainer script" :)
>

A good idea, looks generally ok to me (and now we really wait for Eric).

[snip]
>> +
>> +find $WORKAREA -name 'xfs*.sh' -print0 | xargs -0 grep '^#!/bin/sh' | sed -e 's/:.*$//g' | while read f; do
>
> Do we care about spaces between "#!" and "/bin/sh"? i.e. "#! /bin/sh",
> sometimes there can be space(s).
>

As far as I know, spaces are completely OK and allowed and accepted
everywhere, so I would add them here too.

Jan

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

* Re: [PATCH 1/9] generic: test XATTR_REPLACE doesn't take the fs down
  2018-05-02  7:33   ` Eryu Guan
@ 2018-05-02 14:50     ` Darrick J. Wong
  0 siblings, 0 replies; 21+ messages in thread
From: Darrick J. Wong @ 2018-05-02 14:50 UTC (permalink / raw)
  To: Eryu Guan; +Cc: linux-xfs, fstests, kanda.motohiro

On Wed, May 02, 2018 at 03:33:25PM +0800, Eryu Guan wrote:
> On Tue, May 01, 2018 at 08:39:26AM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > Kanda Motohiro reported that expanding a tiny xattr into a large xattr
> > fails on XFS because we remove the tiny xattr from a shortform fork and
> > then try to re-add it after converting the fork to extents format having
> > not removed the ATTR_REPLACE flag.  This fails because the attr is no
> > longer present, causing a fs shutdown.
> > 
> > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199119
> > Reported-by: kanda.motohiro@gmail.com
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Thanks for the revision! Because I found more issues in v1 than I
> expected, so I drop the patch from last fstests update. I should have
> made that clear..

No worries, I was at LSF last week and probably should've sent a "there
are enough bugs in this thing that I'll resend later" message.

> > ---
> >  .gitignore              |    1 +
> >  src/Makefile            |    3 +-
> >  src/attr_replace_test.c |   60 +++++++++++++++++++++++++++++++++++++++++
> >  tests/generic/706       |   68 +++++++++++++++++++++++++++++++++++++++++++++++
> >  tests/generic/706.out   |    2 +
> >  tests/generic/group     |    1 +
> >  6 files changed, 134 insertions(+), 1 deletion(-)
> >  create mode 100644 src/attr_replace_test.c
> >  create mode 100755 tests/generic/706
> >  create mode 100644 tests/generic/706.out
> > 
> > 
> > diff --git a/.gitignore b/.gitignore
> > index 192ca35e..af9743f9 100644
> > --- a/.gitignore
> > +++ b/.gitignore
> > @@ -53,6 +53,7 @@
> >  /src/append_reader
> >  /src/append_writer
> >  /src/attr-list-by-handle-cursor-test
> > +/src/attr_replace_test
> 
> Seems this should be put before attr-list-by-handle-cursor-test,
> according to the result of sort.

Oops, yeah.  Do you mind fixing this on the way in?

> >  /src/bstat
> >  /src/bulkstat_unlink_test
> >  /src/bulkstat_unlink_test_modified
> > diff --git a/src/Makefile b/src/Makefile
> > index 6ca56366..c42d3bb1 100644
> > --- a/src/Makefile
> > +++ b/src/Makefile
> > @@ -25,7 +25,8 @@ LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \
> >  	seek_copy_test t_readdir_1 t_readdir_2 fsync-tester nsexec cloner \
> >  	renameat2 t_getcwd e4compact test-nextquota punch-alternating \
> >  	attr-list-by-handle-cursor-test listxattr dio-interleaved t_dir_type \
> > -	dio-invalidate-cache stat_test t_encrypted_d_revalidate
> > +	dio-invalidate-cache stat_test t_encrypted_d_revalidate \
> > +	attr_replace_test
> >  
> >  SUBDIRS = log-writes perf
> >  
> > diff --git a/src/attr_replace_test.c b/src/attr_replace_test.c
> > new file mode 100644
> > index 00000000..c870d165
> > --- /dev/null
> > +++ b/src/attr_replace_test.c
> > @@ -0,0 +1,60 @@
> > +// setattr.c by kanda.motohiro@gmail.com
> > +// xfs extended attribute corruption bug reproducer
> > +#include <stdio.h>
> > +#include <string.h>
> > +#include <fcntl.h>
> > +#include <errno.h>
> > +#include <stdlib.h>
> > +#include <unistd.h>
> > +#include <sys/types.h>
> > +#include <sys/xattr.h>
> > +#include <sys/stat.h>
> > +
> > +#define die() do { perror(""); \
> > +fprintf(stderr, "error=%d at line %d\n", errno, __LINE__); \
> > +exit(1); } while (0)
> > +
> > +int main(int argc, char *argv[])
> > +{
> > +	int ret;
> > +	int fd;
> > +	char *path;
> > +	char *name = "user.world";
> > +	char *value;
> > +	struct stat sbuf;
> > +	size_t size = sizeof(value);
> > +
> > +	if (argc != 2) die();
> 
> die() doesn't seem like the right thing to do (and some other places),
> it'll print something like:
> 
> Success
> error=0 at line NN
> 
> I'd define a new "fail()" macro and use it where appropriate.
> 
> +#define fail(...) do { \
> +fprintf(stderr, __VA_ARGS__); exit (1); \
> +} while (0)
> 
> I can fix the minor issues on commit, for real this time :)

Ok.

> Thanks,
> Eryu
> 
> > +	path = argv[1];
> > +
> > +	fd = open(path, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
> > +	if (fd < 0) die();
> > +
> > +	/*
> > +	 * The value should be 3/4 the size of a fs block to ensure that we
> > +	 * get to extents format.
> > +	 */
> > +	ret = fstat(fd, &sbuf);
> > +	if (ret < 0) die();
> > +	size = sbuf.st_blksize * 3 / 4;
> > +	if (!size) die();

fail() here too, if you're fixing this up.

--D

> > +	value = malloc(size);
> > +	if (!value) die();
> > +
> > +	// First, create a small xattr.
> > +	memset(value, '0', 1);
> > +	ret = fsetxattr(fd, name, value, 1, XATTR_CREATE);
> > +	if (ret < 0) die();
> > +	close(fd);
> > +
> > +	fd = open(path, O_RDWR);
> > +	if (fd < 0) die();
> > +
> > +	// Then, replace it with bigger one, forcing short form to leaf conversion.
> > +	memset(value, '1', size);
> > +	ret = fsetxattr(fd, name, value, size, XATTR_REPLACE);
> > +	if (ret < 0) die();
> > +	close(fd);
> > +
> > +	return 0;
> > +}
> > diff --git a/tests/generic/706 b/tests/generic/706
> > new file mode 100755
> > index 00000000..9f98c3b1
> > --- /dev/null
> > +++ b/tests/generic/706
> > @@ -0,0 +1,68 @@
> > +#! /bin/bash
> > +# FS QA Test No. 706
> > +#
> > +# Ensure that we can XATTR_REPLACE a tiny attr into a large attr.
> > +# Kanda Motohiro <kanda.motohiro@gmail.com> reports that XATTR_REPLACE'ing
> > +# a single-byte attr with a 2048-byte attr causes a fs shutdown because we
> > +# remove the shortform attr, convert the attr fork to long format, and then
> > +# try to re-add the attr having not cleared ATTR_REPLACE.
> > +#
> > +#-----------------------------------------------------------------------
> > +# Copyright (c) 2018 Oracle.  All Rights Reserved.
> > +#
> > +# This program is free software; you can redistribute it and/or
> > +# modify it under the terms of the GNU General Public License as
> > +# published by the Free Software Foundation.
> > +#
> > +# This program is distributed in the hope that it would be useful,
> > +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > +# GNU General Public License for more details.
> > +#
> > +# You should have received a copy of the GNU General Public License
> > +# along with this program; if not, write the Free Software Foundation,
> > +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> > +#
> > +#-----------------------------------------------------------------------
> > +
> > +seq=`basename $0`
> > +seqres=$RESULT_DIR/$seq
> > +echo "QA output created by $seq"
> > +
> > +status=1	# failure is the default!
> > +trap "_cleanup; exit \$status" 0 1 2 3 15
> > +
> > +_cleanup()
> > +{
> > +	cd /
> > +	rm -f $testfile
> > +}
> > +
> > +# get standard environment, filters and checks
> > +. ./common/rc
> > +. ./common/filter
> > +. ./common/attr
> > +
> > +# remove previous $seqres.full before test
> > +rm -f $seqres.full
> > +
> > +# real QA test starts here
> > +_supported_fs generic
> > +_supported_os Linux
> > +_require_test_program "attr_replace_test"
> > +_require_attrs
> > +_require_scratch
> > +
> > +rm -f $seqres.full
> > +_scratch_mkfs >>$seqres.full 2>&1
> > +_scratch_mount >>$seqres.full 2>&1
> > +
> > +filter_attr_output() {
> > +	_filter_scratch | sed -e 's/has a [0-9]* byte value/has a NNNN byte value/g'
> > +}
> > +
> > +./src/attr_replace_test $SCRATCH_MNT/hello
> > +$ATTR_PROG -l $SCRATCH_MNT/hello | filter_attr_output
> > +
> > +status=0
> > +exit
> > diff --git a/tests/generic/706.out b/tests/generic/706.out
> > new file mode 100644
> > index 00000000..61c8419a
> > --- /dev/null
> > +++ b/tests/generic/706.out
> > @@ -0,0 +1,2 @@
> > +QA output created by 706
> > +Attribute "world" has a NNNN byte value for SCRATCH_MNT/hello
> > diff --git a/tests/generic/group b/tests/generic/group
> > index 19be9267..54a85ea0 100644
> > --- a/tests/generic/group
> > +++ b/tests/generic/group
> > @@ -487,3 +487,4 @@
> >  482 auto metadata replay
> >  483 auto quick log metadata
> >  484 auto quick
> > +706 auto quick attr
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 2/9] xfs/439: repair corrupted filesystem afterwards
  2018-05-02  7:51   ` Eryu Guan
@ 2018-05-02 14:54     ` Darrick J. Wong
  2018-05-03  1:15       ` Eryu Guan
  0 siblings, 1 reply; 21+ messages in thread
From: Darrick J. Wong @ 2018-05-02 14:54 UTC (permalink / raw)
  To: Eryu Guan; +Cc: linux-xfs, fstests

On Wed, May 02, 2018 at 03:51:45PM +0800, Eryu Guan wrote:
> On Tue, May 01, 2018 at 08:39:32AM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > After we mess with logsunit and test that we can't mount the fs, repair
> > the filesystem to make sure that repair can deal with it.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> >  tests/xfs/439 |    1 +
> >  1 file changed, 1 insertion(+)
> > 
> > 
> > diff --git a/tests/xfs/439 b/tests/xfs/439
> > index 215c4b90..9d5f6892 100755
> > --- a/tests/xfs/439
> > +++ b/tests/xfs/439
> > @@ -79,6 +79,7 @@ fi
> >  _check_dmesg _filter_assert_dmesg
> >  
> >  echo "Silence is golden"
> > +_scratch_xfs_repair >> $seqres.full 2>&1
> 
> But how should we check if repair does fix the corruption? I tried
> adding a "scratch_mount" after the repair and expected a success mount.
> But that mount also failed, and repair didn't report anything wrong in
> $seqres.full. Looks like the corruption was not detected nor repaired.
> 
> [ 8278.679149] XFS (dm-1): Mounting V5 Filesystem
> [ 8278.679743] XFS (dm-1): log stripe unit 4095 bytes must be a multiple of block size
> [ 8278.680583] XFS (dm-1): AAIEEE! Log failed size checks. Abort!
> [ 8278.681817] XFS (dm-1): log mount failed
> 
> Note that I was using latest for-next branch of xfsprogs.

Aha!  This depends on "xfs_repair: validate some of the log space
information" which is still out for review for xfs_repair 4.17.  We can
drop this for now.  I'll add a _scratch_mount at the end before I
resubmit this patch.

--D

> Thanks,
> Eryu
> 
> >  
> >  # success, all done
> >  status=0
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 7/9] xfs/422: add fsstress to the freeze-and-rmap-repair race test
  2018-05-02  8:44   ` Eryu Guan
@ 2018-05-02 14:55     ` Darrick J. Wong
  0 siblings, 0 replies; 21+ messages in thread
From: Darrick J. Wong @ 2018-05-02 14:55 UTC (permalink / raw)
  To: Eryu Guan; +Cc: linux-xfs, fstests

On Wed, May 02, 2018 at 04:44:01PM +0800, Eryu Guan wrote:
> On Tue, May 01, 2018 at 08:40:03AM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > Add fsstress to the pile of things that we race with rmap repair to
> > ensure that the rmap repair isolates the filesystem correctly while it
> > is doing its repairs.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> >  tests/xfs/422 |   19 ++++++++++++++++++-
> >  1 file changed, 18 insertions(+), 1 deletion(-)
> > 
> > 
> > diff --git a/tests/xfs/422 b/tests/xfs/422
> > index a8fa5d5a..b2db713c 100755
> > --- a/tests/xfs/422
> > +++ b/tests/xfs/422
> > @@ -51,6 +51,8 @@ _supported_fs xfs
> >  _require_xfs_scratch_rmapbt
> >  _require_xfs_io_command "scrub"
> >  _require_xfs_io_error_injection "force_repair"
> > +_require_command "$KILLALL_PROG" killall
> > +_require_command "$FSSTRESS_PROG" fsstress
> 
> This is not needed, as we already have
> 
> export FSSTRESS_PROG="./ltp/fsstress"                                                                                                                                                          
> [ ! -x $FSSTRESS_PROG ] && _fatal "fsstress not found or executable"
> 
> in common/config. I can remove it on commit.

Ok, sounds good.  Thank you!

--D

> 
> Thanks,
> Eryu
> 
> >  
> >  echo "Format and populate"
> >  _scratch_mkfs > "$seqres.full" 2>&1
> > @@ -89,18 +91,33 @@ repair_loop() {
> >  		$XFS_IO_PROG -x -c 'repair rmapbt 0' -c 'repair rmapbt 1' $SCRATCH_MNT 2>&1 | filter_output
> >  	done
> >  }
> > +stress_loop() {
> > +	end="$1"
> > +
> > +	FSSTRESS_ARGS=$(_scale_fsstress_args -p 4 -d $SCRATCH_MNT -n 2000 $FSSTRESS_AVOID)
> > +	while [ "$(date +%s)" -lt $end ]; do
> > +		$FSSTRESS_PROG $FSSTRESS_ARGS >> $seqres.full
> > +	done
> > +}
> >  $XFS_IO_PROG -x -c 'inject force_repair' $SCRATCH_MNT
> >  
> >  start=$(date +%s)
> >  end=$((start + (30 * TIME_FACTOR) ))
> >  
> >  echo "Loop started at $(date --date="@${start}"), ending at $(date --date="@${end}")" >> $seqres.full
> > +stress_loop $end &
> >  freeze_loop $end &
> >  repair_loop $end &
> >  
> > -while [ "$(date +%s)" -lt $end ]; do
> > +# Wait until 2 seconds after the loops should have finished...
> > +while [ "$(date +%s)" -lt $((end + 2)) ]; do
> >  	sleep 1
> >  done
> > +
> > +# ...and clean up after the loops in case they didn't do it themselves.
> > +$KILLALL_PROG -TERM xfs_io fsstress >> $seqres.full 2>&1
> > +$XFS_IO_PROG -x -c 'thaw' $SCRATCH_MNT >> $seqres.full 2>&1
> > +
> >  echo "Loop finished at $(date)" >> $seqres.full
> >  echo "Test done"
> >  
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 8/9] xfs: checkbashisms in all script files
  2018-05-02  8:55   ` Eryu Guan
  2018-05-02  9:13     ` Jan Tulak
@ 2018-05-02 14:59     ` Darrick J. Wong
  1 sibling, 0 replies; 21+ messages in thread
From: Darrick J. Wong @ 2018-05-02 14:59 UTC (permalink / raw)
  To: Eryu Guan; +Cc: linux-xfs, sandeen, fstests

On Wed, May 02, 2018 at 04:55:03PM +0800, Eryu Guan wrote:
> On Tue, May 01, 2018 at 08:40:10AM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > Find all the /bin/sh scripts in xfsprogs and check for bashisms.
> > 
> > Cc: sandeen@sandeen.net
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Looks fine to me, but I'd like a review from Eric too, as it's a
> "maintainer script" :)
> 
> > ---
> >  tests/xfs/711     |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
> >  tests/xfs/711.out |    1 +
> >  tests/xfs/group   |    1 +
> >  3 files changed, 53 insertions(+)
> >  create mode 100755 tests/xfs/711
> >  create mode 100644 tests/xfs/711.out
> > 
> > 
> > diff --git a/tests/xfs/711 b/tests/xfs/711
> > new file mode 100755
> > index 00000000..d3dc3cd4
> > --- /dev/null
> > +++ b/tests/xfs/711
> > @@ -0,0 +1,51 @@
> > +#! /bin/bash
> > +# FS QA Test No. 711
> > +#
> > +# checkbashisms on all /bin/sh scripts.  This is a maintainer script.
> > +#
> > +#-----------------------------------------------------------------------
> > +# Copyright (c) 2018 Oracle, Inc.
> > +#
> > +# This program is free software; you can redistribute it and/or
> > +# modify it under the terms of the GNU General Public License as
> > +# published by the Free Software Foundation.
> > +#
> > +# This program is distributed in the hope that it would be useful,
> > +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > +# GNU General Public License for more details.
> > +#
> > +# You should have received a copy of the GNU General Public License
> > +# along with this program; if not, write the Free Software Foundation,
> > +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> > +#
> > +#-----------------------------------------------------------------------
> > +#
> > +
> > +seq=`basename $0`
> > +seqres=$RESULT_DIR/$seq
> > +echo "QA output created by $seq"
> > +
> > +here=`pwd`
> > +tmp=/tmp/$$
> > +status=1	# failure is the default!
> > +trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
> > +
> > +# get standard environment
> > +. ./common/rc
> > +
> > +# real QA test starts here
> > +_supported_fs xfs
> > +_supported_os Linux
> > +export CHECKBASHISMS_PROG="`set_prog_path checkbashisms`"
> > +_require_command "$CHECKBASHISMS_PROG" checkbashisms
> > +
> > +test -z "$WORKAREA" && _notrun "Can't find xfsprogs source"
> > +
> > +rm -f $seqres.full
> > +
> > +find $WORKAREA -name 'xfs*.sh' -print0 | xargs -0 grep '^#!/bin/sh' | sed -e 's/:.*$//g' | while read f; do
> 
> Do we care about spaces between "#!" and "/bin/sh"? i.e. "#! /bin/sh",
> sometimes there can be space(s).

Yes, I suppose we do care and should look for '^#!.*/bin/bash'.  I'll
also fix it to look only for files since that's all we care about.

--D

> Thanks,
> Eryu
> 
> > +	$CHECKBASHISMS_PROG $f
> > +done
> > +
> > +status=0
> > diff --git a/tests/xfs/711.out b/tests/xfs/711.out
> > new file mode 100644
> > index 00000000..52ff4745
> > --- /dev/null
> > +++ b/tests/xfs/711.out
> > @@ -0,0 +1 @@
> > +QA output created by 711
> > diff --git a/tests/xfs/group b/tests/xfs/group
> > index 39e259e8..b7da3fba 100644
> > --- a/tests/xfs/group
> > +++ b/tests/xfs/group
> > @@ -443,3 +443,4 @@
> >  443 auto quick ioctl fsr
> >  444 auto quick
> >  445 auto quick filestreams
> > +711 auto quick
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 8/9] xfs: checkbashisms in all script files
  2018-05-01 15:40 ` [PATCH 8/9] xfs: checkbashisms in all script files Darrick J. Wong
  2018-05-02  8:55   ` Eryu Guan
@ 2018-05-02 15:03   ` Darrick J. Wong
  1 sibling, 0 replies; 21+ messages in thread
From: Darrick J. Wong @ 2018-05-02 15:03 UTC (permalink / raw)
  To: sandeen; +Cc: linux-xfs, guaneryu, fstests

From: Darrick J. Wong <darrick.wong@oracle.com>

Find all the /bin/sh scripts in xfsprogs and check for bashisms.

Cc: sandeen@sandeen.net
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
v2: fix find and regex we look for
---
 tests/xfs/711     |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/711.out |    1 +
 tests/xfs/group   |    1 +
 3 files changed, 53 insertions(+)
 create mode 100755 tests/xfs/711
 create mode 100644 tests/xfs/711.out

diff --git a/tests/xfs/711 b/tests/xfs/711
new file mode 100755
index 00000000..d15f3b9d
--- /dev/null
+++ b/tests/xfs/711
@@ -0,0 +1,51 @@
+#! /bin/bash
+# FS QA Test No. 711
+#
+# checkbashisms on all /bin/sh scripts.  This is a maintainer script.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2018 Oracle, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+
+# get standard environment
+. ./common/rc
+
+# real QA test starts here
+_supported_fs xfs
+_supported_os Linux
+export CHECKBASHISMS_PROG="`set_prog_path checkbashisms`"
+_require_command "$CHECKBASHISMS_PROG" checkbashisms
+
+test -z "$WORKAREA" && _notrun "Can't find xfsprogs source"
+
+rm -f $seqres.full
+
+find $WORKAREA -type f -name 'xfs*.sh' -print0 | xargs -0 grep '^#!.*/bin/sh' | sed -e 's/:.*$//g' | while read f; do
+	$CHECKBASHISMS_PROG $f
+done
+
+status=0
diff --git a/tests/xfs/711.out b/tests/xfs/711.out
new file mode 100644
index 00000000..52ff4745
--- /dev/null
+++ b/tests/xfs/711.out
@@ -0,0 +1 @@
+QA output created by 711
diff --git a/tests/xfs/group b/tests/xfs/group
index 39e259e8..b7da3fba 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -443,3 +443,4 @@
 443 auto quick ioctl fsr
 444 auto quick
 445 auto quick filestreams
+711 auto quick

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

* Re: [PATCH 2/9] xfs/439: repair corrupted filesystem afterwards
  2018-05-02 14:54     ` Darrick J. Wong
@ 2018-05-03  1:15       ` Eryu Guan
  0 siblings, 0 replies; 21+ messages in thread
From: Eryu Guan @ 2018-05-03  1:15 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs, fstests

On Wed, May 02, 2018 at 07:54:42AM -0700, Darrick J. Wong wrote:
> On Wed, May 02, 2018 at 03:51:45PM +0800, Eryu Guan wrote:
> > On Tue, May 01, 2018 at 08:39:32AM -0700, Darrick J. Wong wrote:
> > > From: Darrick J. Wong <darrick.wong@oracle.com>
> > > 
> > > After we mess with logsunit and test that we can't mount the fs, repair
> > > the filesystem to make sure that repair can deal with it.
> > > 
> > > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > > ---
> > >  tests/xfs/439 |    1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > 
> > > diff --git a/tests/xfs/439 b/tests/xfs/439
> > > index 215c4b90..9d5f6892 100755
> > > --- a/tests/xfs/439
> > > +++ b/tests/xfs/439
> > > @@ -79,6 +79,7 @@ fi
> > >  _check_dmesg _filter_assert_dmesg
> > >  
> > >  echo "Silence is golden"
> > > +_scratch_xfs_repair >> $seqres.full 2>&1
> > 
> > But how should we check if repair does fix the corruption? I tried
> > adding a "scratch_mount" after the repair and expected a success mount.
> > But that mount also failed, and repair didn't report anything wrong in
> > $seqres.full. Looks like the corruption was not detected nor repaired.
> > 
> > [ 8278.679149] XFS (dm-1): Mounting V5 Filesystem
> > [ 8278.679743] XFS (dm-1): log stripe unit 4095 bytes must be a multiple of block size
> > [ 8278.680583] XFS (dm-1): AAIEEE! Log failed size checks. Abort!
> > [ 8278.681817] XFS (dm-1): log mount failed
> > 
> > Note that I was using latest for-next branch of xfsprogs.
> 
> Aha!  This depends on "xfs_repair: validate some of the log space
> information" which is still out for review for xfs_repair 4.17.  We can
> drop this for now.  I'll add a _scratch_mount at the end before I
> resubmit this patch.

Then the test would start to fail because of the newly added
_scratch_mount test on systems that have old xfs_repair. I think it's
better to add a new regression test for that xfs_repair fix.

Thanks,
Eryu

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

end of thread, other threads:[~2018-05-03  1:15 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-01 15:39 [PATCH 0/9] misc. fstests changes Darrick J. Wong
2018-05-01 15:39 ` [PATCH 1/9] generic: test XATTR_REPLACE doesn't take the fs down Darrick J. Wong
2018-05-02  7:33   ` Eryu Guan
2018-05-02 14:50     ` Darrick J. Wong
2018-05-01 15:39 ` [PATCH 2/9] xfs/439: repair corrupted filesystem afterwards Darrick J. Wong
2018-05-02  7:51   ` Eryu Guan
2018-05-02 14:54     ` Darrick J. Wong
2018-05-03  1:15       ` Eryu Guan
2018-05-01 15:39 ` [PATCH 3/9] generic/45[34]: add unicode directional override checks Darrick J. Wong
2018-05-01 15:39 ` [PATCH 4/9] generic/45[34]: check unicode names only if xfs_scrub linked against libicu Darrick J. Wong
2018-05-01 15:39 ` [PATCH 5/9] generic/45[34]: test unicode confusables Darrick J. Wong
2018-05-01 15:39 ` [PATCH 6/9] generic/453: test creation of malicious directory entries Darrick J. Wong
2018-05-01 15:40 ` [PATCH 7/9] xfs/422: add fsstress to the freeze-and-rmap-repair race test Darrick J. Wong
2018-05-02  8:44   ` Eryu Guan
2018-05-02 14:55     ` Darrick J. Wong
2018-05-01 15:40 ` [PATCH 8/9] xfs: checkbashisms in all script files Darrick J. Wong
2018-05-02  8:55   ` Eryu Guan
2018-05-02  9:13     ` Jan Tulak
2018-05-02 14:59     ` Darrick J. Wong
2018-05-02 15:03   ` [PATCH v2 " Darrick J. Wong
2018-05-01 15:40 ` [PATCH 9/9] xfs: fix blocktrash fuzzers Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.