* [PATCH 1/2] Mark tests which use direct I/O with _requires_odirect
@ 2016-04-02 16:56 Theodore Ts'o
2016-04-02 16:56 ` [PATCH 2/2] common: teach _require_odirect that ext4 encryption doesn't support DIO Theodore Ts'o
0 siblings, 1 reply; 3+ messages in thread
From: Theodore Ts'o @ 2016-04-02 16:56 UTC (permalink / raw)
To: fstests; +Cc: Theodore Ts'o
There were a number of tests that use Direct I/O that weren't testing
to make sure O_DIRECT is actually supported. This will be important
for avoiding false positives when testing ext4 encryption (which does
not support DIO for obvious reasons).
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
tests/ext4/301 | 1 +
tests/ext4/302 | 1 +
tests/ext4/303 | 1 +
tests/ext4/304 | 1 +
tests/generic/095 | 1 +
tests/generic/250 | 1 +
tests/generic/252 | 2 +-
tests/generic/331 | 2 +-
tests/generic/332 | 2 +-
9 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/tests/ext4/301 b/tests/ext4/301
index 4e21acd..8e051f9 100755
--- a/tests/ext4/301
+++ b/tests/ext4/301
@@ -42,6 +42,7 @@ _supported_os Linux
_supported_fs ext4
_require_scratch
_require_defrag
+_require_odirect
NUM_JOBS=$((4*LOAD_FACTOR))
BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
diff --git a/tests/ext4/302 b/tests/ext4/302
index 6ed8ce0..e45dfb8 100755
--- a/tests/ext4/302
+++ b/tests/ext4/302
@@ -43,6 +43,7 @@ _supported_os Linux
_supported_fs ext4
_require_scratch
_require_defrag
+_require_odirect
BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
# We need space for 2 files (test file, and donor one)
diff --git a/tests/ext4/303 b/tests/ext4/303
index b925aa3..3519002 100755
--- a/tests/ext4/303
+++ b/tests/ext4/303
@@ -43,6 +43,7 @@ _supported_os Linux
_supported_fs ext4
_require_scratch
_require_defrag
+_require_odirect
BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
# We need space for 3 files (one donor file and two test files)
diff --git a/tests/ext4/304 b/tests/ext4/304
index ceb82d6..952bbb9 100755
--- a/tests/ext4/304
+++ b/tests/ext4/304
@@ -44,6 +44,7 @@ _supported_os Linux
_supported_fs ext4
_require_scratch
_require_defrag
+_require_odirect
BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
# We need space for 2 files (test file, and donor one)
diff --git a/tests/generic/095 b/tests/generic/095
index 1123080..c656ef1 100755
--- a/tests/generic/095
+++ b/tests/generic/095
@@ -44,6 +44,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_scratch
+_require_odirect
iodepth=$((16 * LOAD_FACTOR))
iodepth_batch=$((8 * LOAD_FACTOR))
diff --git a/tests/generic/250 b/tests/generic/250
index b0b175a..6d15de2 100755
--- a/tests/generic/250
+++ b/tests/generic/250
@@ -47,6 +47,7 @@ _supported_os Linux
_require_scratch
_require_dm_target error
_require_xfs_io_command "falloc"
+_require_odirect
rm -f $seqres.full
diff --git a/tests/generic/252 b/tests/generic/252
index fc9a723..ffedd56 100755
--- a/tests/generic/252
+++ b/tests/generic/252
@@ -47,7 +47,7 @@ _supported_os Linux
_require_scratch
_require_dm_target error
_require_xfs_io_command "falloc"
-_require_test_program "aio-dio-regress/aiocp"
+_require_aiodio "aiocp"
AIO_TEST="src/aio-dio-regress/aiocp"
rm -f $seqres.full
diff --git a/tests/generic/331 b/tests/generic/331
index 8d8fd6a..9b91459 100755
--- a/tests/generic/331
+++ b/tests/generic/331
@@ -47,7 +47,7 @@ _supported_os Linux
_require_scratch_reflink
_require_cp_reflink
_require_dm_target error
-_require_test_program "aio-dio-regress/aiocp"
+_require_aiodio "aiocp"
AIO_TEST="src/aio-dio-regress/aiocp"
rm -f $seqres.full
diff --git a/tests/generic/332 b/tests/generic/332
index b805bbd..1fb5611 100755
--- a/tests/generic/332
+++ b/tests/generic/332
@@ -44,7 +44,7 @@ _cleanup()
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_require_test_program "aio-dio-regress/aiocp"
+_require_aiodio "aiocp"
AIO_TEST="src/aio-dio-regress/aiocp"
rm -f $seqres.full
--
2.5.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] common: teach _require_odirect that ext4 encryption doesn't support DIO
2016-04-02 16:56 [PATCH 1/2] Mark tests which use direct I/O with _requires_odirect Theodore Ts'o
@ 2016-04-02 16:56 ` Theodore Ts'o
2016-04-03 23:08 ` Dave Chinner
0 siblings, 1 reply; 3+ messages in thread
From: Theodore Ts'o @ 2016-04-02 16:56 UTC (permalink / raw)
To: fstests; +Cc: Theodore Ts'o
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
common/rc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/common/rc b/common/rc
index 2ccca3b..961601b 100644
--- a/common/rc
+++ b/common/rc
@@ -1916,6 +1916,10 @@ _require_xfs_db_command()
# check that kernel and filesystem support direct I/O
_require_odirect()
{
+ if [ $FSTYP = "ext4" ] &&
+ echo "$MOUNT_OPTIONS" | grep -q "test_dummy_encryption" ; then
+ _notrun "ext4 encryption doesn't support O_DIRECT"
+ fi
testfile=$TEST_DIR/$$.direct
$XFS_IO_PROG -F -f -d -c "pwrite 0 20k" $testfile > /dev/null 2>&1
if [ $? -ne 0 ]; then
--
2.5.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 2/2] common: teach _require_odirect that ext4 encryption doesn't support DIO
2016-04-02 16:56 ` [PATCH 2/2] common: teach _require_odirect that ext4 encryption doesn't support DIO Theodore Ts'o
@ 2016-04-03 23:08 ` Dave Chinner
0 siblings, 0 replies; 3+ messages in thread
From: Dave Chinner @ 2016-04-03 23:08 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: fstests
On Sat, Apr 02, 2016 at 12:56:14PM -0400, Theodore Ts'o wrote:
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> ---
> common/rc | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/common/rc b/common/rc
> index 2ccca3b..961601b 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1916,6 +1916,10 @@ _require_xfs_db_command()
> # check that kernel and filesystem support direct I/O
> _require_odirect()
> {
> + if [ $FSTYP = "ext4" ] &&
> + echo "$MOUNT_OPTIONS" | grep -q "test_dummy_encryption" ; then
> + _notrun "ext4 encryption doesn't support O_DIRECT"
> + fi
> testfile=$TEST_DIR/$$.direct
> $XFS_IO_PROG -F -f -d -c "pwrite 0 20k" $testfile > /dev/null 2>&1
Why isn't the direct IO failing here with an error sufficient to
prevent the test from running?
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-03 23:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-02 16:56 [PATCH 1/2] Mark tests which use direct I/O with _requires_odirect Theodore Ts'o
2016-04-02 16:56 ` [PATCH 2/2] common: teach _require_odirect that ext4 encryption doesn't support DIO Theodore Ts'o
2016-04-03 23:08 ` Dave Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox