fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] various: test xfs things fixed in 5.10
@ 2020-11-11  0:43 Darrick J. Wong
  2020-11-11  0:43 ` [PATCH 1/7] xfs: test fallocate ops when rt extent size is and isn't a power of 2 Darrick J. Wong
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Darrick J. Wong @ 2020-11-11  0:43 UTC (permalink / raw)
  To: darrick.wong, guaneryu; +Cc: Chandan Babu R, linux-xfs, fstests

Hi all,

Here are a bunch of new tests for problems that were fixed in 5.10.
Er.... 5.10 and 5.9.  I have not been good at sending to fstests
upstream lately. :( :(

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=test-fixes-5.10
---
 tests/generic/947     |  117 ++++++++++++++++++++++++++++++++
 tests/generic/947.out |   15 ++++
 tests/generic/948     |   90 ++++++++++++++++++++++++
 tests/generic/948.out |    9 ++
 tests/generic/group   |    2 +
 tests/xfs/122         |    1 
 tests/xfs/122.out     |    1 
 tests/xfs/758         |   59 ++++++++++++++++
 tests/xfs/758.out     |    2 +
 tests/xfs/759         |   99 +++++++++++++++++++++++++++
 tests/xfs/759.out     |    2 +
 tests/xfs/760         |   66 ++++++++++++++++++
 tests/xfs/760.out     |    9 ++
 tests/xfs/761         |   42 +++++++++++
 tests/xfs/761.out     |    1 
 tests/xfs/763         |  181 +++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/763.out     |   91 +++++++++++++++++++++++++
 tests/xfs/915         |  176 ++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/915.out     |  151 +++++++++++++++++++++++++++++++++++++++++
 tests/xfs/group       |    6 ++
 20 files changed, 1119 insertions(+), 1 deletion(-)
 create mode 100755 tests/generic/947
 create mode 100644 tests/generic/947.out
 create mode 100755 tests/generic/948
 create mode 100644 tests/generic/948.out
 create mode 100755 tests/xfs/758
 create mode 100644 tests/xfs/758.out
 create mode 100755 tests/xfs/759
 create mode 100644 tests/xfs/759.out
 create mode 100755 tests/xfs/760
 create mode 100644 tests/xfs/760.out
 create mode 100755 tests/xfs/761
 create mode 100644 tests/xfs/761.out
 create mode 100755 tests/xfs/763
 create mode 100644 tests/xfs/763.out
 create mode 100755 tests/xfs/915
 create mode 100644 tests/xfs/915.out


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

* [PATCH 1/7] xfs: test fallocate ops when rt extent size is and isn't a power of 2
  2020-11-11  0:43 [PATCH 0/7] various: test xfs things fixed in 5.10 Darrick J. Wong
@ 2020-11-11  0:43 ` Darrick J. Wong
  2020-11-11  0:44 ` [PATCH 2/7] xfs: test regression in xfs_bmap_validate_extent Darrick J. Wong
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Darrick J. Wong @ 2020-11-11  0:43 UTC (permalink / raw)
  To: darrick.wong, guaneryu; +Cc: Chandan Babu R, linux-xfs, fstests

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

Make sure that fallocate works when the rt extent size is and isn't a
power of 2.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
---
 tests/xfs/763     |  181 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/763.out |   91 +++++++++++++++++++++++++++
 tests/xfs/group   |    1 
 3 files changed, 273 insertions(+)
 create mode 100755 tests/xfs/763
 create mode 100644 tests/xfs/763.out


diff --git a/tests/xfs/763 b/tests/xfs/763
new file mode 100755
index 00000000..4b0b08a0
--- /dev/null
+++ b/tests/xfs/763
@@ -0,0 +1,181 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2020, Oracle and/or its affiliates.  All Rights Reserved.
+#
+# FS QA Test No. 763
+#
+# Make sure that regular fallocate functions work ok when the realtime extent
+# size is and isn't a power of 2.
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	_scratch_unmount >> $seqres.full 2>&1
+	test -e "$rtdev" && losetup -d $rtdev >> $seqres.full 2>&1
+	rm -f $tmp.* $TEST_DIR/$seq.rtvol
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_fs xfs
+_require_xfs_io_command "fpunch"
+_require_xfs_io_command "fzero"
+_require_xfs_io_command "fcollapse"
+_require_xfs_io_command "finsert"
+# Note that we don't _require_realtime because we synthesize a rt volume
+# below.  This also means we cannot run the post-test check.
+_require_scratch_nocheck
+
+log() {
+	echo "$@" | tee -a $seqres.full
+}
+
+mk_file() {
+	local file="$1"
+	local rextsize="$2"
+
+	$XFS_IO_PROG -f \
+		-c "pwrite -S 0x57 -b $rextsize 0 $rextsize" \
+		-c "pwrite -S 0x58 -b $rextsize $rextsize $rextsize" \
+		-c "pwrite -S 0x59 -b $rextsize $((rextsize * 2)) $rextsize" \
+		-c fsync \
+		"$file" >> $seqres.full
+}
+
+check_file() {
+	filefrag -v "$1" >> $seqres.full
+	od -tx1 -Ad -c "$1" >> $seqres.full
+	md5sum "$1" | _filter_scratch | tee -a $seqres.full
+}
+
+test_ops() {
+	local rextsize=$1
+	local sz=$((rextsize * 3))
+	local unaligned_sz=65536
+	local unaligned_off=$((rextsize * 2 + unaligned_sz))
+	local lunaligned_sz=$((rextsize * 2))
+	local lunaligned_off=$unaligned_sz
+
+	log "Format rtextsize=$rextsize"
+	_scratch_unmount
+	_scratch_mkfs -r extsize=$rextsize >> $seqres.full
+	_scratch_mount || \
+		_notrun "Could not mount rextsize=$rextsize with synthetic rt volume"
+
+	# Force all files to be realtime files
+	$XFS_IO_PROG -c 'chattr +t' $SCRATCH_MNT
+
+	log "Test regular write, rextsize=$rextsize"
+	mk_file $SCRATCH_MNT/write $rextsize
+	check_file $SCRATCH_MNT/write
+
+	log "Test aligned falloc, rextsize=$rextsize"
+	$XFS_IO_PROG -f -c "falloc 0 $sz" $SCRATCH_MNT/falloc >> $seqres.full
+	check_file $SCRATCH_MNT/falloc
+
+	log "Test aligned fcollapse, rextsize=$rextsize"
+	mk_file $SCRATCH_MNT/collapse $rextsize
+	$XFS_IO_PROG -f -c "fcollapse $rextsize $rextsize" $SCRATCH_MNT/collapse >> $seqres.full
+	check_file $SCRATCH_MNT/collapse
+
+	log "Test aligned finsert, rextsize=$rextsize"
+	mk_file $SCRATCH_MNT/insert $rextsize
+	$XFS_IO_PROG -f -c "finsert $rextsize $rextsize" $SCRATCH_MNT/insert >> $seqres.full
+	check_file $SCRATCH_MNT/insert
+
+	log "Test aligned fzero, rextsize=$rextsize"
+	mk_file $SCRATCH_MNT/zero $rextsize
+	$XFS_IO_PROG -f -c "fzero $rextsize $rextsize" $SCRATCH_MNT/zero >> $seqres.full
+	check_file $SCRATCH_MNT/zero
+
+	log "Test aligned fpunch, rextsize=$rextsize"
+	mk_file $SCRATCH_MNT/punch $rextsize
+	$XFS_IO_PROG -f -c "fpunch $rextsize $rextsize" $SCRATCH_MNT/punch >> $seqres.full
+	check_file $SCRATCH_MNT/punch
+
+	log "Test unaligned falloc, rextsize=$rextsize"
+	$XFS_IO_PROG -f -c "falloc $unaligned_off $unaligned_sz" $SCRATCH_MNT/ufalloc >> $seqres.full
+	check_file $SCRATCH_MNT/ufalloc
+
+	log "Test unaligned fcollapse, rextsize=$rextsize"
+	mk_file $SCRATCH_MNT/ucollapse $rextsize
+	$XFS_IO_PROG -f -c "fcollapse $unaligned_off $unaligned_sz" $SCRATCH_MNT/ucollapse >> $seqres.full
+	check_file $SCRATCH_MNT/ucollapse
+
+	log "Test unaligned finsert, rextsize=$rextsize"
+	mk_file $SCRATCH_MNT/uinsert $rextsize
+	$XFS_IO_PROG -f -c "finsert $unaligned_off $unaligned_sz" $SCRATCH_MNT/uinsert >> $seqres.full
+	check_file $SCRATCH_MNT/uinsert
+
+	log "Test unaligned fzero, rextsize=$rextsize"
+	mk_file $SCRATCH_MNT/uzero $rextsize
+	$XFS_IO_PROG -f -c "fzero $unaligned_off $unaligned_sz" $SCRATCH_MNT/uzero >> $seqres.full
+	check_file $SCRATCH_MNT/uzero
+
+	log "Test unaligned fpunch, rextsize=$rextsize"
+	mk_file $SCRATCH_MNT/upunch $rextsize
+	$XFS_IO_PROG -f -c "fpunch $unaligned_off $unaligned_sz" $SCRATCH_MNT/upunch >> $seqres.full
+	check_file $SCRATCH_MNT/upunch
+
+	log "Test large unaligned fzero, rextsize=$rextsize"
+	mk_file $SCRATCH_MNT/luzero $rextsize
+	$XFS_IO_PROG -f -c "fzero $lunaligned_off $lunaligned_sz" $SCRATCH_MNT/luzero >> $seqres.full
+	check_file $SCRATCH_MNT/luzero
+
+	log "Test large unaligned fpunch, rextsize=$rextsize"
+	mk_file $SCRATCH_MNT/lpunch $rextsize
+	$XFS_IO_PROG -f -c "fpunch $lunaligned_off $lunaligned_sz" $SCRATCH_MNT/lpunch >> $seqres.full
+	check_file $SCRATCH_MNT/lpunch
+
+	log "Remount and compare"
+	_scratch_cycle_mount
+	check_file $SCRATCH_MNT/write
+	check_file $SCRATCH_MNT/falloc
+	check_file $SCRATCH_MNT/collapse
+	check_file $SCRATCH_MNT/insert
+	check_file $SCRATCH_MNT/zero
+	check_file $SCRATCH_MNT/punch
+	check_file $SCRATCH_MNT/ufalloc
+	check_file $SCRATCH_MNT/ucollapse
+	check_file $SCRATCH_MNT/uinsert
+	check_file $SCRATCH_MNT/uzero
+	check_file $SCRATCH_MNT/upunch
+	check_file $SCRATCH_MNT/luzero
+	check_file $SCRATCH_MNT/lpunch
+
+	log "Check everything, rextsize=$rextsize"
+	_check_scratch_fs
+}
+
+echo "Create fake rt volume"
+truncate -s 400m $TEST_DIR/$seq.rtvol
+rtdev=$(_create_loop_device $TEST_DIR/$seq.rtvol)
+
+echo "Make sure synth rt volume works"
+export USE_EXTERNAL=yes
+export SCRATCH_RTDEV=$rtdev
+_scratch_mkfs > $seqres.full
+_scratch_mount || \
+	_notrun "Could not mount with synthetic rt volume"
+
+# power of two
+test_ops 262144
+
+# not a power of two
+test_ops 327680
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/763.out b/tests/xfs/763.out
new file mode 100644
index 00000000..27c87bab
--- /dev/null
+++ b/tests/xfs/763.out
@@ -0,0 +1,91 @@
+QA output created by 763
+Create fake rt volume
+Make sure synth rt volume works
+Format rtextsize=262144
+Test regular write, rextsize=262144
+2dce060217cb2293dde96f7fdb3b9232  SCRATCH_MNT/write
+Test aligned falloc, rextsize=262144
+cb18a5d28e77522dfec6a6255bc3847e  SCRATCH_MNT/falloc
+Test aligned fcollapse, rextsize=262144
+2e94746ab733025c21a9cae7d19c18d0  SCRATCH_MNT/collapse
+Test aligned finsert, rextsize=262144
+24e228d3d5f68b612eceec47f8416a7d  SCRATCH_MNT/insert
+Test aligned fzero, rextsize=262144
+ecb6eb78ceb5c43ce86d523437b1fa95  SCRATCH_MNT/zero
+Test aligned fpunch, rextsize=262144
+ecb6eb78ceb5c43ce86d523437b1fa95  SCRATCH_MNT/punch
+Test unaligned falloc, rextsize=262144
+157e39521e47ad1c923a94edd69ad59c  SCRATCH_MNT/ufalloc
+Test unaligned fcollapse, rextsize=262144
+fallocate: Invalid argument
+2dce060217cb2293dde96f7fdb3b9232  SCRATCH_MNT/ucollapse
+Test unaligned finsert, rextsize=262144
+fallocate: Invalid argument
+2dce060217cb2293dde96f7fdb3b9232  SCRATCH_MNT/uinsert
+Test unaligned fzero, rextsize=262144
+4402ca12d4425d7f94c9f536b756d924  SCRATCH_MNT/uzero
+Test unaligned fpunch, rextsize=262144
+4402ca12d4425d7f94c9f536b756d924  SCRATCH_MNT/upunch
+Test large unaligned fzero, rextsize=262144
+be43c5a0de0b510a6a573d682b0df726  SCRATCH_MNT/luzero
+Test large unaligned fpunch, rextsize=262144
+be43c5a0de0b510a6a573d682b0df726  SCRATCH_MNT/lpunch
+Remount and compare
+2dce060217cb2293dde96f7fdb3b9232  SCRATCH_MNT/write
+cb18a5d28e77522dfec6a6255bc3847e  SCRATCH_MNT/falloc
+2e94746ab733025c21a9cae7d19c18d0  SCRATCH_MNT/collapse
+24e228d3d5f68b612eceec47f8416a7d  SCRATCH_MNT/insert
+ecb6eb78ceb5c43ce86d523437b1fa95  SCRATCH_MNT/zero
+ecb6eb78ceb5c43ce86d523437b1fa95  SCRATCH_MNT/punch
+157e39521e47ad1c923a94edd69ad59c  SCRATCH_MNT/ufalloc
+2dce060217cb2293dde96f7fdb3b9232  SCRATCH_MNT/ucollapse
+2dce060217cb2293dde96f7fdb3b9232  SCRATCH_MNT/uinsert
+4402ca12d4425d7f94c9f536b756d924  SCRATCH_MNT/uzero
+4402ca12d4425d7f94c9f536b756d924  SCRATCH_MNT/upunch
+be43c5a0de0b510a6a573d682b0df726  SCRATCH_MNT/luzero
+be43c5a0de0b510a6a573d682b0df726  SCRATCH_MNT/lpunch
+Check everything, rextsize=262144
+Format rtextsize=327680
+Test regular write, rextsize=327680
+dcc4a2d49adcac61bceae7db66611880  SCRATCH_MNT/write
+Test aligned falloc, rextsize=327680
+63a6c5a8b8da92e30cd0ef23c56d4f06  SCRATCH_MNT/falloc
+Test aligned fcollapse, rextsize=327680
+8bdd728a7a4af4ac18bbcbe39dea14d5  SCRATCH_MNT/collapse
+Test aligned finsert, rextsize=327680
+2b178c860f7bef4c0e55399be5172c5e  SCRATCH_MNT/insert
+Test aligned fzero, rextsize=327680
+350defefe2530d8eb8d6a6772c81c206  SCRATCH_MNT/zero
+Test aligned fpunch, rextsize=327680
+350defefe2530d8eb8d6a6772c81c206  SCRATCH_MNT/punch
+Test unaligned falloc, rextsize=327680
+cb18a5d28e77522dfec6a6255bc3847e  SCRATCH_MNT/ufalloc
+Test unaligned fcollapse, rextsize=327680
+fallocate: Invalid argument
+dcc4a2d49adcac61bceae7db66611880  SCRATCH_MNT/ucollapse
+Test unaligned finsert, rextsize=327680
+fallocate: Invalid argument
+dcc4a2d49adcac61bceae7db66611880  SCRATCH_MNT/uinsert
+Test unaligned fzero, rextsize=327680
+c9c7b8791f445ec8c5fbbf82cb26b33c  SCRATCH_MNT/uzero
+Test unaligned fpunch, rextsize=327680
+c9c7b8791f445ec8c5fbbf82cb26b33c  SCRATCH_MNT/upunch
+Test large unaligned fzero, rextsize=327680
+d8bf9fa95e4a7dd228d0b03768045db9  SCRATCH_MNT/luzero
+Test large unaligned fpunch, rextsize=327680
+d8bf9fa95e4a7dd228d0b03768045db9  SCRATCH_MNT/lpunch
+Remount and compare
+dcc4a2d49adcac61bceae7db66611880  SCRATCH_MNT/write
+63a6c5a8b8da92e30cd0ef23c56d4f06  SCRATCH_MNT/falloc
+8bdd728a7a4af4ac18bbcbe39dea14d5  SCRATCH_MNT/collapse
+2b178c860f7bef4c0e55399be5172c5e  SCRATCH_MNT/insert
+350defefe2530d8eb8d6a6772c81c206  SCRATCH_MNT/zero
+350defefe2530d8eb8d6a6772c81c206  SCRATCH_MNT/punch
+cb18a5d28e77522dfec6a6255bc3847e  SCRATCH_MNT/ufalloc
+dcc4a2d49adcac61bceae7db66611880  SCRATCH_MNT/ucollapse
+dcc4a2d49adcac61bceae7db66611880  SCRATCH_MNT/uinsert
+c9c7b8791f445ec8c5fbbf82cb26b33c  SCRATCH_MNT/uzero
+c9c7b8791f445ec8c5fbbf82cb26b33c  SCRATCH_MNT/upunch
+d8bf9fa95e4a7dd228d0b03768045db9  SCRATCH_MNT/luzero
+d8bf9fa95e4a7dd228d0b03768045db9  SCRATCH_MNT/lpunch
+Check everything, rextsize=327680
diff --git a/tests/xfs/group b/tests/xfs/group
index b89c0a4e..ffd18166 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -519,3 +519,4 @@
 519 auto quick reflink
 520 auto quick reflink
 521 auto quick realtime growfs
+763 auto quick rw realtime


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

* [PATCH 2/7] xfs: test regression in xfs_bmap_validate_extent
  2020-11-11  0:43 [PATCH 0/7] various: test xfs things fixed in 5.10 Darrick J. Wong
  2020-11-11  0:43 ` [PATCH 1/7] xfs: test fallocate ops when rt extent size is and isn't a power of 2 Darrick J. Wong
