path: root/tests/line-coverage
diff options
authorAmar Tumballi <>2019-07-30 17:12:58 +0530
committerAmar Tumballi <>2019-07-30 16:26:36 +0000
commita31fad885c30cbc1bea652349c7d52bac1414c08 (patch)
treefd65c42262de5210281038c5244836b394d69a30 /tests/line-coverage
parent1b19ee85d5eec97b21fbd3fe6d283ec38a23028b (diff)
tests: heal-info add --xml option for more coverage
Updates: bz#1693692 Change-Id: I13de7cf4c380b9663e6258e2fd62ce1f180591b4 Signed-off-by: Amar Tumballi <>
Diffstat (limited to 'tests/line-coverage')
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/line-coverage/afr-heal-info.t b/tests/line-coverage/afr-heal-info.t
new file mode 100644
index 0000000..1826659
--- /dev/null
+++ b/tests/line-coverage/afr-heal-info.t
@@ -0,0 +1,43 @@
+#Test that parallel heal-info command execution doesn't result in spurious
+#entries with locking-scheme granular
+. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
+function write_and_del_file {
+ dd of=$M0/a.txt if=/dev/zero bs=1024k count=100
+ rm -f $M0/b.txt
+TEST glusterd
+TEST pidof glusterd
+TEST $CLI volume create $V0 replica 2 $H0:$B0/brick{0,1}
+TEST $CLI volume set $V0 locking-scheme granular
+TEST $CLI volume start $V0
+TEST $GFS --volfile-id=$V0 --volfile-server=$H0 $M0;
+TEST touch $M0/a.txt $M0/b.txt
+write_and_del_file &
+touch $B0/f1 $B0/f2
+# All above is similar to basic/afr/heal-info.t
+TEST $CLI volume heal $V0 enable
+TEST $CLI volume heal $V0 info --xml
+TEST $CLI volume heal $V0 info summary
+TEST $CLI volume heal $V0 info summary --xml
+TEST $CLI volume heal $V0 info split-brain
+TEST $CLI volume heal $V0 info split-brain --xml
+TEST $CLI volume heal $V0 statistics heal-count
+# It may fail as the file is not in splitbrain
+$CLI volume heal $V0 split-brain latest-mtime /a.txt
+TEST $CLI volume heal $V0 disable
+TEST $CLI volume stop $V0