* [ndctl PATCH 0/2] test/dax.sh: fixup and split by fs
@ 2019-10-26 1:06 Dan Williams
2019-10-26 1:06 ` [ndctl PATCH 1/2] test/dax.sh: Make dax.sh more robust vs small namespaces Dan Williams
2019-10-26 1:06 ` [ndctl PATCH 2/2] test/dax.sh: Split into ext4 and xfs tests Dan Williams
0 siblings, 2 replies; 3+ messages in thread
From: Dan Williams @ 2019-10-26 1:06 UTC (permalink / raw)
To: vishal.l.verma; +Cc: linux-nvdimm
Hi Vishal,
Here's a rework of patch4 from the huge page validation series, and a
lead in fix that was causing the apply-conflict on your end.
---
Dan Williams (2):
test/dax.sh: Make dax.sh more robust vs small namespaces
test/dax.sh: Split into ext4 and xfs tests
test/Makefile.am | 3 +-
test/dax-ext4.sh | 1 +
test/dax-xfs.sh | 1 +
test/dax.sh | 101 +++++++++++++++++++++++++++++++-----------------------
4 files changed, 62 insertions(+), 44 deletions(-)
create mode 120000 test/dax-ext4.sh
create mode 120000 test/dax-xfs.sh
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ndctl PATCH 1/2] test/dax.sh: Make dax.sh more robust vs small namespaces
2019-10-26 1:06 [ndctl PATCH 0/2] test/dax.sh: fixup and split by fs Dan Williams
@ 2019-10-26 1:06 ` Dan Williams
2019-10-26 1:06 ` [ndctl PATCH 2/2] test/dax.sh: Split into ext4 and xfs tests Dan Williams
1 sibling, 0 replies; 3+ messages in thread
From: Dan Williams @ 2019-10-26 1:06 UTC (permalink / raw)
To: vishal.l.verma; +Cc: linux-nvdimm
If the namespace returned by test/dax-dev is too small ext4 may default
to a 1K block-size. A 1K block-size precludes dax operation, so force a
4K block-size in all cases.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
test/dax.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/dax.sh b/test/dax.sh
index 45c2027494e8..44bc6436a4a9 100755
--- a/test/dax.sh
+++ b/test/dax.sh
@@ -68,7 +68,7 @@ json=$($NDCTL list -N -n $dev)
eval $(json2var <<< "$json")
rc=1
-mkfs.ext4 /dev/$blockdev
+mkfs.ext4 -b 4096 /dev/$blockdev
mount /dev/$blockdev $MNT -o dax
fallocate -l 1GiB $MNT/$FILE
run_test $LINENO
@@ -80,7 +80,7 @@ eval $(json2var <<< "$json")
[ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1
#note the blockdev returned from ndctl create-namespace lacks the /dev prefix
-mkfs.ext4 /dev/$blockdev
+mkfs.ext4 -b 4096 /dev/$blockdev
mount /dev/$blockdev $MNT -o dax
fallocate -l 1GiB $MNT/$FILE
run_test $LINENO
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [ndctl PATCH 2/2] test/dax.sh: Split into ext4 and xfs tests
2019-10-26 1:06 [ndctl PATCH 0/2] test/dax.sh: fixup and split by fs Dan Williams
2019-10-26 1:06 ` [ndctl PATCH 1/2] test/dax.sh: Make dax.sh more robust vs small namespaces Dan Williams
@ 2019-10-26 1:06 ` Dan Williams
1 sibling, 0 replies; 3+ messages in thread
From: Dan Williams @ 2019-10-26 1:06 UTC (permalink / raw)
To: vishal.l.verma; +Cc: linux-nvdimm
Given the test can fail based on the fs make it a passed in parameter
and split the tests.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
test/Makefile.am | 3 +-
test/dax-ext4.sh | 1 +
test/dax-xfs.sh | 1 +
test/dax.sh | 101 +++++++++++++++++++++++++++++++-----------------------
4 files changed, 62 insertions(+), 44 deletions(-)
create mode 120000 test/dax-ext4.sh
create mode 120000 test/dax-xfs.sh
diff --git a/test/Makefile.am b/test/Makefile.am
index 84474d080252..829146d5da74 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -46,7 +46,8 @@ TESTS +=\
blk-ns \
pmem-ns \
dax-dev \
- dax.sh \
+ dax-ext4.sh \
+ dax-xfs.sh \
device-dax \
device-dax-fio.sh \
mmap.sh \
diff --git a/test/dax-ext4.sh b/test/dax-ext4.sh
new file mode 120000
index 000000000000..da4ec437a92a
--- /dev/null
+++ b/test/dax-ext4.sh
@@ -0,0 +1 @@
+dax.sh
\ No newline at end of file
diff --git a/test/dax-xfs.sh b/test/dax-xfs.sh
new file mode 120000
index 000000000000..da4ec437a92a
--- /dev/null
+++ b/test/dax-xfs.sh
@@ -0,0 +1 @@
+dax.sh
\ No newline at end of file
diff --git a/test/dax.sh b/test/dax.sh
index 44bc6436a4a9..3933107920a9 100755
--- a/test/dax.sh
+++ b/test/dax.sh
@@ -59,6 +59,56 @@ run_test() {
fi
}
+run_ext4() {
+ mkfs.ext4 -b 4096 /dev/$blockdev
+ mount /dev/$blockdev $MNT -o dax
+ fallocate -l 1GiB $MNT/$FILE
+ run_test $LINENO
+ umount $MNT
+
+ # convert pmem to put the memmap on the device
+ json=$($NDCTL create-namespace -m fsdax -M dev -f -e $dev)
+ eval $(json2var <<< "$json")
+ [ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1
+ #note the blockdev returned from ndctl create-namespace lacks the /dev prefix
+
+ mkfs.ext4 -b 4096 /dev/$blockdev
+ mount /dev/$blockdev $MNT -o dax
+ fallocate -l 1GiB $MNT/$FILE
+ run_test $LINENO
+ umount $MNT
+ json=$($NDCTL create-namespace -m raw -f -e $dev)
+
+ eval $(json2var <<< "$json")
+ [ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1
+ true
+}
+
+run_xfs() {
+ mkfs.xfs -f -d su=2m,sw=1,agcount=2 -m reflink=0 /dev/$blockdev
+ mount /dev/$blockdev $MNT -o dax
+ fallocate -l 1GiB $MNT/$FILE
+ run_test $LINENO
+ umount $MNT
+
+ # convert pmem to put the memmap on the device
+ json=$($NDCTL create-namespace -m fsdax -M dev -f -e $dev)
+ eval $(json2var <<< "$json")
+ [ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1
+ mkfs.xfs -f -d su=2m,sw=1,agcount=2 -m reflink=0 /dev/$blockdev
+
+ mount /dev/$blockdev $MNT -o dax
+ fallocate -l 1GiB $MNT/$FILE
+ run_test $LINENO
+ umount $MNT
+ # revert namespace to raw mode
+
+ json=$($NDCTL create-namespace -m raw -f -e $dev)
+ eval $(json2var <<< "$json")
+ [ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1
+ true
+}
+
set -e
mkdir -p $MNT
trap 'err $LINENO cleanup' ERR
@@ -68,48 +118,13 @@ json=$($NDCTL list -N -n $dev)
eval $(json2var <<< "$json")
rc=1
-mkfs.ext4 -b 4096 /dev/$blockdev
-mount /dev/$blockdev $MNT -o dax
-fallocate -l 1GiB $MNT/$FILE
-run_test $LINENO
-umount $MNT
-
-# convert pmem to put the memmap on the device
-json=$($NDCTL create-namespace -m fsdax -M dev -f -e $dev)
-eval $(json2var <<< "$json")
-[ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1
-
-#note the blockdev returned from ndctl create-namespace lacks the /dev prefix
-mkfs.ext4 -b 4096 /dev/$blockdev
-mount /dev/$blockdev $MNT -o dax
-fallocate -l 1GiB $MNT/$FILE
-run_test $LINENO
-umount $MNT
-
-json=$($NDCTL create-namespace -m raw -f -e $dev)
-eval $(json2var <<< "$json")
-[ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1
-
-mkfs.xfs -f -d su=2m,sw=1,agcount=2 -m reflink=0 /dev/$blockdev
-mount /dev/$blockdev $MNT -o dax
-fallocate -l 1GiB $MNT/$FILE
-run_test $LINENO
-umount $MNT
-
-# convert pmem to put the memmap on the device
-json=$($NDCTL create-namespace -m fsdax -M dev -f -e $dev)
-eval $(json2var <<< "$json")
-[ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1
-
-mkfs.xfs -f -d su=2m,sw=1,agcount=2 -m reflink=0 /dev/$blockdev
-mount /dev/$blockdev $MNT -o dax
-fallocate -l 1GiB $MNT/$FILE
-run_test $LINENO
-umount $MNT
-
-# revert namespace to raw mode
-json=$($NDCTL create-namespace -m raw -f -e $dev)
-eval $(json2var <<< "$json")
-[ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1
+if [ $(basename $0) = "dax-ext4.sh" ]; then
+ run_ext4
+elif [ $(basename $0) = "dax-xfs.sh" ]; then
+ run_xfs
+else
+ run_ext4
+ run_xfs
+fi
exit 0
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-26 1:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-26 1:06 [ndctl PATCH 0/2] test/dax.sh: fixup and split by fs Dan Williams
2019-10-26 1:06 ` [ndctl PATCH 1/2] test/dax.sh: Make dax.sh more robust vs small namespaces Dan Williams
2019-10-26 1:06 ` [ndctl PATCH 2/2] test/dax.sh: Split into ext4 and xfs tests Dan Williams
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).