@ 2020-11-11  0:44 ` Darrick J. Wong
  2020-11-11  0:44 ` [PATCH 3/7] generic: test reflink and copy_file_range behavior with O_SYNC and FS_XFLAG_SYNC files Darrick J. Wong
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Darrick J. Wong @ 2020-11-11  0:44 UTC (permalink / raw)
  To: darrick.wong, guaneryu; +Cc: Chandan Babu R, linux-xfs, fstests

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

This is a regression test to make sure that we can have realtime files
with xattr blocks and not trip the verifiers.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
---
 tests/xfs/758     |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/758.out |    2 ++
 tests/xfs/group   |    1 +
 3 files changed, 62 insertions(+)
 create mode 100755 tests/xfs/758
 create mode 100644 tests/xfs/758.out


diff --git a/tests/xfs/758 b/tests/xfs/758
new file mode 100755
index 00000000..e522ae28
--- /dev/null
+++ b/tests/xfs/758
@@ -0,0 +1,59 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2020, Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 758
+#
+# This is a regression test for "xfs: fix xfs_bmap_validate_extent_raw when
+# checking attr fork of rt files", which fixes the bmap record validator so
+# that it will not check the attr fork extent mappings of a realtime file
+# against the size of the realtime volume.
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_fs xfs
+_require_scratch
+_require_realtime
+
+rm -f $seqres.full
+
+# Format filesystem with very tiny realtime volume
+_scratch_mkfs -r size=256k > $seqres.full
+_scratch_mount >> $seqres.full
+
+# Create a realtime file
+$XFS_IO_PROG -f -R -c 'pwrite 0 64k' -c stat $SCRATCH_MNT/v >> $seqres.full
+
+# Add enough xattr data to force creation of xattr blocks at a higher address
+# on the data device than the size of the realtime volume
+for i in `seq 0 16`; do
+	$ATTR_PROG -s user.test$i $SCRATCH_MNT/v < $SCRATCH_MNT/v >> $seqres.full
+done
+
+# Force flushing extent maps to disk to trip the verifier
+_scratch_cycle_mount
+
+# Now let that unmount
+echo Silence is golden.
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/758.out b/tests/xfs/758.out
new file mode 100644
index 00000000..6d219f8e
--- /dev/null
+++ b/tests/xfs/758.out
@@ -0,0 +1,2 @@
+QA output created by 758
+Silence is golden.
diff --git a/tests/xfs/group b/tests/xfs/group
index ffd18166..771680cf 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -519,4 +519,5 @@
 519 auto quick reflink
 520 auto quick reflink
 521 auto quick realtime growfs
