summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrun-tests.sh9
-rwxr-xr-xtests/basic/meta.t6
-rw-r--r--tests/bugs/bug-1051896.t4
-rw-r--r--tests/bugs/bug-1058663.t4
-rwxr-xr-xtests/bugs/bug-858215.t4
-rw-r--r--tests/bugs/bug-905864.t5
6 files changed, 17 insertions, 15 deletions
diff --git a/run-tests.sh b/run-tests.sh
index 12d902fbc8..8db2ce7035 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -9,7 +9,8 @@ function check_dependencies()
MISSING=""
# Check for dbench
- if [ ! -x /usr/bin/dbench ]; then
+ env dbench --usage > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
MISSING="$MISSING dbench"
fi
@@ -36,9 +37,9 @@ function check_dependencies()
MISSING="$MISSING perl-Test-Harness"
fi
- # Check for YAJL
- if [ ! -x /usr/bin/json_verify ]; then
- MISSING="$MISSING yajl"
+ which json_verify > /dev/null
+ if [ $? -ne 0 ]; then
+ MISSING="$MISSING json_verify"
fi
# Check for XFS programs
diff --git a/tests/basic/meta.t b/tests/basic/meta.t
index 7a810bcbc3..bff455276b 100755
--- a/tests/basic/meta.t
+++ b/tests/basic/meta.t
@@ -21,11 +21,11 @@ TEST glusterfs -s $H0 --volfile-id $V0 $M0;
# verify json validity
-TEST /usr/bin/json_verify < $M0/.meta/frames;
+TEST json_verify < $M0/.meta/frames;
-TEST /usr/bin/json_verify < $M0/.meta/cmdline;
+TEST json_verify < $M0/.meta/cmdline;
-TEST /usr/bin/json_verify < $M0/.meta/version;
+TEST json_verify < $M0/.meta/version;
# default log level (INFO) is 7
TEST grep -q 7 $M0/.meta/logging/loglevel;
diff --git a/tests/bugs/bug-1051896.t b/tests/bugs/bug-1051896.t
index 195602ec3a..958a98bf60 100644
--- a/tests/bugs/bug-1051896.t
+++ b/tests/bugs/bug-1051896.t
@@ -17,8 +17,8 @@ TEST glusterfs --entry-timeout=0 --attribute-timeout=0 --acl -s $H0 --volfile-id
TEST touch $M0/file1;
-$CC -lacl $(dirname $0)/bug-1051896.c -o $(dirname $0)/bug-1051896
+TEST $CC $(dirname $0)/bug-1051896.c -o $(dirname $0)/bug-1051896 -lacl
TEST ! $(dirname $0)/bug-1051896 $M0/file1 m 'u::r,u::w,g::r--,o::r--'
-rm -f $(dirname $0)/bug-1051896
+TEST rm -f $(dirname $0)/bug-1051896
cleanup
diff --git a/tests/bugs/bug-1058663.t b/tests/bugs/bug-1058663.t
index 168d18ad31..c1e8211dd0 100644
--- a/tests/bugs/bug-1058663.t
+++ b/tests/bugs/bug-1058663.t
@@ -16,9 +16,9 @@ TEST $CLI volume start $V0;
TEST glusterfs --entry-timeout=0 --attribute-timeout=0 -s $H0 --volfile-id $V0 $M0
# compile the test program and run it
-$CC $(dirname $0)/bug-1058663.c -o $(dirname $0)/bug-1058663;
+TEST $CC $(dirname $0)/bug-1058663.c -o $(dirname $0)/bug-1058663;
TEST $(dirname $0)/bug-1058663 $M0/bug-1058663.bin;
-rm -f $(dirname $0)/M0/bug-1058663.bin;
+TEST rm -f $(dirname $0)/M0/bug-1058663.bin;
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
diff --git a/tests/bugs/bug-858215.t b/tests/bugs/bug-858215.t
index 8f11b7f392..8034276dd6 100755
--- a/tests/bugs/bug-858215.t
+++ b/tests/bugs/bug-858215.t
@@ -7,7 +7,7 @@ cleanup;
## Start and create a volume
TEST glusterd;
-TEST pidof glusterd
+TEST pidof glusterd;
TEST $CLI volume info;
TEST $CLI volume create $V0 replica 2 stripe 2 $H0:$B0/${V0}{1,2,3,4,5,6,7,8};
@@ -62,7 +62,7 @@ TEST kill -USR1 $mount_pid;
sleep 2;
for file_name in $(ls $dump_dir)
do
- TEST grep "xlator.mount.fuse.history" $dump_dir/$file_name;
+ TEST grep -q "xlator.mount.fuse.history" $dump_dir/$file_name;
done
## Finish up
diff --git a/tests/bugs/bug-905864.t b/tests/bugs/bug-905864.t
index cdc0cb7172..39598d6e92 100644
--- a/tests/bugs/bug-905864.t
+++ b/tests/bugs/bug-905864.t
@@ -20,12 +20,13 @@ TEST touch $M0/file1;
#following C program tries open up race(s) if any, in F_GETLK/F_SETLKW codepaths
#of locks xlator
-$CC -lpthread -g3 $(dirname $0)/bug-905864.c -o $(dirname $0)/bug-905864
+TEST $CC -pthread -g3 $(dirname $0)/bug-905864.c -o $(dirname $0)/bug-905864
+
$(dirname $0)/bug-905864 $M0/file1 &
$(dirname $0)/bug-905864 $M1/file1;
wait
-rm -f $(dirname $0)/bug-905864
+TEST rm -f $(dirname $0)/bug-905864
EXPECT $(brick_count $V0) online_brick_count
cleanup