summaryrefslogtreecommitdiffstats
path: root/tests/basic/ec
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basic/ec')
-rw-r--r--tests/basic/ec/ec-common5
-rw-r--r--tests/basic/ec/ec.t4
-rw-r--r--tests/basic/ec/self-heal.t4
3 files changed, 13 insertions, 0 deletions
diff --git a/tests/basic/ec/ec-common b/tests/basic/ec/ec-common
index 7abb4f2176d..6453455ba98 100644
--- a/tests/basic/ec/ec-common
+++ b/tests/basic/ec/ec-common
@@ -80,6 +80,11 @@ for dir in . dir1; do
EXPECT "$cs_big" echo $(sha1sum $dir/big | awk '{ print $1 }')
+# Give enough time for current operations to complete. Otherwise the
+# following kill_brick can cause data corruption and self-heal will be
+# needed, but this script is not prepared to handle self-healing.
+ sleep 2
+
for idx in `seq 0 $LAST_BRICK`; do
TEST kill_brick $V0 $H0 $B0/$V0$idx
diff --git a/tests/basic/ec/ec.t b/tests/basic/ec/ec.t
index 7b8a8568129..d69aebfb1b8 100644
--- a/tests/basic/ec/ec.t
+++ b/tests/basic/ec/ec.t
@@ -190,6 +190,8 @@ TEST touch $M0/setxattr
TEST touch $M0/removexattr
TEST setfattr -n user.bar -v "ash_nazg_gimbatul" $M0/removexattr
+sleep 2
+
# Kill a couple of bricks and allow some time for things to settle.
TEST kill_brick $V0 $H0 $B0/${V0}3
TEST kill_brick $V0 $H0 $B0/${V0}8
@@ -216,6 +218,8 @@ TEST setfattr -x user.bar $M0/removexattr
# Test uid/gid behavior
TEST setup_perm_file $M0
+sleep 2
+
# Unmount/remount so that create/write and truncate don't see cached data.
TEST umount $M0
TEST $GFS -s $H0 --volfile-id $V0 $M0
diff --git a/tests/basic/ec/self-heal.t b/tests/basic/ec/self-heal.t
index ae7e4fe495a..5e5ad6b0447 100644
--- a/tests/basic/ec/self-heal.t
+++ b/tests/basic/ec/self-heal.t
@@ -179,6 +179,8 @@ for idx1 in {0..4}; do
done
done
+sleep 2
+
TEST kill_brick $V0 $H0 $B0/${V0}0
TEST kill_brick $V0 $H0 $B0/${V0}1
TEST cp $tmp/test test2
@@ -197,6 +199,8 @@ TEST [ -f test4 ]
EXPECT "2" stat -c "%h" test2
EXPECT "2" stat -c "%h" test4
+sleep 2
+
TEST $CLI volume start $V0 force
# Wait until the killed bricks have been started and recognized by the ec
# xlator