summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2019-07-29 15:07:58 +0530
committerAmar Tumballi <amarts@redhat.com>2019-07-30 13:01:36 +0000
commit363527ebc4140e99f182770915b72acdcb5c2bdf (patch)
tree659ef4079419147ef4efc9b23352ce5901d6daa3
parent22bd0570c04cb94d1a954b56d11db61790ff20b2 (diff)
trace: add more coverage by testing it with glfs-coverage too.
make sure to provide 'log-file' option, so we can see the logs. This test does test volgen inserting the trace xlator in server graph. Updates: bz#1693692 Change-Id: I26c736b04376674b4c094d48060660421e6c983c Signed-off-by: Amar Tumballi <amarts@redhat.com>
-rwxr-xr-xtests/basic/trace.t22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/basic/trace.t b/tests/basic/trace.t
index 3153222df8d..01e7c9e0a25 100755
--- a/tests/basic/trace.t
+++ b/tests/basic/trace.t
@@ -26,8 +26,30 @@ TEST $(dirname $0)/rpc-coverage.sh --no-locks $M0
# Take statedump to get maximum code coverage
pid=$(ps auxww | grep glusterfs | grep -E "template.vol" | awk '{print $2}' | head -1)
+
TEST generate_statedump $pid
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
+# Now, use the glusterd way of enabling trace
+TEST glusterd
+TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}{1,2,3,4,5,6};
+
+TEST $CLI volume set $V0 debug.trace marker
+TEST $CLI volume set $V0 debug.log-file yes
+#TEST $CLI volume set $V0 debug.log-history yes
+
+TEST $CLI volume start $V0;
+
+TEST $GFS -s $H0 --volfile-id $V0 $M1;
+
+TEST $(dirname $0)/rpc-coverage.sh --no-locks $M1
+cp $(dirname ${0})/gfapi/glfsxmp-coverage.c ./glfsxmp.c
+build_tester ./glfsxmp.c -lgfapi
+./glfsxmp $V0 $H0 > /dev/null
+cleanup_tester ./glfsxmp
+rm ./glfsxmp.c
+
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M1
+
cleanup;