summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2020-04-22 08:52:41 +0530
committerPranith Kumar K <pkarampu@redhat.com>2020-04-22 08:58:49 +0530
commit9a4bfa7908ea1b2c336cdd36371dd3f5e22dff86 (patch)
treeae18c8435cefe58157076e02b1322d0302e1910f
parente93163a5e06d9b5ff2da31b55bfd1fb3f522623f (diff)
tests: Fix spurious failure of tests/basic/quick-read-with-upcall.t
Problem: The test is failing at 14:56:41 ok 13, LINENUM:38 14:56:41 not ok 14 Got "test-message0" instead of "test-message1", LINENUM:41 14:56:41 FAILED COMMAND: test-message1 cat /mnt/glusterfs/1/test.txt This happens because fuse sometimes doesn't send 'read' fop to glusterfs and is served from cache. Fix: Mount with direct-io-mode=yes so that read is always received by gluster Fixes: #1190 Change-Id: I369e2024a85dc492dc24c7579b161fb965f55d19 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
-rw-r--r--tests/basic/quick-read-with-upcall.t13
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/basic/quick-read-with-upcall.t b/tests/basic/quick-read-with-upcall.t
index 2012053d125..a70277f22d3 100644
--- a/tests/basic/quick-read-with-upcall.t
+++ b/tests/basic/quick-read-with-upcall.t
@@ -15,8 +15,8 @@ TEST $CLI volume create $V0 $H0:$B0/${V0}{1..2};
TEST $CLI volume start $V0
# Mount FUSE without selinux:
-TEST glusterfs -s $H0 --volfile-id $V0 $M0;
-TEST glusterfs -s $H0 --volfile-id $V0 $M1;
+TEST glusterfs -s $H0 --volfile-id $V0 --direct-io-mode=enable $M0;
+TEST glusterfs -s $H0 --volfile-id $V0 --direct-io-mode=enable $M1;
D0="test-message0";
D1="test-message1";
@@ -37,10 +37,7 @@ TEST write_to "$M0/test.txt" "$D1"
EXPECT "$D1" cat $M0/test.txt
EXPECT "$D0" cat $M1/test.txt
-# This is 3.7 for no good reason. We could have kept this to
-# any number above 2 seconds. Noticed that when it is 2 seconds, or
-# less, there is a possibility of not getting a lookup on the same inode.
-sleep 3.7
+sleep 1
# TODO: This line normally fails
EXPECT "$D1" cat $M1/test.txt
@@ -73,7 +70,3 @@ EXPECT "$D0" cat $M1/test2.txt
TEST write_to "$M0/test2.txt" "$D1"
EXPECT "$D1" cat $M0/test2.txt
EXPECT "$D1" cat $M1/test2.txt
-
-
-#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=1718191
-#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=1718191