[PATCH v4 1/4] DAX-DIO: make dax_to_non_dax dio test solo

Xiong Zhou
2017-04-17T07:14:29Z

Split it from old testsets in generic/413 and xfs/260, since this
test need pmem device underneath has memory(struct page) backend.
We will _notrun the solo if the device is not compatible for the
test, preveting its confusing failure.

The other dax/nondax dio tests don't have this limitation.

Signed-off-by: Xiong Zhou <xzhou@redhat.com>
---
tests/generic/413 | 13 +------------
tests/xfs/260 | 17 +----------------
2 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/tests/generic/413 b/tests/generic/413
index a1cc514..32e0966 100755
--- a/tests/generic/413
+++ b/tests/generic/413
@@ -85,17 +85,6 @@ t_nondax_to_dax()
$SCRATCH_MNT/tf_d $1 "buffered nondax to dax"
}

-t_dax_to_nondax()
-{
- prep_files
- src/t_mmap_dio $SCRATCH_MNT/tf_s \
- $TEST_DIR/tf_d $1 "dio dax to nondax"
-
- prep_files
- src/t_mmap_dio -b $SCRATCH_MNT/tf_s \
- $TEST_DIR/tf_d $1 "buffered dax to nondax"
-}
-
t_both_nondax()
{
prep_files
@@ -109,8 +98,8 @@ t_both_nondax()
# $1 mmap read/write size
t_mmap_dio_dax()
{
+ # t_dax_to_nondax run in separated case
t_both_dax $1
- t_dax_to_nondax $1
t_nondax_to_dax $1
t_both_nondax $1
}
diff --git a/tests/xfs/260 b/tests/xfs/260
index e613cc0..0763450 100755
--- a/tests/xfs/260
+++ b/tests/xfs/260
@@ -88,21 +88,6 @@ t_nondax_to_dax()
$1 "buffered nondax to dax"
}

-t_dax_to_nondax()
-{
- prep_files
- $XFS_IO_PROG -c "chattr +x" $SCRATCH_MNT/tf_s
- $XFS_IO_PROG -c "chattr -x" $SCRATCH_MNT/tf_d
- src/t_mmap_dio $SCRATCH_MNT/tf_{s,d} \
- $1 "dio dax to nondax"
-
- prep_files
- $XFS_IO_PROG -c "chattr +x" $SCRATCH_MNT/tf_s
- $XFS_IO_PROG -c "chattr -x" $SCRATCH_MNT/tf_d
- src/t_mmap_dio -b $SCRATCH_MNT/tf_{s,d} \
- $1 "buffered dax to nondax"
-}
-
t_both_nondax()
{
prep_files
@@ -119,8 +104,8 @@ t_both_nondax()
# $1 mmap read/write size
t_dax_flag_mmap_dio()
{
+ # t_dax_to_nondax run in separated case
t_both_dax $1
- t_dax_to_nondax $1
t_nondax_to_dax $1
t_both_nondax $1
}
--
1.8.3.1