All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: darrick.wong@oracle.com, guaneryu@gmail.com
Cc: Chandan Babu R <chandanrlinux@gmail.com>,
	linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: [PATCH 2/7] xfs: test regression in xfs_bmap_validate_extent
Date: Tue, 10 Nov 2020 16:44:00 -0800	[thread overview]
Message-ID: <160505544097.1388823.12979233028549388010.stgit@magnolia> (raw)
In-Reply-To: <160505542802.1388823.10368384826199448253.stgit@magnolia>

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


  parent reply	other threads:[~2020-11-11  0:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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:02 ` [PATCH 2/7] xfs: test regression in xfs_bmap_validate_extent Darrick J. Wong
2020-10-29  6:45   ` Chandan Babu R

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=160505544097.1388823.12979233028549388010.stgit@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=chandanrlinux@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is 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.