+758 auto quick rw attr realtime
 763 auto quick rw realtime


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

* [PATCH 3/7] generic: test reflink and copy_file_range behavior with O_SYNC and FS_XFLAG_SYNC files
  2020-11-11  0:43 [PATCH 0/7] various: test xfs things fixed in 5.10 Darrick J. Wong
  2020-11-11  0:43 ` [PATCH 1/7] xfs: test fallocate ops when rt extent size is and isn't a power of 2 Darrick J. Wong
  2020-11-11  0:44 ` [PATCH 2/7] xfs: test regression in xfs_bmap_validate_extent Darrick J. Wong
@ 2020-11-11  0:44 ` Darrick J. Wong
  2020-11-11  0:44 ` [PATCH 4/7] xfs: test rtalloc alignment and math errors Darrick J. Wong
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Darrick J. Wong @ 2020-11-11  0:44 UTC (permalink / raw)
  To: darrick.wong, guaneryu; +Cc: Chandan Babu R, linux-xfs, fstests

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

Add two regression tests to make sure that FICLONERANGE and the splice
based copy_file_range actually flush all data and metadata to disk
before the call ends.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
---
 tests/generic/947     |  117 +++++++++++++++++++++++++++++++++++++++++++++++++
 tests/generic/947.out |   15 ++++++
 tests/generic/948     |   90 ++++++++++++++++++++++++++++++++++++++
 tests/generic/948.out |    9 ++++
 tests/generic/group   |    2 +
 5 files changed, 233 insertions(+)
 create mode 100755 tests/generic/947
 create mode 100644 tests/generic/947.out
 create mode 100755 tests/generic/948
 create mode 100644 tests/generic/948.out


