summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2013-01-24 11:39:48 +0530
committerAnand Avati <avati@redhat.com>2013-01-29 15:27:29 -0800
commitb8d5fd2b88db7e18a10e57a0edf1a41eda4f5314 (patch)
tree7fb29a1060e0fc802f81473114117aabec4db507 /tests
parent326a47939dabff218205ca2959b9701e2e0ce47c (diff)
glusterfs : Moved option files, and statedumps from /tmp
Change-Id: Ibdede396c4d6859225937316b7a59a661bcaf9f5 BUG: 764890 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/4422 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
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 d5603676b..a1b28d9ff 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 c93ff8b97..aee7d5fcb 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 03ffe4a5c..1d1386f98 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 9ecb24d40..e8dd2eeb7 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 {