linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: linux-fsdevel@vger.kernel.org
Cc: linux-xfs@vger.kernel.org, Jeff Moyer <jmoyer@redhat.com>
Subject: [PATCH 1/3] dax/dm: disable testing on devices that don't support dax
Date: Wed,  5 Feb 2020 17:48:16 -0500	[thread overview]
Message-ID: <20200205224818.18707-2-jmoyer@redhat.com> (raw)
In-Reply-To: <20200205224818.18707-1-jmoyer@redhat.com>

Move the hack out of dmflakey and put it into _require_dm_target.  This
fixes up a lot of missed tests that are failing due to the lack of dax
support (such as tests on dm-thin, snapshot, etc).

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
---
 common/dmflakey |  5 -----
 common/rc       | 11 +++++++++++
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/common/dmflakey b/common/dmflakey
index 2af3924d..b4e11ae9 100644
--- a/common/dmflakey
+++ b/common/dmflakey
@@ -8,11 +8,6 @@ FLAKEY_ALLOW_WRITES=0
 FLAKEY_DROP_WRITES=1
 FLAKEY_ERROR_WRITES=2
 
-echo $MOUNT_OPTIONS | grep -q dax
-if [ $? -eq 0 ]; then
-	_notrun "Cannot run tests with DAX on dmflakey devices"
-fi
-
 _init_flakey()
 {
 	local BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
diff --git a/common/rc b/common/rc
index eeac1355..785f34c6 100644
--- a/common/rc
+++ b/common/rc
@@ -1874,6 +1874,17 @@ _require_dm_target()
 	_require_sane_bdev_flush $SCRATCH_DEV
 	_require_command "$DMSETUP_PROG" dmsetup
 
+	echo $MOUNT_OPTIONS | grep -q dax
+	if [ $? -eq 0 ]; then
+		case $target in
+		stripe|linear|error)
+			;;
+		*)
+			_notrun "Cannot run tests with DAX on $target devices."
+			;;
+		esac
+	fi
+
 	modprobe dm-$target >/dev/null 2>&1
 
 	$DMSETUP_PROG targets 2>&1 | grep -q ^$target
-- 
2.19.1


  reply	other threads:[~2020-02-05 22:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 22:48 [PATCH 0/3] fstests: fixes for 64k pages and dax Jeff Moyer
2020-02-05 22:48 ` Jeff Moyer [this message]
2020-02-05 22:48 ` [PATCH 2/3] t_mmap_collision: fix hard-coded page size Jeff Moyer
2020-02-05 22:48 ` [PATCH 3/3] xfs/300: modify test to work on any fs block size Jeff Moyer
2020-02-05 23:06 ` [PATCH 0/3] fstests: fixes for 64k pages and dax Dave Chinner
2020-02-06 14:36   ` Jeff Moyer

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=20200205224818.18707-2-jmoyer@redhat.com \
    --to=jmoyer@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --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 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).