diff --git a/tests/generic/947 b/tests/generic/947
new file mode 100755
index 00000000..d2adf745
--- /dev/null
+++ b/tests/generic/947
@@ -0,0 +1,117 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2020, Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 947
+#
+# Make sure that reflink forces the log out if we open the file with O_SYNC or
+# set FS_XFLAG_SYNC on the file.  We test that it actually forced the log by
+# using dm-error to shut down the fs without flushing the log and then
+# remounting to check file contents.
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+	_dmerror_unmount
+	_dmerror_cleanup
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/reflink
+. ./common/dmerror
+
+# real QA test starts here
+_supported_fs generic
+_require_dm_target error
+_require_scratch_reflink
+_require_xfs_io_command "chattr" "s"
+_require_cp_reflink
+
+rm -f $seqres.full
+
+# Format filesystem and set up quota limits
+_scratch_mkfs > $seqres.full
+_require_metadata_journaling $SCRATCH_DEV
+_dmerror_init
+_dmerror_mount
+
+# Test that O_SYNC actually results in file data being written even if the
+# fs immediately dies
+echo "test o_sync write"
+$XFS_IO_PROG -x -f -s -c "pwrite -S 0x58 0 1m -b 1m" $SCRATCH_MNT/0 >> $seqres.full
+_dmerror_load_error_table
+_dmerror_unmount
+_dmerror_load_working_table
+_dmerror_mount
+md5sum $SCRATCH_MNT/0 | _filter_scratch
+
+# Set up initial files for reflink test
+$XFS_IO_PROG -f -c 'pwrite -S 0x58 0 1m -b 1m' $SCRATCH_MNT/a >> $seqres.full
+$XFS_IO_PROG -f -c 'pwrite -S 0x59 0 1m -b 1m' $SCRATCH_MNT/c >> $seqres.full
+_cp_reflink $SCRATCH_MNT/a $SCRATCH_MNT/e
+_cp_reflink $SCRATCH_MNT/c $SCRATCH_MNT/d
+touch $SCRATCH_MNT/b
+sync
+
+# Test that reflink forces dirty data/metadata to disk when destination file
+# opened with O_SYNC
+echo "test reflink flag not set o_sync"
+$XFS_IO_PROG -x -s -c "reflink $SCRATCH_MNT/a" $SCRATCH_MNT/b >> $seqres.full
+_dmerror_load_error_table
+_dmerror_unmount
+_dmerror_load_working_table
+_dmerror_mount
+md5sum $SCRATCH_MNT/a $SCRATCH_MNT/b | _filter_scratch
+
+# Test that reflink to a shared file forces dirty data/metadata to disk when
+# destination is opened with O_SYNC
+echo "test reflink flag already set o_sync"
+$XFS_IO_PROG -x -s -c "reflink $SCRATCH_MNT/a" $SCRATCH_MNT/d >> $seqres.full
+_dmerror_load_error_table
+_dmerror_unmount
+_dmerror_load_working_table
+_dmerror_mount
+md5sum $SCRATCH_MNT/a $SCRATCH_MNT/d | _filter_scratch
+
+# Set up the two files with chattr +S
+rm -f $SCRATCH_MNT/b $SCRATCH_MNT/d
+_cp_reflink $SCRATCH_MNT/c $SCRATCH_MNT/d
+touch $SCRATCH_MNT/b
+chattr +S $SCRATCH_MNT/b $SCRATCH_MNT/d
+sync
+
+# Test that reflink forces dirty data/metadata to disk when destination file
+# has the sync iflag set
+echo "test reflink flag not set iflag"
+$XFS_IO_PROG -x -c "reflink $SCRATCH_MNT/a" $SCRATCH_MNT/b >> $seqres.full
+_dmerror_load_error_table
+_dmerror_unmount
+_dmerror_load_working_table
+_dmerror_mount
+md5sum $SCRATCH_MNT/a $SCRATCH_MNT/b | _filter_scratch
+
+# Test that reflink to a shared file forces dirty data/metadata to disk when
+# destination file has the sync iflag set
+echo "test reflink flag already set iflag"
+$XFS_IO_PROG -x -c "reflink $SCRATCH_MNT/a" $SCRATCH_MNT/d >> $seqres.full
+_dmerror_load_error_table
+_dmerror_unmount
+_dmerror_load_working_table
+_dmerror_mount
+md5sum $SCRATCH_MNT/a $SCRATCH_MNT/d | _filter_scratch
+
+# success, all done
+status=0
+exit
diff --git a/tests/generic/947.out b/tests/generic/947.out
new file mode 100644
index 00000000..05ba10d1
--- /dev/null
+++ b/tests/generic/947.out
@@ -0,0 +1,15 @@
+QA output created by 947
+test o_sync write
+310f146ce52077fcd3308dcbe7632bb2  SCRATCH_MNT/0
+test reflink flag not set o_sync
+310f146ce52077fcd3308dcbe7632bb2  SCRATCH_MNT/a
+310f146ce52077fcd3308dcbe7632bb2  SCRATCH_MNT/b
+test reflink flag already set o_sync
+310f146ce52077fcd3308dcbe7632bb2  SCRATCH_MNT/a
+310f146ce52077fcd3308dcbe7632bb2  SCRATCH_MNT/d
+test reflink flag not set iflag
+310f146ce52077fcd3308dcbe7632bb2  SCRATCH_MNT/a
+310f146ce52077fcd3308dcbe7632bb2  SCRATCH_MNT/b
+test reflink flag already set iflag
+310f146ce52077fcd3308dcbe7632bb2  SCRATCH_MNT/a
+310f146ce52077fcd3308dcbe7632bb2  SCRATCH_MNT/d
diff --git a/tests/generic/948 b/tests/generic/948
new file mode 100755
index 00000000..83fe414b
--- /dev/null
+++ b/tests/generic/948
@@ -0,0 +1,90 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2020, Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 948
+#
+# Make sure that copy_file_range forces the log out if we open the file with
+# O_SYNC or set FS_XFLAG_SYNC on the file.  We test that it actually forced the
+# log by using dm-error to shut down the fs without flushing the log and then
+# remounting to check file contents.
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+	_dmerror_unmount
+	_dmerror_cleanup
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/dmerror
+
+# real QA test starts here
+_supported_fs generic
+_require_dm_target error
+_require_xfs_io_command "chattr" "s"
+
+rm -f $seqres.full
+
+# Format filesystem and set up quota limits
+_scratch_mkfs > $seqres.full
+_require_metadata_journaling $SCRATCH_DEV
+_dmerror_init
+_dmerror_mount
+
+# Test that O_SYNC actually results in file data being written even if the
+# fs immediately dies
+echo "test o_sync write"
+$XFS_IO_PROG -x -f -s -c "pwrite -S 0x58 0 1m -b 1m" $SCRATCH_MNT/0 >> $seqres.full
+_dmerror_load_error_table
+_dmerror_unmount
+_dmerror_load_working_table
+_dmerror_mount
+md5sum $SCRATCH_MNT/0 | _filter_scratch
+
+# Set up initial files for copy test
+$XFS_IO_PROG -f -c 'pwrite -S 0x58 0 1m -b 1m' $SCRATCH_MNT/a >> $seqres.full
+touch $SCRATCH_MNT/b
+sync
+
+# Test that unaligned copy file range forces dirty data/metadata to disk when
+# destination file opened with O_SYNC
+echo "test unaligned copy range o_sync"
+$XFS_IO_PROG -x -s -c "copy_range -s 13 -d 13 -l 1048550 $SCRATCH_MNT/a" $SCRATCH_MNT/b >> $seqres.full
+_dmerror_load_error_table
+_dmerror_unmount
+_dmerror_load_working_table
+_dmerror_mount
+md5sum $SCRATCH_MNT/a $SCRATCH_MNT/b | _filter_scratch
+
+# Set up dest file with chattr +S
+rm -f $SCRATCH_MNT/b
+touch $SCRATCH_MNT/b
+chattr +S $SCRATCH_MNT/b
+sync
+
+# Test that unaligned copy file range forces dirty data/metadata to disk when
+# destination file has the sync iflag set
+echo "test unaligned copy range iflag"
+$XFS_IO_PROG -x -c "copy_range -s 13 -d 13 -l 1048550 $SCRATCH_MNT/a" $SCRATCH_MNT/b >> $seqres.full
+_dmerror_load_error_table
+_dmerror_unmount
+_dmerror_load_working_table
+_dmerror_mount
+md5sum $SCRATCH_MNT/a $SCRATCH_MNT/b | _filter_scratch
+
+# success, all done
+status=0
+exit
diff --git a/tests/generic/948.out b/tests/generic/948.out
new file mode 100644
index 00000000..eec6c0dc
--- /dev/null
+++ b/tests/generic/948.out
@@ -0,0 +1,9 @@
+QA output created by 948
+test o_sync write
+310f146ce52077fcd3308dcbe7632bb2  SCRATCH_MNT/0
+test unaligned copy range o_sync
+310f146ce52077fcd3308dcbe7632bb2  SCRATCH_MNT/a
+2a715d2093b5aca82783a0c5943ac0b8  SCRATCH_MNT/b
+test unaligned copy range iflag
+310f146ce52077fcd3308dcbe7632bb2  SCRATCH_MNT/a
+2a715d2093b5aca82783a0c5943ac0b8  SCRATCH_MNT/b
diff --git a/tests/generic/group b/tests/generic/group
index ab8ae74e..4300158e 100644
--- a/tests/generic/group
+++ b/tests/generic/group
@@ -617,3 +617,5 @@
 612 auto quick clone
 613 auto quick encrypt
 614 auto quick rw
+947 auto quick rw clone
+948 auto quick rw copy_range


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

* [PATCH 4/7] xfs: test rtalloc alignment and math errors
  2020-11-11  0:43 [PATCH 0/7] various: test xfs things fixed in 5.10 Darrick J. Wong
                   ` (2 preceding siblings ...)
  2020-11-11  0:44 ` [PATCH 3/7] generic: test reflink and copy_file_range behavior with O_SYNC and FS_XFLAG_SYNC files Darrick J. Wong
@ 2020-11-11  0:44 ` Darrick J. Wong
  2020-11-11  0:44 ` [PATCH 5/7] xfs: test mkfs min log size calculation w/ rt volumes Darrick J. Wong
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Darrick J. Wong @ 2020-11-11  0:44 UTC (permalink / raw)
  To: darrick.wong, guaneryu; +Cc: linux-xfs, fstests

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

Add a couple of regression tests for "xfs: make sure the rt allocator
doesn't run off the end" and "xfs: ensure that fpunch, fcollapse, and
finsert operations are aligned to rt extent size".

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/xfs/759     |   99 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/759.out |    2 +
 tests/xfs/760     |   66 +++++++++++++++++++++++++++++++++++
 tests/xfs/760.out |    9 +++++
 tests/xfs/group   |    2 +
 5 files changed, 178 insertions(+)
 create mode 100755 tests/xfs/759
 create mode 100644 tests/xfs/759.out
 create mode 100755 tests/xfs/760
 create mode 100644 tests/xfs/760.out


