summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/bugs/bug-797171.t14
-rwxr-xr-xtests/bugs/bug-858215.t4
-rw-r--r--tests/include.rc1
-rw-r--r--tests/volume.rc6
4 files changed, 13 insertions, 12 deletions
diff --git a/tests/bugs/bug-797171.t b/tests/bugs/bug-797171.t
index d5603676bf8..a1b28d9ff66 100755
--- a/tests/bugs/bug-797171.t
+++ b/tests/bugs/bug-797171.t
@@ -26,18 +26,18 @@ rm -f $M0/*;
pid_file=$(ls /var/lib/glusterd/vols/$V0/run);
brick_pid=$(cat /var/lib/glusterd/vols/$V0/run/$pid_file);
-mkdir /tmp/statedump_tmp/;
-echo "path=/tmp/statedump_tmp" > /tmp/glusterdump.options;
-echo "all=yes" >> /tmp/glusterdump.options;
+mkdir $statedumpdir/statedump_tmp/;
+echo "path=$statedumpdir/statedump_tmp" > $statedumpdir/glusterdump.options;
+echo "all=yes" >> $statedumpdir/glusterdump.options;
TEST $CLI volume statedump $V0 history;
-file_name=$(ls /tmp/statedump_tmp);
-TEST grep "xlator.debug.trace.history" /tmp/statedump_tmp/$file_name;
+file_name=$(ls $statedumpdir/statedump_tmp);
+TEST grep "xlator.debug.trace.history" $statedumpdir/statedump_tmp/$file_name;
TEST umount $M0
-rm -rf /tmp/statedump_tmp;
-rm -f /tmp/glusterdump.options;
+rm -rf $statedumpdir/statedump_tmp;
+rm -f $statedumpdir/glusterdump.options;
cleanup;
diff --git a/tests/bugs/bug-858215.t b/tests/bugs/bug-858215.t
index c93ff8b9725..aee7d5fcb5a 100755
--- a/tests/bugs/bug-858215.t
+++ b/tests/bugs/bug-858215.t
@@ -55,7 +55,7 @@ do
done
dump_dir='/tmp/gerrit_glusterfs'
-cat >/tmp/glusterdump.options <<EOF
+cat >$statedumpdir/glusterdump.options <<EOF
all=yes
path=$dump_dir
EOF
@@ -76,6 +76,6 @@ TEST $CLI volume delete $V0;
TEST ! $CLI volume info $V0;
TEST rm -rf $dump_dir;
-TEST rm /tmp/glusterdump.options;
+TEST rm $statedumpdir/glusterdump.options;
cleanup;
diff --git a/tests/include.rc b/tests/include.rc
index 03ffe4a5cc1..1d1386f9826 100644
--- a/tests/include.rc
+++ b/tests/include.rc
@@ -6,6 +6,7 @@ V0=${V0:=patchy}; # volume name to use in tests
B0=${B0:=/d/backends}; # top level of brick directories
H0=${H0:=`hostname --fqdn`}; # hostname
DEBUG=${DEBUG:=0} # turn on debugging?
+statedumpdir=`gluster --print-statedumpdir`; # Default directory for statedump
CLI="gluster --mode=script";
diff --git a/tests/volume.rc b/tests/volume.rc
index 9ecb24d405c..e8dd2eeb778 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -38,12 +38,12 @@ function generate_client_statedump {
local fpath=""
client_pid=$1
#remove old stale statedumps
- rm -f /tmp/glusterdump.$client_pid.dump.* 2>/dev/null
+ rm -f $statedumpdir/glusterdump.$client_pid.dump.* 2>/dev/null
kill -USR1 $client_pid
#Wait till the statedump is generated
sleep 1
- fname=$(ls /tmp | grep -E "glusterdump.$client_pid.dump.*")
- echo /tmp/$fname
+ fname=$(ls $statedumpdir | grep -E "glusterdump.$client_pid.dump.*")
+ echo $statedumpdir/$fname
}
function generate_mount_statedump {