diff options
author | Harshavardhana <harsha@harshavardhana.net> | 2014-06-29 18:56:44 -0700 |
---|---|---|
committer | Harshavardhana <harsha@harshavardhana.net> | 2014-08-07 01:17:29 -0700 |
commit | 2ec6ea43f2ddc6c00a030be6d04c00f0924277b7 (patch) | |
tree | b2d98cd8c4760c1af44c8b6a70661fe5566ce6da /tests | |
parent | f29da9bcc812e3d0711005ce86051d70c277a165 (diff) |
build: make GLUSTERD_WORKDIR rely on localstatedir
- Break-way from '/var/lib/glusterd' hard-coded previously,
instead rely on 'configure' value from 'localstatedir'
- Provide 's/lib/db' as default working directory for gluster
management daemon for BSD and Darwin based installations
- loff_t is really off_t on Darwin
- fix-off the warnings generated by clang on FreeBSD/Darwin
- Now 'tests/*' use GLUSTERD_WORKDIR a common variable for all
platforms.
- Define proper environment for running tests, define correct PATH
and LD_LIBRARY_PATH when running tests, so that the desired version
of glusterfs is used, regardless where it is installed.
(Thanks to manu@netbsd.org for this additional work)
Change-Id: I2339a0d9275de5939ccad3e52b535598064a35e7
BUG: 1111774
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8246
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/README.md | 2 | ||||
-rw-r--r-- | tests/basic/mount-options.disabled | 2 | ||||
-rw-r--r-- | tests/bugs/bug-1119582.t | 2 | ||||
-rw-r--r-- | tests/bugs/bug-765380.t | 2 | ||||
-rwxr-xr-x | tests/bugs/bug-797171.t | 4 | ||||
-rwxr-xr-x | tests/bugs/bug-811493.t | 4 | ||||
-rw-r--r-- | tests/bugs/bug-856455.t | 2 | ||||
-rwxr-xr-x | tests/bugs/bug-858215.t | 4 | ||||
-rw-r--r-- | tests/bugs/bug-860663.t | 2 | ||||
-rwxr-xr-x | tests/bugs/bug-861542.t | 2 | ||||
-rw-r--r-- | tests/bugs/bug-862967.t | 2 | ||||
-rw-r--r-- | tests/bugs/bug-867253.t | 4 | ||||
-rw-r--r-- | tests/bugs/bug-874498.t | 2 | ||||
-rwxr-xr-x | tests/bugs/bug-877992.t | 16 | ||||
-rw-r--r-- | tests/bugs/bug-880898.t | 2 | ||||
-rwxr-xr-x | tests/bugs/bug-893378.t | 2 | ||||
-rwxr-xr-x | tests/bugs/bug-902610.t | 4 | ||||
-rwxr-xr-x | tests/bugs/bug-904065.t | 10 | ||||
-rwxr-xr-x | tests/bugs/bug-916549.t | 4 | ||||
-rwxr-xr-x | tests/bugs/bug-955588.t | 2 | ||||
-rw-r--r-- | tests/bugs/bug-958790.t | 6 | ||||
-rw-r--r-- | tests/env.rc.in | 11 | ||||
-rw-r--r-- | tests/include.rc | 26 | ||||
-rw-r--r-- | tests/volume.rc | 4 |
24 files changed, 73 insertions, 48 deletions
diff --git a/tests/README.md b/tests/README.md index 84138fffb45..50e1a9d5005 100644 --- a/tests/README.md +++ b/tests/README.md @@ -34,4 +34,4 @@ Regression tests framework for GlusterFS `gluster-devel@gluster.org`. ## Reminder -- BE WARNED THAT THE TEST CASES DELETE /var/lib/glusterd/* !!! +- BE WARNED THAT THE TEST CASES DELETE ``GLUSTERD_WORKDIR`` * !!! diff --git a/tests/basic/mount-options.disabled b/tests/basic/mount-options.disabled index 67f893ca488..2373e4461ce 100644 --- a/tests/basic/mount-options.disabled +++ b/tests/basic/mount-options.disabled @@ -24,7 +24,7 @@ EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --entry-timeout=0 EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 -TEST glusterfs --volfile=/var/lib/glusterd/vols/$V0/${V0}-fuse.vol $M0 +TEST glusterfs --volfile=$GLUSTERD_WORKDIR/vols/$V0/${V0}-fuse.vol $M0 EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 --log-file=/tmp/a.txt --log-level=DEBUG $M0 diff --git a/tests/bugs/bug-1119582.t b/tests/bugs/bug-1119582.t index 9251927e314..cc388bde605 100644 --- a/tests/bugs/bug-1119582.t +++ b/tests/bugs/bug-1119582.t @@ -17,7 +17,7 @@ TEST $CLI volume set $V0 features.uss disable; TEST killall glusterd; -rm -f /var/lib/glusterd/vols/$V0/snapd.info +rm -f $GLUSTERD_WORKDIR/vols/$V0/snapd.info TEST glusterd diff --git a/tests/bugs/bug-765380.t b/tests/bugs/bug-765380.t index a9784b93d0c..65bc6597eea 100644 --- a/tests/bugs/bug-765380.t +++ b/tests/bugs/bug-765380.t @@ -31,7 +31,7 @@ TEST $CLI volume set $V0 node-uuid-pathinfo on # do not expext hostname as part of the pathinfo string EXPECT 0 count_hostname_or_uuid_from_pathinfo $H0 -uuid=`grep UUID /var/lib/glusterd/glusterd.info | cut -f2 -d=` +uuid=`grep UUID $GLUSTERD_WORKDIR/glusterd.info | cut -f2 -d=` # ... but expect the uuid $REPLICA times EXPECT $REPLICA count_hostname_or_uuid_from_pathinfo $uuid diff --git a/tests/bugs/bug-797171.t b/tests/bugs/bug-797171.t index f160e418c2b..d29c4bd7a2a 100755 --- a/tests/bugs/bug-797171.t +++ b/tests/bugs/bug-797171.t @@ -21,8 +21,8 @@ $M0; touch $M0/{1..22}; rm -f $M0/*; -pid_file=$(ls /var/lib/glusterd/vols/$V0/run); -brick_pid=$(cat /var/lib/glusterd/vols/$V0/run/$pid_file); +pid_file=$(ls $GLUSTERD_WORKDIR/vols/$V0/run); +brick_pid=$(cat $GLUSTERD_WORKDIR/vols/$V0/run/$pid_file); mkdir $statedumpdir/statedump_tmp/; echo "path=$statedumpdir/statedump_tmp" > $statedumpdir/glusterdump.options; diff --git a/tests/bugs/bug-811493.t b/tests/bugs/bug-811493.t index 13e99af5798..966995945cb 100755 --- a/tests/bugs/bug-811493.t +++ b/tests/bugs/bug-811493.t @@ -8,10 +8,10 @@ TEST glusterd TEST pidof glusterd TEST $CLI system uuid reset; -uuid1=$(grep UUID /var/lib/glusterd/glusterd.info | cut -f 2 -d "="); +uuid1=$(grep UUID $GLUSTERD_WORKDIR/glusterd.info | cut -f 2 -d "="); TEST $CLI system uuid reset; -uuid2=$(grep UUID /var/lib/glusterd/glusterd.info | cut -f 2 -d "="); +uuid2=$(grep UUID $GLUSTERD_WORKDIR/glusterd.info | cut -f 2 -d "="); TEST [ $uuid1 != $uuid2 ] diff --git a/tests/bugs/bug-856455.t b/tests/bugs/bug-856455.t index becb202225f..3e314aa5bb3 100644 --- a/tests/bugs/bug-856455.t +++ b/tests/bugs/bug-856455.t @@ -35,7 +35,7 @@ EXPECT $BRICK_COUNT query_pathinfo $M0/f00d; # Kill a brick process and then query for pathinfo # for directories pathinfo should list backend patch from available (up) subvolumes -kill -9 `cat /var/lib/glusterd/vols/$V0/run/$H0-d-backends-${V0}1.pid`; +kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}1.pid`; EXPECT `expr $BRICK_COUNT - 1` query_pathinfo $M0/f00d; diff --git a/tests/bugs/bug-858215.t b/tests/bugs/bug-858215.t index eafb4a9621d..8f11b7f3921 100755 --- a/tests/bugs/bug-858215.t +++ b/tests/bugs/bug-858215.t @@ -39,8 +39,8 @@ TEST touch $M0/newfile; TEST stat $M0/newfile; TEST rm $M0/newfile; -nfs_pid=$(cat /var/lib/glusterd/nfs/run/nfs.pid); -glustershd_pid=$(cat /var/lib/glusterd/glustershd/run/glustershd.pid); +nfs_pid=$(cat $GLUSTERD_WORKDIR/nfs/run/nfs.pid); +glustershd_pid=$(cat $GLUSTERD_WORKDIR/glustershd/run/glustershd.pid); pids=$(pidof glusterfs); for i in $pids diff --git a/tests/bugs/bug-860663.t b/tests/bugs/bug-860663.t index dd3fcc6793b..a4b3d71fb78 100644 --- a/tests/bugs/bug-860663.t +++ b/tests/bugs/bug-860663.t @@ -31,7 +31,7 @@ TEST touch $M0/files{1..10000}; ORIG_FILE_COUNT=`ls -l $M0 | wc -l`; # Kill a brick process -kill -9 `cat /var/lib/glusterd/vols/$V0/run/$H0-d-backends-${V0}1.pid`; +kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}1.pid`; TEST $CLI volume rebalance $V0 fix-layout start diff --git a/tests/bugs/bug-861542.t b/tests/bugs/bug-861542.t index 5fd08f12d02..f4fd4e52a58 100755 --- a/tests/bugs/bug-861542.t +++ b/tests/bugs/bug-861542.t @@ -40,7 +40,7 @@ TEST $CLI --xml volume status $V0; TEST $CLI --xml volume status $V0 detail; # Kill the brick process. After this, port number for the killed (in this case brick) process must be "N/A". -kill `cat /var/lib/glusterd/vols/$V0/run/$H0-d-backends-brick0.pid` +kill `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-brick0.pid` EXPECT "N/A" port_field $V0 '0'; # volume status EXPECT "N/A" port_field $V0 '1'; # volume status detail diff --git a/tests/bugs/bug-862967.t b/tests/bugs/bug-862967.t index 00fa884408a..bd500b1da9d 100644 --- a/tests/bugs/bug-862967.t +++ b/tests/bugs/bug-862967.t @@ -36,7 +36,7 @@ chown 1:1 $M0/dir; # Kill a brick process -kill -9 `cat /var/lib/glusterd/vols/$V0/run/$H0-d-backends-${V0}1.pid`; +kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}1.pid`; # change dir ownership NEW_UID=36; NEW_GID=36; diff --git a/tests/bugs/bug-867253.t b/tests/bugs/bug-867253.t index 560ff11a28e..6b0332959e9 100644 --- a/tests/bugs/bug-867253.t +++ b/tests/bugs/bug-867253.t @@ -35,7 +35,7 @@ TEST mount -o vers=3,nolock,noac -t nfs $H0:/$V0 $M0; touch $M0/files{1..1000}; # Kill a brick process -kill -9 `cat /var/lib/glusterd/vols/$V0/run/$H0-d-backends-${V0}0.pid`; +kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}0.pid`; echo 3 >/proc/sys/vm/drop_caches; @@ -46,7 +46,7 @@ NEW_FILE_COUNT=`echo $?`; TEST $CLI volume start $V0 force # Kill a brick process -kill -9 `cat /var/lib/glusterd/vols/$V0/run/$H0-d-backends-${V0}1.pid`; +kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}1.pid`; echo 3 >/proc/sys/vm/drop_caches; diff --git a/tests/bugs/bug-874498.t b/tests/bugs/bug-874498.t index 9337e6dc680..843698d2a61 100644 --- a/tests/bugs/bug-874498.t +++ b/tests/bugs/bug-874498.t @@ -14,7 +14,7 @@ TEST $CLI volume start $V0; TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0; B0_hiphenated=`echo $B0 | tr '/' '-'` -kill -9 `cat /var/lib/glusterd/vols/$V0/run/$H0$B0_hiphenated-brick1.pid` ; +kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0$B0_hiphenated-brick1.pid` ; echo "GLUSTER FILE SYSTEM" > $M0/FILE1 echo "GLUSTER FILE SYSTEM" > $M0/FILE2 diff --git a/tests/bugs/bug-877992.t b/tests/bugs/bug-877992.t index 932ecc77b86..979cbfd3fdc 100755 --- a/tests/bugs/bug-877992.t +++ b/tests/bugs/bug-877992.t @@ -23,21 +23,21 @@ function hooks_prep () { local event=$1 touch /tmp/pre.out /tmp/post.out - touch /var/lib/glusterd/hooks/1/"$event"/pre/Spre.sh - touch /var/lib/glusterd/hooks/1/"$event"/post/Spost.sh + touch $GLUSTERD_WORKDIR/hooks/1/"$event"/pre/Spre.sh + touch $GLUSTERD_WORKDIR/hooks/1/"$event"/post/Spost.sh - printf "#! /bin/bash\necho "$event"Pre > /tmp/pre.out\n" > /var/lib/glusterd/hooks/1/"$event"/pre/Spre.sh - printf "#! /bin/bash\necho "$event"Post > /tmp/post.out\n" > /var/lib/glusterd/hooks/1/"$event"/post/Spost.sh - chmod a+x /var/lib/glusterd/hooks/1/"$event"/pre/Spre.sh - chmod a+x /var/lib/glusterd/hooks/1/"$event"/post/Spost.sh + printf "#! /bin/bash\necho "$event"Pre > /tmp/pre.out\n" > $GLUSTERD_WORKDIR/hooks/1/"$event"/pre/Spre.sh + printf "#! /bin/bash\necho "$event"Post > /tmp/post.out\n" > $GLUSTERD_WORKDIR/hooks/1/"$event"/post/Spost.sh + chmod a+x $GLUSTERD_WORKDIR/hooks/1/"$event"/pre/Spre.sh + chmod a+x $GLUSTERD_WORKDIR/hooks/1/"$event"/post/Spost.sh } function hooks_cleanup () { local event=$1 rm /tmp/pre.out /tmp/post.out - rm /var/lib/glusterd/hooks/1/"$event"/pre/Spre.sh - rm /var/lib/glusterd/hooks/1/"$event"/post/Spost.sh + rm $GLUSTERD_WORKDIR/hooks/1/"$event"/pre/Spre.sh + rm $GLUSTERD_WORKDIR/hooks/1/"$event"/post/Spost.sh } ## Verify volume is created and its hooks script ran diff --git a/tests/bugs/bug-880898.t b/tests/bugs/bug-880898.t index a069d4a8ac1..8ba35ec1a59 100644 --- a/tests/bugs/bug-880898.t +++ b/tests/bugs/bug-880898.t @@ -9,7 +9,7 @@ TEST $CLI volume create $V0 replica 2 $H0:$B0/brick1 $H0:$B0/brick2 TEST $CLI volume start $V0 pkill glusterfs uuid="" -for line in $(cat /var/lib/glusterd/glusterd.info) +for line in $(cat $GLUSTERD_WORKDIR/glusterd.info) do if [[ $line == UUID* ]] then diff --git a/tests/bugs/bug-893378.t b/tests/bugs/bug-893378.t index fd8b9a7ceba..46aec53cfd3 100755 --- a/tests/bugs/bug-893378.t +++ b/tests/bugs/bug-893378.t @@ -59,7 +59,7 @@ then get_cached_brick CACHED=$? # Kill a brick process - kill -9 `cat /var/lib/glusterd/vols/$V0/run/$H0-d-backends-${V0}$CACHED.pid`; + kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}$CACHED.pid`; fi ## trigger a lookup diff --git a/tests/bugs/bug-902610.t b/tests/bugs/bug-902610.t index 3f26fdde970..9b824b1b558 100755 --- a/tests/bugs/bug-902610.t +++ b/tests/bugs/bug-902610.t @@ -54,8 +54,8 @@ TEST glusterfs -s $H0 --volfile-id $V0 $M0 --entry-timeout=0 --attribute-timeout TEST ls -l $M0 ## kill 2 bricks to bring down available subvol < spread count -kill -9 `cat /var/lib/glusterd/vols/$V0/run/$H0-d-backends-${V0}2.pid`; -kill -9 `cat /var/lib/glusterd/vols/$V0/run/$H0-d-backends-${V0}3.pid`; +kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}2.pid`; +kill -9 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}3.pid`; mkdir $M0/dir1 2>/dev/null diff --git a/tests/bugs/bug-904065.t b/tests/bugs/bug-904065.t index 01880246ef2..0b39adb5c68 100755 --- a/tests/bugs/bug-904065.t +++ b/tests/bugs/bug-904065.t @@ -38,7 +38,7 @@ EXPECT 'Started' volinfo_field $V0 'Status' EXPECT_WITHIN $NFS_EXPORT_TIMEOUT 1 is_nfs_export_available # before mounting the rmtab should be empty -EXPECT '0' count_lines /var/lib/glusterd/nfs/rmtab +EXPECT '0' count_lines $GLUSTERD_WORKDIR/nfs/rmtab TEST mount_nfs $H0:/$V0 $N0 nolock # the output would looks similar to: @@ -46,19 +46,19 @@ TEST mount_nfs $H0:/$V0 $N0 nolock # hostname-0=172.31.122.104 # mountpoint-0=/ufo # -EXPECT '2' count_lines /var/lib/glusterd/nfs/rmtab +EXPECT '2' count_lines $GLUSTERD_WORKDIR/nfs/rmtab # duplicate mounts should not be recorded (client could have crashed) TEST mount_nfs $H0:/$V0 $N1 nolock -EXPECT '2' count_lines /var/lib/glusterd/nfs/rmtab +EXPECT '2' count_lines $GLUSTERD_WORKDIR/nfs/rmtab # removing a mount should (even if there are two) should remove the entry EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N1 -EXPECT '0' count_lines /var/lib/glusterd/nfs/rmtab +EXPECT '0' count_lines $GLUSTERD_WORKDIR/nfs/rmtab # unmounting the other mount should work flawlessly EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0 -EXPECT '0' count_lines /var/lib/glusterd/nfs/rmtab +EXPECT '0' count_lines $GLUSTERD_WORKDIR/nfs/rmtab TEST glusterfs --entry-timeout=0 --attribute-timeout=0 --volfile-server=$H0 --volfile-id=$V0 $M0 diff --git a/tests/bugs/bug-916549.t b/tests/bugs/bug-916549.t index d6a45b8270f..344c6abaaf1 100755 --- a/tests/bugs/bug-916549.t +++ b/tests/bugs/bug-916549.t @@ -8,8 +8,8 @@ TEST glusterd; TEST $CLI volume create $V0 $H0:$B0/${V0}1; TEST $CLI volume start $V0; -pid_file=$(ls /var/lib/glusterd/vols/$V0/run); -brick_pid=$(cat /var/lib/glusterd/vols/$V0/run/$pid_file); +pid_file=$(ls $GLUSTERD_WORKDIR/vols/$V0/run); +brick_pid=$(cat $GLUSTERD_WORKDIR/vols/$V0/run/$pid_file); kill -SIGKILL $brick_pid; diff --git a/tests/bugs/bug-955588.t b/tests/bugs/bug-955588.t index 3f03611673d..182035c6132 100755 --- a/tests/bugs/bug-955588.t +++ b/tests/bugs/bug-955588.t @@ -18,7 +18,7 @@ function get_brick_host_uuid() TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0,1} -uuid=`grep UUID /var/lib/glusterd/glusterd.info | cut -f2 -d=` +uuid=`grep UUID $GLUSTERD_WORKDIR/glusterd.info | cut -f2 -d=` EXPECT $uuid get_brick_host_uuid $V0 TEST $CLI volume delete $V0; diff --git a/tests/bugs/bug-958790.t b/tests/bugs/bug-958790.t index 6cc799c25ed..fc5f63a0c28 100644 --- a/tests/bugs/bug-958790.t +++ b/tests/bugs/bug-958790.t @@ -9,9 +9,9 @@ TEST glusterd; TEST pidof glusterd; TEST $CLI volume info; -touch /var/lib/glusterd/groups/test -echo "read-ahead=off" > /var/lib/glusterd/groups/test -echo "open-behind=off" >> /var/lib/glusterd/groups/test +touch $GLUSTERD_WORKDIR/groups/test +echo "read-ahead=off" > $GLUSTERD_WORKDIR/groups/test +echo "open-behind=off" >> $GLUSTERD_WORKDIR/groups/test TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2}; TEST $CLI volume set $V0 group test diff --git a/tests/env.rc.in b/tests/env.rc.in new file mode 100644 index 00000000000..000a80f18fb --- /dev/null +++ b/tests/env.rc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ + +PATH=@sbindir@:$PATH +export PATH + +LD_LIBRARY_PATH=@libdir@:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH + +GLUSTERD_WORKDIR=@GLUSTERD_WORKDIR@ +export GLUSTERD_WORKDIR
\ No newline at end of file diff --git a/tests/include.rc b/tests/include.rc index 8919d0a663c..72c00588200 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -7,7 +7,20 @@ V0=${V0:=patchy}; # volume name to use in tests V1=${V1:=patchy1}; # volume name to use in tests B0=${B0:=/d/backends}; # top level of brick directories CC=cc -case `uname -s` in +OSTYPE=$(uname -s) + +if [ ! -f ${PWD}/tests/env.rc ]; then + echo "Aborting." + echo + echo "env.rc not found" + echo + echo "Please correct the problem and try again." + echo + exit 1 +fi +. ${PWD}/tests/env.rc + +case $OSTYPE in Linux) H0=${H0:=`hostname --fqdn`}; # hostname ;; @@ -15,6 +28,7 @@ Linux) H0=${H0:=`hostname`}; # hostname ;; esac + DEBUG=${DEBUG:=0} # turn on debugging? PROCESS_UP_TIMEOUT=20 @@ -293,8 +307,9 @@ function cleanup() ;; esac - - rm -rf /var/lib/glusterd/* $B0/* /etc/glusterd/*; + if [ -n "${GLUSTERD_WORKDIR}" ] ; then + rm -rf $GLUSTERD_WORKDIR/* $B0/* /etc/glusterd/*; + fi umount -l $M0 2>/dev/null || true; umount -l $M1 2>/dev/null || true; @@ -454,10 +469,9 @@ alias EXPECT_KEYWORD='_EXPECT_KEYWORD $LINENO' alias TEST_IN_LOOP='_TEST_IN_LOOP $LINENO' shopt -s expand_aliases -ostype=$(uname -s) -if [ x"$ostype" = x"Linux" ]; then +if [ x"$OSTYPE" = x"Linux" ]; then alias dd="dd status=none" -elif [ x"$ostype" = x"NetBSD" ]; then +elif [ x"$OSTYPE" = x"NetBSD" ]; then alias dd="dd msgfmt=quiet" fi # MacOS doesn't seem to support either option. Doing nothing at all is diff --git a/tests/volume.rc b/tests/volume.rc index 4e798dfc026..0f47f7e6741 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -53,7 +53,7 @@ function get_nfs_pid () function read_nfs_pidfile () { - echo `cat /var/lib/glusterd/nfs/run/nfs.pid` + echo `cat $GLUSTERD_WORKDIR/nfs/run/nfs.pid` } function cleanup_statedump { @@ -163,7 +163,7 @@ function get_brick_pid { local host=$2 local brick=$3 local brick_hiphenated=$(echo $brick | tr '/' '-') - echo `cat /var/lib/glusterd/vols/$vol/run/${host}${brick_hiphenated}.pid` + echo `cat $GLUSTERD_WORKDIR/vols/$vol/run/${host}${brick_hiphenated}.pid` } function kill_brick { |