diff --git a/tests/xfs/759 b/tests/xfs/759
new file mode 100755
index 00000000..00573786
--- /dev/null
+++ b/tests/xfs/759
@@ -0,0 +1,99 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2020, Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 759
+#
+# This is a regression test for an overflow error in the _near realtime
+# allocator.  If the rt bitmap ends exactly at the end of a block and the
+# number of rt extents is large enough to allow an allocation request larger
+# than the maximum extent size, it's possible that during a large allocation
+# request, the allocator will fail to constrain maxlen on the second run
+# through the loop, and the rt bitmap range check will run right off the end of
+# the rtbitmap file.  When this happens, xfs triggers a verifier error and
+# returns EFSCORRUPTED.
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_fs xfs
+_require_scratch
+_require_realtime
+_require_test_program "punch-alternating"
+
+rm -f $seqres.full
+
+# Format filesystem to get the block size
+_scratch_mkfs > $seqres.full
+_scratch_mount >> $seqres.full
+
+blksz=$(_get_block_size $SCRATCH_MNT)
+rextsize=$($XFS_INFO_PROG $SCRATCH_MNT | grep realtime.*extsz | sed -e 's/^.*extsz=\([0-9]*\).*$/\1/g')
+rextblks=$((rextsize / blksz))
+
+echo "blksz $blksz rextsize $rextsize rextblks $rextblks" >> $seqres.full
+
+_scratch_unmount
+
+# Format filesystem with a realtime volume whose size fits the following:
+# 1. Longer than (XFS MAXEXTLEN * blocksize) bytes.
+# 2. Exactly a multiple of (NBBY * blksz * rextsize) bytes.
+
+rtsize1=$((2097151 * blksz))
+rtsize2=$((8 * blksz * rextsize))
+rtsize=$(( $(blockdev --getsz $SCRATCH_RTDEV) * 512 ))
+
+echo "rtsize1 $rtsize1 rtsize2 $rtsize2 rtsize $rtsize" >> $seqres.full
+
+test $rtsize -gt $rtsize1 || \
+	_notrun "scratch rt device too small, need $rtsize1 bytes"
+test $rtsize -gt $rtsize2 || \
+	_notrun "scratch rt device too small, need $rtsize2 bytes"
+
+rtsize=$((rtsize - (rtsize % rtsize2)))
+
+echo "rt size will be $rtsize" >> $seqres.full
+
+_scratch_mkfs -r size=$rtsize >> $seqres.full
+_scratch_mount >> $seqres.full
+
+# Make sure the root directory has rtinherit set so our test file will too
+$XFS_IO_PROG -c 'chattr +t' $SCRATCH_MNT
+
+# Allocate some stuff at the start, to force the first falloc of the ouch file
+# to happen somewhere in the middle of the rt volume
+$XFS_IO_PROG -f -c 'falloc 0 64m' "$SCRATCH_MNT/b"
+$here/src/punch-alternating -i $((rextblks * 2)) -s $((rextblks)) "$SCRATCH_MNT/b"
+
+avail="$(df -P "$SCRATCH_MNT" | awk 'END {print $4}')"1
+toobig="$((avail * 2))"
+
+# falloc the ouch file in the middle of the rt extent to exercise the near
+# allocator in the last step.
+$XFS_IO_PROG -f -c 'falloc 0 1g' "$SCRATCH_MNT/ouch"
+
+# Try to get the near allocator to overflow on an allocation that matches
+# exactly one of the rtsummary size levels.  This should return ENOSPC and
+# not EFSCORRUPTED.
+$XFS_IO_PROG -f -c "falloc 0 ${toobig}k" "$SCRATCH_MNT/ouch"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/759.out b/tests/xfs/759.out
new file mode 100644
index 00000000..df693d50
--- /dev/null
+++ b/tests/xfs/759.out
@@ -0,0 +1,2 @@
+QA output created by 759
+fallocate: No space left on device
diff --git a/tests/xfs/760 b/tests/xfs/760
new file mode 100755
index 00000000..7baa346c
--- /dev/null
+++ b/tests/xfs/760
@@ -0,0 +1,66 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2020, Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 760
+#
+# Make sure we validate realtime extent size alignment for fallocate modes.
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_fs xfs
+_require_scratch
+_require_realtime
+_require_xfs_io_command "fcollapse"
+_require_xfs_io_command "finsert"
+_require_xfs_io_command "funshare"
+_require_xfs_io_command "fzero"
+_require_xfs_io_command "falloc"
+
+rm -f $seqres.full
+
+# Format filesystem with a 256k realtime extent size
+_scratch_mkfs -r extsize=256k > $seqres.full
+_scratch_mount >> $seqres.full
+
+blksz=$(_get_block_size $SCRATCH_MNT)
+rextsize=$($XFS_INFO_PROG $SCRATCH_MNT | grep realtime.*extsz | sed -e 's/^.*extsz=\([0-9]*\).*$/\1/g')
+rextblks=$((rextsize / blksz))
+
+echo "blksz $blksz rextsize $rextsize rextblks $rextblks" >> $seqres.full
+
+# Make sure the root directory has rtinherit set so our test file will too
+$XFS_IO_PROG -c 'chattr +t' $SCRATCH_MNT
+
+sz=$((rextsize * 100))
+range="$((blksz * 3)) $blksz"
+
+for verb in fpunch finsert fcollapse fzero funshare falloc; do
+	echo "test $verb"
+	$XFS_IO_PROG -f -c "falloc 0 $sz" "$SCRATCH_MNT/b"
+	$XFS_IO_PROG -f -c "$verb $range" "$SCRATCH_MNT/b"
+	rm -f "$SCRATCH_MNT/b"
+	_scratch_cycle_mount
+done
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/760.out b/tests/xfs/760.out
new file mode 100644
index 00000000..3d73c6fa
--- /dev/null
+++ b/tests/xfs/760.out
@@ -0,0 +1,9 @@
+QA output created by 760
+test fpunch
+test finsert
+fallocate: Invalid argument
+test fcollapse
+fallocate: Invalid argument
+test fzero
+test funshare
+test falloc
diff --git a/tests/xfs/group b/tests/xfs/group
index 771680cf..cb55a8ff 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -520,4 +520,6 @@
 520 auto quick reflink
 521 auto quick realtime growfs
 758 auto quick rw attr realtime
+759 auto quick rw realtime
+760 auto quick rw collapse punch insert zero prealloc
 763 auto quick rw realtime


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

* [PATCH 5/7] xfs: test mkfs min log size calculation w/ rt volumes
  2020-11-11  0:43 [PATCH 0/7] various: test xfs things fixed in 5.10 Darrick J. Wong
                   ` (3 preceding siblings ...)
  2020-11-11  0:44 ` [PATCH 4/7] xfs: test rtalloc alignment and math errors Darrick J. Wong
@ 2020-11-11  0:44 ` Darrick J. Wong
  2020-11-11  0:44 ` [PATCH 6/7] xfs: test quota softlimit warning functionality Darrick J. Wong
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Darrick J. Wong @ 2020-11-11  0:44 UTC (permalink / raw)
  To: darrick.wong, guaneryu; +Cc: linux-xfs, fstests

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

In "mkfs: set required parts of the realtime geometry before computing
log geometry" we made sure that mkfs set up enough of the fs geometry to
compute the minimum xfs log size correctly when formatting the
filesystem.  This is the regression test for that issue.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/xfs/761     |   42 ++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/761.out |    1 +
 tests/xfs/group   |    1 +
 3 files changed, 44 insertions(+)
 create mode 100755 tests/xfs/761
 create mode 100644 tests/xfs/761.out


diff --git a/tests/xfs/761 b/tests/xfs/761
new file mode 100755
index 00000000..36877bc9
--- /dev/null
+++ b/tests/xfs/761
@@ -0,0 +1,42 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2020, Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 761
+#
+# Make sure mkfs sets up enough of the rt geometry that we can compute the
+# correct min log size for formatting the fs.
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_fs xfs
+_require_scratch
+_require_realtime
+
+rm -f $seqres.full
+
+# Format a tiny filesystem to force minimum log size, then see if it mounts
+_scratch_mkfs -r size=1m -d size=100m > $seqres.full
+_scratch_mount >> $seqres.full
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/761.out b/tests/xfs/761.out
new file mode 100644
index 00000000..8c9d9e90
--- /dev/null
+++ b/tests/xfs/761.out
@@ -0,0 +1 @@
+QA output created by 761
diff --git a/tests/xfs/group b/tests/xfs/group
index cb55a8ff..74f0d37c 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -522,4 +522,5 @@
 758 auto quick rw attr realtime
 759 auto quick rw realtime
 760 auto quick rw collapse punch insert zero prealloc
+761 auto quick realtime
 763 auto quick rw realtime


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

* [PATCH 6/7] xfs: test quota softlimit warning functionality
  2020-11-11  0:43 [PATCH 0/7] various: test xfs things fixed in 5.10 Darrick J. Wong
                   ` (4 preceding siblings ...)
  2020-11-11  0:44 ` [PATCH 5/7] xfs: test mkfs min log size calculation w/ rt volumes Darrick J. Wong
