From 1eb11c7ca1eb153c579a127b0fe6c2d4b1bbc7c8 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Wed, 26 Nov 2014 11:40:15 +0100 Subject: 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 Reviewed-on: http://review.gluster.org/9075 Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri Tested-by: Pranith Kumar Karampuri --- tests/basic/afr/resolve.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit