summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarshavardhana <harsha@harshavardhana.net>2014-08-08 01:56:23 -0700
committerHarshavardhana <harsha@harshavardhana.net>2014-08-13 22:01:27 -0700
commit8116328a6b4ead0207fc5f93fcac9a2606c6f6ab (patch)
tree2c3029deb4c1eeabddd67a58d6ddd8c71411079c
parent37b31605c6a2495848d52270e37b5fa0a8b9fdd5 (diff)
porting: FreeBSD related changes to regression scripts
- json_verify do not use '/usr/bin' let bash evaluate the location - TEST for test code compilation `bug-1051896.t`, `bug-1058663.t`, bug-905864.t - run-tests.sh - better checks for installed packages Change-Id: Ic7feda36ddfc082c609aabd75da2e9a8f59a92b3 BUG: 1111774 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8435 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Tested-by: Emmanuel Dreyfus <manu@netbsd.org>
-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 12d902fbc88..8db2ce7035c 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 7a810bcbc35..bff455276b7 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 195602ec3a7..958a98bf60d 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 168d18ad312..c1e8211dd08 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 8f11b7f3921..8034276dd6d 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 cdc0cb71725..39598d6e92b 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