@ 2020-11-11  0:44 ` Darrick J. Wong
  2020-11-11  0:44 ` [PATCH 7/7] xfs/122: fix test for xfs_attr_shortform_t conversion Darrick J. Wong
  2020-11-22 14:27 ` [PATCH 0/7] various: test xfs things fixed in 5.10 Eryu Guan
  7 siblings, 0 replies; 14+ messages in thread
From: Darrick J. Wong @ 2020-11-11  0:44 UTC (permalink / raw)
  To: darrick.wong, guaneryu; +Cc: linux-xfs, fstests

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

Make sure that quota softlimits work, which is to say that one can
exceed the softlimit up to warnlimit times before it starts enforcing
that.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/xfs/915     |  176 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/915.out |  151 +++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/group   |    1 
 3 files changed, 328 insertions(+)
 create mode 100755 tests/xfs/915
 create mode 100644 tests/xfs/915.out


diff --git a/tests/xfs/915 b/tests/xfs/915
new file mode 100755
index 00000000..0a37a1b5
--- /dev/null
+++ b/tests/xfs/915
@@ -0,0 +1,176 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2020, Oracle and/or its affiliates.  All Rights Reserved.
+#
+# FS QA Test No. 915
+#
+# Check that quota softlimit warnings work the way they should.  This means
+# that we can disobey the softlimit up to warnlimit times before it turns into
+# hard(er) enforcement.
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/quota
+
+# real QA test starts here
+_supported_fs xfs
+_require_xfs_quota
+_require_scratch
+
+rm -f $seqres.full
+
+filter_report()
+{
+	tr -s '[:space:]' | \
+	perl -npe '
+		s/^\#'$id' /[NAME] /g;
+		s/^\#0 \d+ /[ROOT] 0 /g;
+		s/6 days/7 days/g' |
+	perl -npe '
+		$val = 0;
+		if ($ENV{'LARGE_SCRATCH_DEV'}) {
+			$val = $ENV{'NUM_SPACE_FILES'};
+		}
+		s/(^\[ROOT\] \S+ \S+ \S+ \S+ \[--------\] )(\S+)/$1@{[$2 - $val]}/g' |
+	perl -npe '
+		s|^(.*?) (\d+) (\d+) (\d+)|$1 @{[$2 * 1024 /'$bsize']} @{[$3 * 1024 /'$bsize']} @{[$4 * 1024 /'$bsize']}|'
+}
+
+qsetup()
+{
+	opt=$1
+	enforce=0
+	if [ $opt = "u" -o $opt = "uno" ]; then
+		type=u
+		eval `_choose_uid`
+	elif [ $opt = "g" -o $opt = "gno" ]; then
+		type=g
+		eval `_choose_gid`
+	elif [ $opt = "p" -o $opt = "pno" ]; then
+		type=p
+		eval `_choose_prid`
+	fi
+	[ $opt = "u" -o $opt = "g" -o $opt = "p" ] && enforce=1
+
+	echo "Using type=$type id=$id" >> $seqres.full
+}
+
+exercise() {
+	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+	cat $tmp.mkfs >>$seqres.full
+
+	# keep the blocksize and data size for dd later
+	. $tmp.mkfs
+
+	_qmount
+
+	qsetup $1
+
+	echo "Using type=$type id=$id" >>$seqres.full
+
+	echo
+	echo "*** report initial settings" | tee -a $seqres.full
+	$XFS_QUOTA_PROG -x \
+		-c "limit -$type isoft=3 ihard=500000 $id" \
+		-c "warn -$type -i -d 13" \
+		$SCRATCH_DEV
+	$XFS_QUOTA_PROG -x \
+		-c "state -$type" >> $seqres.full
+	$XFS_QUOTA_PROG -x \
+		-c "repquota -birnN -$type" $SCRATCH_DEV |
+		filter_report | LC_COLLATE=POSIX sort -ru
+
+	echo
+	echo "*** push past the soft inode limit" | tee -a $seqres.full
+	_file_as_id $SCRATCH_MNT/softok1 $id $type $bsize 0
+	_file_as_id $SCRATCH_MNT/softok2 $id $type $bsize 0
+	_file_as_id $SCRATCH_MNT/softok3 $id $type $bsize 0
+	_file_as_id $SCRATCH_MNT/softwarn1 $id $type $bsize 0
+	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
+		-c "repquota -birnN -$type" $SCRATCH_DEV |
+		filter_report | LC_COLLATE=POSIX sort -ru
+
+	echo
+	echo "*** push further past the soft inode limit" | tee -a $seqres.full
+	for warn_nr in $(seq 2 5); do
+		_file_as_id $SCRATCH_MNT/softwarn$warn_nr $id $type $bsize 0
+	done
+	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
+		-c "repquota -birnN -$type" $SCRATCH_DEV |
+		filter_report | LC_COLLATE=POSIX sort -ru
+
+	echo
+	echo "*** push past the soft inode warning limit" | tee -a $seqres.full
+	for warn_nr in $(seq 6 15); do
+		_file_as_id $SCRATCH_MNT/softwarn$warn_nr $id $type $bsize 0
+	done
+	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
+		-c "repquota -birnN -$type" $SCRATCH_DEV |
+		filter_report | LC_COLLATE=POSIX sort -ru
+
+	echo
+	echo "*** unmount"
+	_scratch_unmount
+}
+
+_scratch_mkfs > $seqres.full
+_scratch_mount >> $seqres.full
+
+chmod a+rwx $SCRATCH_MNT $seqres.full	# arbitrary users will write here
+bsize=$(_get_file_block_size $SCRATCH_MNT)
+_scratch_unmount
+
+cat >$tmp.projects <<EOF
+1:$SCRATCH_MNT
+EOF
+
+cat >$tmp.projid <<EOF
+root:0
+scratch:1
+EOF
+
+projid_file="$tmp.projid"
+
+echo "*** user"
+_qmount_option "uquota"
+exercise u
+
+echo "*** group"
+_qmount_option "gquota"
+exercise g
+
+echo "*** uqnoenforce"
+_qmount_option "uqnoenforce"
+exercise uno
+
+echo "*** gqnoenforce"
+_qmount_option "gqnoenforce"
+exercise gno
+
+echo "*** pquota"
+_qmount_option "pquota"
+exercise p
+
+echo "*** pqnoenforce"
+_qmount_option "pqnoenforce"
+exercise pno
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/915.out b/tests/xfs/915.out
new file mode 100644
index 00000000..c3bb855e
--- /dev/null
+++ b/tests/xfs/915.out
@@ -0,0 +1,151 @@
+QA output created by 915
+*** user
+meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
+data     = bsize=XXX blocks=XXX, imaxpct=PCT
+         = sunit=XXX swidth=XXX, unwritten=X
+naming   =VERN bsize=XXX
+log      =LDEV bsize=XXX blocks=XXX
+realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
+
+*** report initial settings
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 0 3 500000 00 [--------] 0 0 0 00 [--------]
+
+*** push past the soft inode limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 4 3 500000 01 [7 days] 0 0 0 00 [--------]
+
+*** push further past the soft inode limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 8 3 500000 05 [7 days] 0 0 0 00 [--------]
+
+*** push past the soft inode warning limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 16 3 500000 13 [7 days] 0 0 0 00 [--------]
+
+*** unmount
+*** group
+meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
+data     = bsize=XXX blocks=XXX, imaxpct=PCT
+         = sunit=XXX swidth=XXX, unwritten=X
+naming   =VERN bsize=XXX
+log      =LDEV bsize=XXX blocks=XXX
+realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
+
+*** report initial settings
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 0 3 500000 00 [--------] 0 0 0 00 [--------]
+
+*** push past the soft inode limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 4 3 500000 01 [7 days] 0 0 0 00 [--------]
+
+*** push further past the soft inode limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 8 3 500000 05 [7 days] 0 0 0 00 [--------]
+
+*** push past the soft inode warning limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 16 3 500000 13 [7 days] 0 0 0 00 [--------]
+
+*** unmount
+*** uqnoenforce
+meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
+data     = bsize=XXX blocks=XXX, imaxpct=PCT
+         = sunit=XXX swidth=XXX, unwritten=X
+naming   =VERN bsize=XXX
+log      =LDEV bsize=XXX blocks=XXX
+realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
+
+*** report initial settings
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 0 3 500000 00 [--------] 0 0 0 00 [--------]
+
+*** push past the soft inode limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 4 3 500000 00 [--------] 0 0 0 00 [--------]
+
+*** push further past the soft inode limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 8 3 500000 00 [--------] 0 0 0 00 [--------]
+
+*** push past the soft inode warning limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 18 3 500000 00 [--------] 0 0 0 00 [--------]
+
+*** unmount
+*** gqnoenforce
+meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
+data     = bsize=XXX blocks=XXX, imaxpct=PCT
+         = sunit=XXX swidth=XXX, unwritten=X
+naming   =VERN bsize=XXX
+log      =LDEV bsize=XXX blocks=XXX
+realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
+
+*** report initial settings
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 0 3 500000 00 [--------] 0 0 0 00 [--------]
+
+*** push past the soft inode limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 4 3 500000 00 [--------] 0 0 0 00 [--------]
+
+*** push further past the soft inode limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 8 3 500000 00 [--------] 0 0 0 00 [--------]
+
+*** push past the soft inode warning limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 18 3 500000 00 [--------] 0 0 0 00 [--------]
+
+*** unmount
+*** pquota
+meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
+data     = bsize=XXX blocks=XXX, imaxpct=PCT
+         = sunit=XXX swidth=XXX, unwritten=X
+naming   =VERN bsize=XXX
+log      =LDEV bsize=XXX blocks=XXX
+realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
+
+*** report initial settings
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 0 3 500000 00 [--------] 0 0 0 00 [--------]
+
+*** push past the soft inode limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 4 3 500000 02 [7 days] 0 0 0 00 [--------]
+
+*** push further past the soft inode limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 8 3 500000 06 [7 days] 0 0 0 00 [--------]
+
+*** push past the soft inode warning limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 15 3 500000 13 [7 days] 0 0 0 00 [--------]
+
+*** unmount
+*** pqnoenforce
+meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
+data     = bsize=XXX blocks=XXX, imaxpct=PCT
+         = sunit=XXX swidth=XXX, unwritten=X
+naming   =VERN bsize=XXX
+log      =LDEV bsize=XXX blocks=XXX
+realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
+
+*** report initial settings
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 0 3 500000 00 [--------] 0 0 0 00 [--------]
+
+*** push past the soft inode limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 4 3 500000 00 [--------] 0 0 0 00 [--------]
+
+*** push further past the soft inode limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 8 3 500000 00 [--------] 0 0 0 00 [--------]
+
+*** push past the soft inode warning limit
+[ROOT] 0 0 0 00 [--------] 3 0 0 13 [--------] 0 0 0 00 [--------]
+[NAME] 0 0 0 00 [--------] 18 3 500000 00 [--------] 0 0 0 00 [--------]
+
+*** unmount
diff --git a/tests/xfs/group b/tests/xfs/group
index 74f0d37c..17f6bc6c 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -524,3 +524,4 @@
 760 auto quick rw collapse punch insert zero prealloc
 761 auto quick realtime
 763 auto quick rw realtime
+915 auto quick quota


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

* [PATCH 7/7] xfs/122: fix test for xfs_attr_shortform_t conversion
  2020-11-11  0:43 [PATCH 0/7] various: test xfs things fixed in 5.10 Darrick J. Wong
                   ` (5 preceding siblings ...)
  2020-11-11  0:44 ` [PATCH 6/7] xfs: test quota softlimit warning functionality Darrick J. Wong
@ 2020-11-11  0:44 ` Darrick J. Wong
  2020-11-22 14:27 ` [PATCH 0/7] various: test xfs things fixed in 5.10 Eryu Guan
  7 siblings, 0 replies; 14+ messages in thread
From: Darrick J. Wong @ 2020-11-11  0:44 UTC (permalink / raw)
  To: darrick.wong, guaneryu; +Cc: Chandan Babu R, linux-xfs, fstests

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

The typedef xfs_attr_shortform_t was converted to a struct in 5.10.
Update this test to pass.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
---
 tests/xfs/122     |    1 -
 tests/xfs/122.out |    1 +
 2 files changed, 1 insertion(+), 1 deletion(-)


diff --git a/tests/xfs/122 b/tests/xfs/122
index a4248031..322e1d81 100755
--- a/tests/xfs/122
+++ b/tests/xfs/122
@@ -72,7 +72,6 @@ for hdr in /usr/include/xfs/xfs*.h; do
 done
 
 # missing:
-# xfs_attr_shortform_t
 # xfs_trans_header_t
 
 cat >$tmp.ignore <<EOF
diff --git a/tests/xfs/122.out b/tests/xfs/122.out
index 45c42e59..cfe09c6d 100644
--- a/tests/xfs/122.out
+++ b/tests/xfs/122.out
@@ -62,6 +62,7 @@ sizeof(struct xfs_agfl) = 36
 sizeof(struct xfs_attr3_leaf_hdr) = 80
 sizeof(struct xfs_attr3_leafblock) = 88
 sizeof(struct xfs_attr3_rmt_hdr) = 56
+sizeof(struct xfs_attr_shortform) = 8
 sizeof(struct xfs_btree_block) = 72
 sizeof(struct xfs_btree_block_lhdr) = 64
 sizeof(struct xfs_btree_block_shdr) = 48


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

* Re: [PATCH 0/7] various: test xfs things fixed in 5.10
  2020-11-11  0:43 [PATCH 0/7] various: test xfs things fixed in 5.10 Darrick J. Wong
                   ` (6 preceding siblings ...)
  2020-11-11  0:44 ` [PATCH 7/7] xfs/122: fix test for xfs_attr_shortform_t conversion Darrick J. Wong
@ 2020-11-22 14:27 ` Eryu Guan
  2020-11-23 18:20   ` Darrick J. Wong
  7 siblings, 1 reply; 14+ messages in thread
From: Eryu Guan @ 2020-11-22 14:27 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: guaneryu, Chandan Babu R, linux-xfs, fstests

On Tue, Nov 10, 2020 at 04:43:48PM -0800, Darrick J. Wong wrote:
> Hi all,
> 
> Here are a bunch of new tests for problems that were fixed in 5.10.
> Er.... 5.10 and 5.9.  I have not been good at sending to fstests
> upstream lately. :( :(

It seems all these tests are regression tests for bugs that have been
fixed in v5.10 cycle, and some of the tests didn't list the associated
commits that fixed the bug, and some tests listed the patch titles but
not the commit IDs. Would you please fix them up as well?

> 
> If you're going to start using this mess, you probably ought to just
> pull from my git trees, which are linked below.
> 
> This is an extraordinary way to destroy everything.  Enjoy!
> Comments and questions are, as always, welcome.
> 
> --D
> 
> fstests git tree:
> https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=test-fixes-5.10
> ---
>  tests/generic/947     |  117 ++++++++++++++++++++++++++++++++
>  tests/generic/947.out |   15 ++++
>  tests/generic/948     |   90 ++++++++++++++++++++++++
>  tests/generic/948.out |    9 ++
>  tests/generic/group   |    2 +
>  tests/xfs/122         |    1 
>  tests/xfs/122.out     |    1 
>  tests/xfs/758         |   59 ++++++++++++++++
>  tests/xfs/758.out     |    2 +
>  tests/xfs/759         |   99 +++++++++++++++++++++++++++
>  tests/xfs/759.out     |    2 +
>  tests/xfs/760         |   66 ++++++++++++++++++
>  tests/xfs/760.out     |    9 ++
>  tests/xfs/761         |   42 +++++++++++
>  tests/xfs/761.out     |    1 

"Silence is golden" is missed in 761.out :)

Thanks,
Eryu

>  tests/xfs/763         |  181 +++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/xfs/763.out     |   91 +++++++++++++++++++++++++
>  tests/xfs/915         |  176 ++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/xfs/915.out     |  151 +++++++++++++++++++++++++++++++++++++++++
>  tests/xfs/group       |    6 ++
>  20 files changed, 1119 insertions(+), 1 deletion(-)
>  create mode 100755 tests/generic/947
>  create mode 100644 tests/generic/947.out
>  create mode 100755 tests/generic/948
>  create mode 100644 tests/generic/948.out
>  create mode 100755 tests/xfs/758
>  create mode 100644 tests/xfs/758.out
>  create mode 100755 tests/xfs/759
>  create mode 100644 tests/xfs/759.out
>  create mode 100755 tests/xfs/760
>  create mode 100644 tests/xfs/760.out
>  create mode 100755 tests/xfs/761
>  create mode 100644 tests/xfs/761.out
>  create mode 100755 tests/xfs/763
>  create mode 100644 tests/xfs/763.out
>  create mode 100755 tests/xfs/915
>  create mode 100644 tests/xfs/915.out

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

* Re: [PATCH 0/7] various: test xfs things fixed in 5.10
  2020-11-22 14:27 ` [PATCH 0/7] various: test xfs things fixed in 5.10 Eryu Guan
