Message ID | 1455069001-17846-5-git-send-email-tytso@mit.edu (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Feb 09, 2016 at 08:49:53PM -0500, Theodore Ts'o wrote: > From: Hugh Dickins <hughd@google.com> > > generic/113, generic/125, generic/214 each use O_DIRECT at some > stage in their tests, so check O_DIRECT support before running them. > > Signed-off-by: Hugh Dickins <hughd@google.com> > Signed-off-by: Theodore Ts'o <tytso@mit.edu> > --- > tests/generic/113 | 1 + > tests/generic/125 | 1 + > tests/generic/214 | 1 + > 3 files changed, 3 insertions(+) > > diff --git a/tests/generic/113 b/tests/generic/113 > index 7208fa2..54d6191 100755 > --- a/tests/generic/113 > +++ b/tests/generic/113 > @@ -77,6 +77,7 @@ _do_test() > _supported_fs generic > _supported_os Linux > _require_test > +_require_odirect > > [ -x $here/ltp/aio-stress ] || _notrun "aio-stress not built for this platform" > > diff --git a/tests/generic/125 b/tests/generic/125 > index bcf9b3e..67eb63f 100755 > --- a/tests/generic/125 > +++ b/tests/generic/125 > @@ -41,6 +41,7 @@ _supported_os Linux > > _require_test > _require_user > +_require_odirect generic/125 only runs "./src/ftrunc" and I don't see where O_DIRECT is being used, did I miss anything? Thanks, Eryu > > TESTDIR=$TEST_DIR/ftrunc > TESTFILE=$TESTDIR/ftrunc.tmp > diff --git a/tests/generic/214 b/tests/generic/214 > index dff267e..7838047 100755 > --- a/tests/generic/214 > +++ b/tests/generic/214 > @@ -55,6 +55,7 @@ rm -f $seqres.full > rm -f $TEST_DIR/ouch* > > _require_xfs_io_command "falloc" > +_require_odirect > > # Ok, off we go. > > -- > 2.5.0 > > -- > To unsubscribe from this list: send the line "unsubscribe fstests" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Feb 10, 2016 at 05:15:13PM +0800, Eryu Guan wrote: > > generic/125 only runs "./src/ftrunc" and I don't see where O_DIRECT is > being used, did I miss anything? generic/125 also calls "src/trunc", which does use O_DIRECT. (Hmm, and it assumes '.' is in the test's path, which I don't think is a safe thing to do.) - Ted -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Feb 10, 2016 at 11:11:35AM -0500, Theodore Ts'o wrote: > On Wed, Feb 10, 2016 at 05:15:13PM +0800, Eryu Guan wrote: > > > > generic/125 only runs "./src/ftrunc" and I don't see where O_DIRECT is > > being used, did I miss anything? > > generic/125 also calls "src/trunc", which does use O_DIRECT. > > (Hmm, and it assumes '.' is in the test's path, which I don't think is > a safe thing to do.) Perhaps one should question whether generic/125 is actually testing anything useful in the first place. i.e. it's writing 16k, then truncating it back to 1000 bytes, then reading it with direct IO for 60s to see if it returns the correct data for that entire time. What, exactly, is going to cause that test to fail? Keep in mind this was ported from a CXFS test, where the metadata server did the truncation operation (including the data zeroing), but the reads are being done from the client. i.e. it was designed to test whether a remote machine is doing a truncate correctly on a access shared disk. IMO, I think we just remove the test, src/trunc.c and src/ftrunc.c because it's 60s of testing that doesn't actually provide any value to us. Cheers, Dave.
On Thu, Feb 11, 2016 at 09:51:23AM +1100, Dave Chinner wrote: > Keep in mind this was ported from a CXFS test, where the metadata > server did the truncation operation (including the data zeroing), > but the reads are being done from the client. i.e. it was designed > to test whether a remote machine is doing a truncate correctly on a > access shared disk. Maybe the Ceph folks would care? But I'm happy to replace this with a test that just nukes generic/125. - Ted -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/tests/generic/113 b/tests/generic/113 index 7208fa2..54d6191 100755 --- a/tests/generic/113 +++ b/tests/generic/113 @@ -77,6 +77,7 @@ _do_test() _supported_fs generic _supported_os Linux _require_test +_require_odirect [ -x $here/ltp/aio-stress ] || _notrun "aio-stress not built for this platform" diff --git a/tests/generic/125 b/tests/generic/125 index bcf9b3e..67eb63f 100755 --- a/tests/generic/125 +++ b/tests/generic/125 @@ -41,6 +41,7 @@ _supported_os Linux _require_test _require_user +_require_odirect TESTDIR=$TEST_DIR/ftrunc TESTFILE=$TESTDIR/ftrunc.tmp diff --git a/tests/generic/214 b/tests/generic/214 index dff267e..7838047 100755 --- a/tests/generic/214 +++ b/tests/generic/214 @@ -55,6 +55,7 @@ rm -f $seqres.full rm -f $TEST_DIR/ouch* _require_xfs_io_command "falloc" +_require_odirect # Ok, off we go.