All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sun Ke <sunke32@huawei.com>
To: <fstests@vger.kernel.org>
Cc: <sunke32@huawei.com>
Subject: [PATCH] generic/591: tmpfs do not test with O_DIRECT flag
Date: Fri, 9 Apr 2021 06:38:00 -0400	[thread overview]
Message-ID: <20210409103800.2077384-1-sunke32@huawei.com> (raw)

tmpfs does not support the O_DIRECT flag, so when FSTYP is tmpfs,
do not test with O_DIRECT flag.

Signed-off-by: Sun Ke <sunke32@huawei.com>
---
 tests/generic/591 | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/tests/generic/591 b/tests/generic/591
index d4020463..4b97a2fc 100755
--- a/tests/generic/591
+++ b/tests/generic/591
@@ -31,10 +31,18 @@ _require_test_program "splice-test"
 
 rm -f $seqres.full
 
-$here/src/splice-test -r $TEST_DIR/a
-$here/src/splice-test -rd $TEST_DIR/a
-$here/src/splice-test $TEST_DIR/a
-$here/src/splice-test -d $TEST_DIR/a
+if [ $FSTYP == "tmpfs" ]; then
+	echo "concurrent reader with O_DIRECT"
+	echo "concurrent reader with O_DIRECT"
+	$here/src/splice-test -rd $TEST_DIR/a
+	echo "sequential reader with O_DIRECT"
+	$here/src/splice-test -d $TEST_DIR/a
+else
+	$here/src/splice-test -r $TEST_DIR/a
+	$here/src/splice-test -rd $TEST_DIR/a
+	$here/src/splice-test $TEST_DIR/a
+	$here/src/splice-test -d $TEST_DIR/a
+fi
 
 # success, all done
 status=0
-- 
2.13.6


             reply	other threads:[~2021-04-09 10:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09 10:38 Sun Ke [this message]
2021-04-11  8:48 ` [PATCH] generic/591: tmpfs do not test with O_DIRECT flag Eryu Guan

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=20210409103800.2077384-1-sunke32@huawei.com \
    --to=sunke32@huawei.com \
    --cc=fstests@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.