@ 2020-11-23 18:20   ` Darrick J. Wong
  0 siblings, 0 replies; 14+ messages in thread
From: Darrick J. Wong @ 2020-11-23 18:20 UTC (permalink / raw)
  To: Eryu Guan; +Cc: guaneryu, Chandan Babu R, linux-xfs, fstests

On Sun, Nov 22, 2020 at 10:27:44PM +0800, Eryu Guan wrote:
> On Tue, Nov 10, 2020 at 04:43:48PM -0800, Darrick J. Wong wrote:
> > Hi all,
> > 
> > Here are a bunch of new tests for problems that were fixed in 5.10.
> > Er.... 5.10 and 5.9.  I have not been good at sending to fstests
> > upstream lately. :( :(
> 
> It seems all these tests are regression tests for bugs that have been
> fixed in v5.10 cycle, and some of the tests didn't list the associated
> commits that fixed the bug, and some tests listed the patch titles but
> not the commit IDs. Would you please fix them up as well?

Yes, I'll do that.

--D

> > 
> > If you're going to start using this mess, you probably ought to just
> > pull from my git trees, which are linked below.
> > 
> > This is an extraordinary way to destroy everything.  Enjoy!
> > Comments and questions are, as always, welcome.
> > 
> > --D
> > 
> > fstests git tree:
> > https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=test-fixes-5.10
> > ---
> >  tests/generic/947     |  117 ++++++++++++++++++++++++++++++++
> >  tests/generic/947.out |   15 ++++
> >  tests/generic/948     |   90 ++++++++++++++++++++++++
> >  tests/generic/948.out |    9 ++
> >  tests/generic/group   |    2 +
> >  tests/xfs/122         |    1 
> >  tests/xfs/122.out     |    1 
> >  tests/xfs/758         |   59 ++++++++++++++++
> >  tests/xfs/758.out     |    2 +
> >  tests/xfs/759         |   99 +++++++++++++++++++++++++++
> >  tests/xfs/759.out     |    2 +
> >  tests/xfs/760         |   66 ++++++++++++++++++
> >  tests/xfs/760.out     |    9 ++
> >  tests/xfs/761         |   42 +++++++++++
> >  tests/xfs/761.out     |    1 
> 
> "Silence is golden" is missed in 761.out :)
> 
> Thanks,
> Eryu
> 
> >  tests/xfs/763         |  181 +++++++++++++++++++++++++++++++++++++++++++++++++
> >  tests/xfs/763.out     |   91 +++++++++++++++++++++++++
> >  tests/xfs/915         |  176 ++++++++++++++++++++++++++++++++++++++++++++++++
> >  tests/xfs/915.out     |  151 +++++++++++++++++++++++++++++++++++++++++
> >  tests/xfs/group       |    6 ++
> >  20 files changed, 1119 insertions(+), 1 deletion(-)
> >  create mode 100755 tests/generic/947
> >  create mode 100644 tests/generic/947.out
> >  create mode 100755 tests/generic/948
> >  create mode 100644 tests/generic/948.out
> >  create mode 100755 tests/xfs/758
> >  create mode 100644 tests/xfs/758.out
> >  create mode 100755 tests/xfs/759
> >  create mode 100644 tests/xfs/759.out
> >  create mode 100755 tests/xfs/760
> >  create mode 100644 tests/xfs/760.out
> >  create mode 100755 tests/xfs/761
> >  create mode 100644 tests/xfs/761.out
> >  create mode 100755 tests/xfs/763
> >  create mode 100644 tests/xfs/763.out
> >  create mode 100755 tests/xfs/915
> >  create mode 100644 tests/xfs/915.out

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

* Re: [PATCH 7/7] xfs/122: fix test for xfs_attr_shortform_t conversion
  2020-10-29 11:17   ` Amir Goldstein
