summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2014-11-26 11:40:15 +0100
committerPranith Kumar Karampuri <pkarampu@redhat.com>2014-12-04 04:03:58 -0800
commit1eb11c7ca1eb153c579a127b0fe6c2d4b1bbc7c8 (patch)
treef09e6c6dc7d408e6380eb36a46e5fdd4ec18a10f
parentae744a27602488239ef681510412d0c64607a87f (diff)
Regression test portability: basic/afr/resolve.t
Final test in basic/afr/resolve.t checks for a failure after breaking the backend. But since the tested file was accessed just before that operations, it may still be in kernel page cache. As a result, file read is handled by kernel cache and never sent to the filesystem, and the test is successful where it should have failed. Fix this by waiting 10s before reading the supposed-to-be-broken file. BUG: 1129939 Change-Id: I97efc00bc8a5f954b1df786cdede468af8bf6485 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/9075 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
-rw-r--r--tests/basic/afr/resolve.t4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/basic/afr/resolve.t b/tests/basic/afr/resolve.t
index 27ec25ed7c5..ce7ec841418 100644
--- a/tests/basic/afr/resolve.t
+++ b/tests/basic/afr/resolve.t
@@ -45,5 +45,7 @@ echo jkl > $M1/b
TEST setfattr -x trusted.afr.$V0-client-0 $B0/${V0}1
TEST $CLI volume start $V0 force
EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status $V0 0
-TEST ! cat $M0/b
+# The kernel knows nothing about the tricks done to the volume, and the file
+# may still be in page cache. Wait for timeout.
+EXPECT_WITHIN 10 "" cat $M0/b
cleanup