@ 2020-10-29 18:17     ` Darrick J. Wong
  0 siblings, 0 replies; 14+ messages in thread
From: Darrick J. Wong @ 2020-10-29 18:17 UTC (permalink / raw)
  To: Amir Goldstein; +Cc: Eryu Guan, linux-xfs, fstests

On Thu, Oct 29, 2020 at 01:17:40PM +0200, Amir Goldstein wrote:
> On Wed, Oct 28, 2020 at 10:24 PM Darrick J. Wong
> <darrick.wong@oracle.com> wrote:
> >
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > The typedef xfs_attr_shortform_t was converted to a struct in 5.10.
> > Update this test to pass.
> >
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> >  tests/xfs/122.out |    1 +
> >  1 file changed, 1 insertion(+)
> >
> >
> > diff --git a/tests/xfs/122.out b/tests/xfs/122.out
> > index 45c42e59..cfe09c6d 100644
> > --- a/tests/xfs/122.out
> > +++ b/tests/xfs/122.out
> > @@ -62,6 +62,7 @@ sizeof(struct xfs_agfl) = 36
> >  sizeof(struct xfs_attr3_leaf_hdr) = 80
> >  sizeof(struct xfs_attr3_leafblock) = 88
> >  sizeof(struct xfs_attr3_rmt_hdr) = 56
> > +sizeof(struct xfs_attr_shortform) = 8
> >  sizeof(struct xfs_btree_block) = 72
> >  sizeof(struct xfs_btree_block_lhdr) = 64
> >  sizeof(struct xfs_btree_block_shdr) = 48
> >
> 
> Maybe remove comment
> 
> # missing:
> # xfs_attr_shortform_t
> 
> While at it.

I'll do that, thanks!

--D

> Thanks,
> Amir.

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

* Re: [PATCH 7/7] xfs/122: fix test for xfs_attr_shortform_t conversion
  2020-10-27 19:03 ` [PATCH 7/7] xfs/122: fix test for xfs_attr_shortform_t conversion Darrick J. Wong
  2020-10-29 10:12   ` Chandan Babu R
@ 2020-10-29 11:17   ` Amir Goldstein
  2020-10-29 18:17     ` Darrick J. Wong
  1 sibling, 1 reply; 14+ messages in thread
From: Amir Goldstein @ 2020-10-29 11:17 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Eryu Guan, linux-xfs, fstests

On Wed, Oct 28, 2020 at 10:24 PM Darrick J. Wong
<darrick.wong@oracle.com> wrote:
>
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> The typedef xfs_attr_shortform_t was converted to a struct in 5.10.
> Update this test to pass.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  tests/xfs/122.out |    1 +
>  1 file changed, 1 insertion(+)
>
>
> diff --git a/tests/xfs/122.out b/tests/xfs/122.out
> index 45c42e59..cfe09c6d 100644
> --- a/tests/xfs/122.out
> +++ b/tests/xfs/122.out
> @@ -62,6 +62,7 @@ sizeof(struct xfs_agfl) = 36
>  sizeof(struct xfs_attr3_leaf_hdr) = 80
>  sizeof(struct xfs_attr3_leafblock) = 88
>  sizeof(struct xfs_attr3_rmt_hdr) = 56
> +sizeof(struct xfs_attr_shortform) = 8
>  sizeof(struct xfs_btree_block) = 72
>  sizeof(struct xfs_btree_block_lhdr) = 64
>  sizeof(struct xfs_btree_block_shdr) = 48
>

Maybe remove comment

# missing:
# xfs_attr_shortform_t

While at it.

Thanks,
Amir.

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

* Re: [PATCH 7/7] xfs/122: fix test for xfs_attr_shortform_t conversion
  2020-10-27 19:03 ` [PATCH 7/7] xfs/122: fix test for xfs_attr_shortform_t conversion Darrick J. Wong
@ 2020-10-29 10:12   ` Chandan Babu R
  2020-10-29 11:17   ` Amir Goldstein
  1 sibling, 0 replies; 14+ messages in thread
From: Chandan Babu R @ 2020-10-29 10:12 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: guaneryu, linux-xfs, fstests

On Wednesday 28 October 2020 12:33:16 AM IST Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> The typedef xfs_attr_shortform_t was converted to a struct in 5.10.
> Update this test to pass.
>

Looks good to me.

Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>

> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  tests/xfs/122.out |    1 +
>  1 file changed, 1 insertion(+)
> 
> 
> diff --git a/tests/xfs/122.out b/tests/xfs/122.out
> index 45c42e59..cfe09c6d 100644
> --- a/tests/xfs/122.out
> +++ b/tests/xfs/122.out
> @@ -62,6 +62,7 @@ sizeof(struct xfs_agfl) = 36
>  sizeof(struct xfs_attr3_leaf_hdr) = 80
>  sizeof(struct xfs_attr3_leafblock) = 88
>  sizeof(struct xfs_attr3_rmt_hdr) = 56
> +sizeof(struct xfs_attr_shortform) = 8
>  sizeof(struct xfs_btree_block) = 72
>  sizeof(struct xfs_btree_block_lhdr) = 64
>  sizeof(struct xfs_btree_block_shdr) = 48
> 
> 


-- 
chandan




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

* [PATCH 7/7] xfs/122: fix test for xfs_attr_shortform_t conversion
  2020-10-27 19:02 Darrick J. Wong
@ 2020-10-27 19:03 ` Darrick J. Wong
  2020-10-29 10:12   ` Chandan Babu R
  2020-10-29 11:17   ` Amir Goldstein
  0 siblings, 2 replies; 14+ messages in thread
From: Darrick J. Wong @ 2020-10-27 19:03 UTC (permalink / raw)
  To: darrick.wong, guaneryu; +Cc: linux-xfs, fstests

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

The typedef xfs_attr_shortform_t was converted to a struct in 5.10.
Update this test to pass.

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


diff --git a/tests/xfs/122.out b/tests/xfs/122.out
index 45c42e59..cfe09c6d 100644
--- a/tests/xfs/122.out
+++ b/tests/xfs/122.out
@@ -62,6 +62,7 @@ sizeof(struct xfs_agfl) = 36
 sizeof(struct xfs_attr3_leaf_hdr) = 80
 sizeof(struct xfs_attr3_leafblock) = 88
 sizeof(struct xfs_attr3_rmt_hdr) = 56
+sizeof(struct xfs_attr_shortform) = 8
 sizeof(struct xfs_btree_block) = 72
 sizeof(struct xfs_btree_block_lhdr) = 64
 sizeof(struct xfs_btree_block_shdr) = 48


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

end of thread, other threads:[~2020-11-23 18:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11  0:43 [PATCH 0/7] various: test xfs things fixed in 5.10 Darrick J. Wong
2020-11-11  0:43 ` [PATCH 1/7] xfs: test fallocate ops when rt extent size is and isn't a power of 2 Darrick J. Wong
2020-11-11  0:44 ` [PATCH 2/7] xfs: test regression in xfs_bmap_validate_extent Darrick J. Wong
2020-11-11  0:44 ` [PATCH 3/7] generic: test reflink and copy_file_range behavior with O_SYNC and FS_XFLAG_SYNC files Darrick J. Wong
2020-11-11  0:44 ` [PATCH 4/7] xfs: test rtalloc alignment and math errors Darrick J. Wong
2020-11-11  0:44 ` [PATCH 5/7] xfs: test mkfs min log size calculation w/ rt volumes Darrick J. Wong
2020-11-11  0:44 ` [PATCH 6/7] xfs: test quota softlimit warning functionality Darrick J. Wong
2020-11-11  0:44 ` [PATCH 7/7] xfs/122: fix test for xfs_attr_shortform_t conversion Darrick J. Wong
2020-11-22 14:27 ` [PATCH 0/7] various: test xfs things fixed in 5.10 Eryu Guan
2020-11-23 18:20   ` Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2020-10-27 19:02 Darrick J. Wong
2020-10-27 19:03 ` [PATCH 7/7] xfs/122: fix test for xfs_attr_shortform_t conversion Darrick J. Wong
2020-10-29 10:12   ` Chandan Babu R
2020-10-29 11:17   ` Amir Goldstein
2020-10-29 18:17     ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).