summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Talur <rtalur@redhat.com>2016-02-08 12:13:54 +0530
committerRaghavendra Talur <rtalur@redhat.com>2016-03-09 23:19:40 -0800
commitf6e5bc68d294cc67f1e7f4db043d2531d4cfec80 (patch)
treee500957fdf1d8e783c00f3fb2696f2f7f8e21daf
parent9e3a0791c0f1f336e55672b24721154bc862456b (diff)
tests: Add mechanism for disabled tests
Requirements: Should be able to skip tests from run-tests.sh run. Should be granular enough to disable on subset of OSes. Solution: Tests can have special comment lines with some comma separated values within them. Key names used to determine test status are G_TESTDEF_TEST_STATUS_CENTOS6 G_TESTDEF_TEST_STATUS_NETBSD7 Some examples: G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=123456 G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=4444444 G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=123456;555555 You can change status of test to enabled or delete the line only if all the bugs are closed or modified or if the patch fixes it. Change-Id: Idee21fecaa5837fd4bd06e613f5c07a024f7b0c2 BUG: 1295704 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/13393 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
-rwxr-xr-xrun-tests.sh155
-rw-r--r--tests/basic/afr/split-brain-healing.t2
-rwxr-xr-xtests/basic/quota-anon-fd-nfs.t1
-rwxr-xr-xtests/basic/quota-nfs.t1
-rwxr-xr-xtests/basic/tier/bug-1214222-directories_missing_after_attach_tier.t2
-rwxr-xr-xtests/basic/tier/ctr-rename-overwrite.t1
-rwxr-xr-xtests/basic/tier/file_with_spaces.t1
-rwxr-xr-xtests/basic/tier/fops-during-migration-pause.t1
-rwxr-xr-xtests/basic/tier/fops-during-migration.t3
-rw-r--r--tests/basic/tier/frequency-counters.t1
-rw-r--r--tests/basic/tier/legacy-many.t1
-rwxr-xr-xtests/basic/tier/locked_file_migration.t1
-rw-r--r--tests/basic/tier/new-tier-cmds.t1
-rw-r--r--tests/basic/tier/readdir-during-migration.t1
-rwxr-xr-xtests/basic/tier/record-metadata-heat.t3
-rw-r--r--tests/basic/tier/tier-file-create.t2
-rw-r--r--tests/basic/tier/tier-heald.t1
-rw-r--r--tests/basic/tier/tier-snapshot.t2
-rwxr-xr-xtests/basic/tier/tier.t1
-rwxr-xr-xtests/basic/tier/tier_lookup_heal.t2
-rw-r--r--tests/basic/tier/tierd_check.t1
-rwxr-xr-xtests/basic/tier/unlink-during-migration.t1
-rwxr-xr-xtests/bugs/distribute/bug-1066798.t2
-rwxr-xr-xtests/bugs/fuse/bug-924726.t2
-rw-r--r--tests/bugs/glusterd/bug-1238706-daemons-stop-on-peer-cleanup.t3
-rw-r--r--tests/bugs/quota/bug-1235182.t2
-rw-r--r--tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t2
-rw-r--r--tests/bugs/tier/bug-1205545-CTR-and-trash-integration.t1
-rwxr-xr-xtests/bugs/tier/bug-1279376-rename-demoted-file.t1
-rw-r--r--tests/bugs/tier/bug-1286974.t3
-rw-r--r--tests/geo-rep/georep-basic-dr-rsync.t2
-rw-r--r--tests/geo-rep/georep-basic-dr-tarssh.t2
-rw-r--r--tests/include.rc37
33 files changed, 170 insertions, 72 deletions
diff --git a/run-tests.sh b/run-tests.sh
index 18dc3bc..c681f7d 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -7,6 +7,9 @@ force="no"
retry="no"
tests=""
exit_on_failure="yes"
+skip_bad_tests="yes"
+skip_known_bugs="yes"
+section_separator="========================================"
OSTYPE=$(uname -s)
@@ -155,46 +158,68 @@ function match()
return $match
}
-# If you're submitting a fix related to one of these tests and want its result
-# to be considered, you'll need to remove it from the list as part of your
-# patch.
-function is_bad_test ()
+# Tests can have comment lines with some comma separated values within them.
+# Key names used to determine test status are
+# G_TESTDEF_TEST_STATUS_CENTOS6
+# G_TESTDEF_TEST_STATUS_NETBSD7
+# Some examples:
+# G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=123456
+# G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=4444444
+# G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=123456;555555
+# You can change status of test to enabled or delete the line only if all the
+# bugs are closed or modified or if the patch fixes it.
+function get_test_status ()
{
- local name=$1
- for bt in ./tests/basic/quota-anon-fd-nfs.t \
- ./tests/bugs/quota/bug-1235182.t \
- ./tests/basic/quota-nfs.t \
- ./tests/basic/tier/tier_lookup_heal.t \
- ./tests/basic/tier/bug-1214222-directories_missing_after_attach_tier.t \
- ./tests/basic/tier/fops-during-migration.t \
- ./tests/basic/tier/record-metadata-heat.t \
- ./tests/basic/tier/tier-snapshot.t \
- ./tests/bugs/snapshot/bug-1109889.t \
- ./tests/bugs/distribute/bug-1066798.t \
- ./tests/bugs/glusterd/bug-1238706-daemons-stop-on-peer-cleanup.t \
- ./tests/geo-rep/georep-basic-dr-rsync.t \
- ./tests/geo-rep/georep-basic-dr-tarssh.t \
- ./tests/bugs/fuse/bug-924726.t \
- ./tests/basic/afr/split-brain-healing.t \
- ./tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t \
- ./tests/bugs/tier/bug-1286974.t \
- ./tests/features/weighted-rebalance.t \
- ./tests/performance/open-behind.t \
- ./tests/basic/afr/self-heald.t \
- ./tests/basic/tier/tier-file-create.t \
- ; do
- [ x"$name" = x"$bt" ] && return 0 # bash: zero means true/success
- done
- return 1 # bash: non-zero means false/failure
+ local test_name=$1
+ local host_os=""
+ local result=""
+
+ host_os=$(uname -s)
+
+ case "$host_os" in
+ # Leaving out the logic to determine the particular distro and version
+ # for later. Why does the key have the distro and version then?
+ # Because changing the key in all test files would be very big process
+ # updating just this function with a better logic much simpler.
+ Linux)
+ result=$(grep -e "^#G_TESTDEF_TEST_STATUS_CENTOS6" $test_name | \
+ awk -F"," {'print $1'} | awk -F"=" {'print $2'}) ;;
+ NetBSD)
+ result=$(grep -e "^#G_TESTDEF_TEST_STATUS_NETBSD7" $test_name | \
+ awk -F"," {'print $1'} | awk -F"=" {'print $2'}) ;;
+ *)
+ result="ENABLED" ;;
+ esac
+
+ echo "$result"
+
}
-function is_unsupported_test()
+function get_bug_list_for_disabled_test ()
{
- if [ x"$OSTYPE" != x"NetBSD" ]; then
- return 1
- fi
+ local test_name=$1
+ local host_os=""
+ local result=""
+
+ host_os=$(uname -s)
+
+ case "$host_os" in
+ # Leaving out the logic to determine the particular distro and version
+ # for later. Why does the key have the distro and version then?
+ # Because changing the key in all test files would be very big process
+ # updating just this function with a better logic much simpler.
+ Linux)
+ result=$(grep -e "^#G_TESTDEF_TEST_STATUS_CENTOS6" $test_name | \
+ awk -F"," {'print $2'} | awk -F"=" {'print $2'}) ;;
+ NetBSD)
+ result=$(grep -e "^#G_TESTDEF_TEST_STATUS_NETBSD7" $test_name | \
+ awk -F"," {'print $2'} | awk -F"=" {'print $2'}) ;;
+ *)
+ result="0000000" ;;
+ esac
+
+ echo "$result"
- grep -iqs tier $1
}
function run_tests()
@@ -202,6 +227,11 @@ function run_tests()
RES=0
FAILED=''
GENERATED_CORE=''
+ total_tests=0
+ selected_tests=0
+ skipped_bad_tests=0
+ skipped_known_issue_tests=0
+ total_run_tests=0
# key = path of .t file; value = time taken to run the .t file
declare -A ELAPSEDTIMEMAP
@@ -209,24 +239,35 @@ function run_tests()
for t in $(find ${regression_testsdir}/tests -name '*.t' \
| LC_COLLATE=C sort) ; do
old_cores=$(ls /core.* 2> /dev/null | wc -l)
+ total_tests=$((total_tests+1))
if match $t "$@" ; then
+ selected_tests=$((selected_tests+1))
echo
- echo "=================================================="
- if is_bad_test $t; then
+ echo $section_separator$section_separator
+ if [[ $(get_test_status $t) == "BAD_TEST" ]] && \
+ [[ $skip_bad_tests == "yes" ]]
+ then
+ skipped_bad_tests=$((skipped_bad_tests+1))
echo "Skipping bad test file $t"
- echo "=================================================="
+ echo "Reason: bug(s):" $(get_bug_list_for_disabled_test $t)
+ echo $section_separator$section_separator
echo
continue
fi
- if is_unsupported_test $t; then
- echo "Skipping test file $t (feature unsupported on platform)"
- echo "=================================================="
+ if [[ $(get_test_status $t) == "KNOWN_ISSUE" ]] && \
+ [[ $skip_known_bugs == "yes" ]]
+ then
+ skipped_known_issue_tests=$((skipped_known_issue_tests+1))
+ echo "Skipping test file $t due to known issue"
+ echo "Reason: bug(s):" $(get_bug_list_for_disabled_test $t)
+ echo $section_separator$section_separator
echo
continue
fi
- echo "Running tests in file $t"
+ total_run_tests=$((total_run_tests+1))
+ echo "[$(date +%H:%M:%S)] Running tests in file $t"
starttime="$(date +%s)"
- prove -mf --timer $t
+ prove -vf $t
TMP_RES=$?
ELAPSEDTIMEMAP[$t]=`expr $(date +%s) - $starttime`
if [ ${TMP_RES} -ne 0 ] && [ "x${retry}" = "xyes" ] ; then
@@ -238,7 +279,7 @@ function run_tests()
echo " * we got some spurous failures *"
echo " *********************************"
echo ""
- prove -mf --timer $t
+ prove -vf $t
TMP_RES=$?
fi
if [ ${TMP_RES} -ne 0 ] ; then
@@ -253,7 +294,7 @@ function run_tests()
GENERATED_CORE="${GENERATED_CORE}${t} "
fi
echo "End of test $t"
- echo "=================================================="
+ echo $section_separator$section_separator
echo
if [ $RES -ne 0 ] && [ x"$exit_on_failure" = "xyes" ] ; then
break;
@@ -262,33 +303,45 @@ function run_tests()
done
echo
echo "Run complete"
+ echo $section_separator$section_separator
+ echo "Number of tests found: $total_tests"
+ echo "Number of tests selected for run based on pattern: $selected_tests"
+ echo "Number of tests skipped as they were marked bad: $skipped_bad_tests"
+ echo "Number of tests skipped because of known_issues: $skipped_known_issue_tests"
+ echo "Number of tests that were run: $total_run_tests"
if [ ${RES} -ne 0 ] ; then
FAILED=$( echo ${FAILED} | tr ' ' '\n' | sort -u )
FAILED_COUNT=$( echo -n "${FAILED}" | grep -c '^' )
- echo -e "$FAILED_COUNT test(s) failed \n${FAILED}"
+ echo -e "\n$FAILED_COUNT test(s) failed \n${FAILED}"
GENERATED_CORE=$( echo ${GENERATED_CORE} | tr ' ' '\n' | sort -u )
GENERATED_CORE_COUNT=$( echo -n "${GENERATED_CORE}" | grep -c '^' )
- echo -e "$GENERATED_CORE_COUNT test(s) generated core \n${GENERATED_CORE}"
+ echo -e "\n$GENERATED_CORE_COUNT test(s) generated core \n${GENERATED_CORE}"
fi
- echo "Slowest 10 tests: "
+ echo
+ echo "Tests ordered by time taken, slowest to fastest: "
+ echo $section_separator$section_separator
for key in "${!ELAPSEDTIMEMAP[@]}"
do
- echo $key ' - ' ${ELAPSEDTIMEMAP["$key"]}
- done | sort -rn -k3 | head
+ echo "$key - ${ELAPSEDTIMEMAP["$key"]} second"
+ done | sort -rn -k3
+ echo
echo "Result is $RES"
+ echo
return ${RES}
}
function parse_args () {
- args=`getopt frc "$@"`
+ args=`getopt frcbk "$@"`
set -- $args
while [ $# -gt 0 ]; do
case "$1" in
-f) force="yes" ;;
-r) retry="yes" ;;
-c) exit_on_failure="no" ;;
+ -b) skip_bad_tests="no" ;;
+ -k) skip_known_bugs="no" ;;
--) shift; break;;
esac
shift
diff --git a/tests/basic/afr/split-brain-healing.t b/tests/basic/afr/split-brain-healing.t
index 4132d32..3a95d98 100644
--- a/tests/basic/afr/split-brain-healing.t
+++ b/tests/basic/afr/split-brain-healing.t
@@ -181,3 +181,5 @@ EXPECT "1" echo $?
cd -
TEST rm $AREQUAL_PATH/arequal-checksum
cleanup
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
+#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
diff --git a/tests/basic/quota-anon-fd-nfs.t b/tests/basic/quota-anon-fd-nfs.t
index aaba0b1..e2cce0b 100755
--- a/tests/basic/quota-anon-fd-nfs.t
+++ b/tests/basic/quota-anon-fd-nfs.t
@@ -102,3 +102,4 @@ EXPECT "1" get_aux
rm -f $QDD
cleanup;
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
diff --git a/tests/basic/quota-nfs.t b/tests/basic/quota-nfs.t
index 00c76a4..16d5aa6 100755
--- a/tests/basic/quota-nfs.t
+++ b/tests/basic/quota-nfs.t
@@ -61,3 +61,4 @@ EXPECT "1" get_aux
rm -f $QDD
cleanup;
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
diff --git a/tests/basic/tier/bug-1214222-directories_missing_after_attach_tier.t b/tests/basic/tier/bug-1214222-directories_missing_after_attach_tier.t
index 8aa1380..754e803 100755
--- a/tests/basic/tier/bug-1214222-directories_missing_after_attach_tier.t
+++ b/tests/basic/tier/bug-1214222-directories_missing_after_attach_tier.t
@@ -53,3 +53,5 @@ EXPECT_WITHIN $REBALANCE_TIMEOUT "0" confirm_vol_stopped $V0
cleanup
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
+#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
diff --git a/tests/basic/tier/ctr-rename-overwrite.t b/tests/basic/tier/ctr-rename-overwrite.t
index a1d5af0..8bccd3b 100755
--- a/tests/basic/tier/ctr-rename-overwrite.t
+++ b/tests/basic/tier/ctr-rename-overwrite.t
@@ -47,3 +47,4 @@ ENTRY_COUNT=$(echo "select * from gf_file_tb; select * from gf_flink_tb;" | \
TEST [ $ENTRY_COUNT -eq 2 ]
cleanup
+#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000
diff --git a/tests/basic/tier/file_with_spaces.t b/tests/basic/tier/file_with_spaces.t
index 3e3c34d..bd99e71 100755
--- a/tests/basic/tier/file_with_spaces.t
+++ b/tests/basic/tier/file_with_spaces.t
@@ -68,3 +68,4 @@ EXPECT "yes" exists_and_regular_file $CPATH
cleanup;
+#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000
diff --git a/tests/basic/tier/fops-during-migration-pause.t b/tests/basic/tier/fops-during-migration-pause.t
index f50d666..10bd3f4 100755
--- a/tests/basic/tier/fops-during-migration-pause.t
+++ b/tests/basic/tier/fops-during-migration-pause.t
@@ -86,3 +86,4 @@ TEST test -s $HPATH
cleanup;
+#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000
diff --git a/tests/basic/tier/fops-during-migration.t b/tests/basic/tier/fops-during-migration.t
index 96180d2..4be05ac 100755
--- a/tests/basic/tier/fops-during-migration.t
+++ b/tests/basic/tier/fops-during-migration.t
@@ -103,4 +103,5 @@ EXPECT "1" check_file_content $M0/dir1/FILE1 "$TEST_STR"
TEST getfattr -n "user.test_xattr" $M0/dir1/FILE1
cleanup;
-
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
+#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
diff --git a/tests/basic/tier/frequency-counters.t b/tests/basic/tier/frequency-counters.t
index 51c7ab4..c335c02 100644
--- a/tests/basic/tier/frequency-counters.t
+++ b/tests/basic/tier/frequency-counters.t
@@ -79,3 +79,4 @@ cd /
cleanup
+#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000
diff --git a/tests/basic/tier/legacy-many.t b/tests/basic/tier/legacy-many.t
index 4469c75..851f0a1b 100644
--- a/tests/basic/tier/legacy-many.t
+++ b/tests/basic/tier/legacy-many.t
@@ -71,3 +71,4 @@ EXPECT_WITHIN $PROMOTE_TIMEOUT "0" check_counters $NUM_FILES 0
cd;
cleanup
+#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000
diff --git a/tests/basic/tier/locked_file_migration.t b/tests/basic/tier/locked_file_migration.t
index f7a9d1f..1a7e3f5 100755
--- a/tests/basic/tier/locked_file_migration.t
+++ b/tests/basic/tier/locked_file_migration.t
@@ -77,3 +77,4 @@ rm $(dirname $0)/file_lock
cleanup;
+#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000
diff --git a/tests/basic/tier/new-tier-cmds.t b/tests/basic/tier/new-tier-cmds.t
index c38ecf9..6c78f13 100644
--- a/tests/basic/tier/new-tier-cmds.t
+++ b/tests/basic/tier/new-tier-cmds.t
@@ -63,3 +63,4 @@ EXPECT "Tier command failed" $CLI volume tier $V0 detach status
cleanup;
+#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000
diff --git a/tests/basic/tier/readdir-during-migration.t b/tests/basic/tier/readdir-during-migration.t
index 42199c5..e2a43c9 100644
--- a/tests/basic/tier/readdir-during-migration.t
+++ b/tests/basic/tier/readdir-during-migration.t
@@ -62,3 +62,4 @@ cd /
cleanup;
+#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000
diff --git a/tests/basic/tier/record-metadata-heat.t b/tests/basic/tier/record-metadata-heat.t
index d36ed80..d448137 100755
--- a/tests/basic/tier/record-metadata-heat.t
+++ b/tests/basic/tier/record-metadata-heat.t
@@ -98,4 +98,5 @@ echo "File path on hot tier: "$HPATH
EXPECT "yes" exists_and_regular_file $HPATH
cleanup;
-
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
+#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
diff --git a/tests/basic/tier/tier-file-create.t b/tests/basic/tier/tier-file-create.t
index 28caacd..06f0e24 100644
--- a/tests/basic/tier/tier-file-create.t
+++ b/tests/basic/tier/tier-file-create.t
@@ -57,3 +57,5 @@ cd
cleanup;
+#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000
+#G_TESTDEF_TEST_STATUS_CENTOS6=KNOWN_ISSUE,BUG=1315560
diff --git a/tests/basic/tier/tier-heald.t b/tests/basic/tier/tier-heald.t
index 05b19e4..8dcdd39 100644
--- a/tests/basic/tier/tier-heald.t
+++ b/tests/basic/tier/tier-heald.t
@@ -95,3 +95,4 @@ TEST ! $CLI volume set dist disperse-self-heal-daemon off
TEST ! $CLI volume set dist cluster.disperse-self-heal-daemon on
cleanup
+#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000
diff --git a/tests/basic/tier/tier-snapshot.t b/tests/basic/tier/tier-snapshot.t
index b90d560..6e7951d 100644
--- a/tests/basic/tier/tier-snapshot.t
+++ b/tests/basic/tier/tier-snapshot.t
@@ -46,3 +46,5 @@ TEST $CLI snapshot create snap4 $V0 no-timestamp;
TEST $CLI snapshot delete all;
cleanup;
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
+#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
diff --git a/tests/basic/tier/tier.t b/tests/basic/tier/tier.t
index cfd8e77..5874a9b 100755
--- a/tests/basic/tier/tier.t
+++ b/tests/basic/tier/tier.t
@@ -210,3 +210,4 @@ cleanup
rm -rf /tmp/d1
+#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000
diff --git a/tests/basic/tier/tier_lookup_heal.t b/tests/basic/tier/tier_lookup_heal.t
index 81bb0d6..825f81d 100755
--- a/tests/basic/tier/tier_lookup_heal.t
+++ b/tests/basic/tier/tier_lookup_heal.t
@@ -72,3 +72,5 @@ EXPECT_WITHIN $PROMOTE_TIMEOUT "0" file_on_fast_tier file1
cd;
cleanup
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
+#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
diff --git a/tests/basic/tier/tierd_check.t b/tests/basic/tier/tierd_check.t
index 9ef12d5..2b8ccbb 100644
--- a/tests/basic/tier/tierd_check.t
+++ b/tests/basic/tier/tierd_check.t
@@ -60,3 +60,4 @@ TEST pkill -f "$B0/hot/$V0"
TEST ! $CLI volume tier $V0 detach start
cleanup
+#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000
diff --git a/tests/basic/tier/unlink-during-migration.t b/tests/basic/tier/unlink-during-migration.t
index 7888743..0c2255c 100755
--- a/tests/basic/tier/unlink-during-migration.t
+++ b/tests/basic/tier/unlink-during-migration.t
@@ -89,3 +89,4 @@ TEST ! stat $CPATH
cleanup;
+#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000
diff --git a/tests/bugs/distribute/bug-1066798.t b/tests/bugs/distribute/bug-1066798.t
index e53e1ae..03de970 100755
--- a/tests/bugs/distribute/bug-1066798.t
+++ b/tests/bugs/distribute/bug-1066798.t
@@ -84,3 +84,5 @@ TEST [ `echo $var | awk '{print $5}'` = "0" ]
TEST [ `echo $var | awk '{print $6}'` = "0" ]
cleanup
+#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
diff --git a/tests/bugs/fuse/bug-924726.t b/tests/bugs/fuse/bug-924726.t
index 2d3c768..65c56aa 100755
--- a/tests/bugs/fuse/bug-924726.t
+++ b/tests/bugs/fuse/bug-924726.t
@@ -43,3 +43,5 @@ SOCKETS_AFTER_SWITCH=`netstat -nap | grep $GLFS_MNT_PID | grep ESTABLISHED | wc
TEST [ $SOCKETS_AFTER_SWITCH = `expr $SOCKETS_BEFORE_SWITCH + 1` ]
cleanup;
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
+#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
diff --git a/tests/bugs/glusterd/bug-1238706-daemons-stop-on-peer-cleanup.t b/tests/bugs/glusterd/bug-1238706-daemons-stop-on-peer-cleanup.t
index 9ff1758..2ef20b9 100644
--- a/tests/bugs/glusterd/bug-1238706-daemons-stop-on-peer-cleanup.t
+++ b/tests/bugs/glusterd/bug-1238706-daemons-stop-on-peer-cleanup.t
@@ -38,4 +38,5 @@ TEST $CLI_1 peer detach $H2;
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" get_nfs_count
cleanup;
-
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
+#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
diff --git a/tests/bugs/quota/bug-1235182.t b/tests/bugs/quota/bug-1235182.t
index a8d1734..6091146 100644
--- a/tests/bugs/quota/bug-1235182.t
+++ b/tests/bugs/quota/bug-1235182.t
@@ -57,3 +57,5 @@ EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "100.0MB" quotausage "/"
rm -f $QDD
cleanup;
+#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
diff --git a/tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t b/tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t
index b9f6dc7..c536c82 100644
--- a/tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t
+++ b/tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t
@@ -39,3 +39,5 @@ TEST $CLI volume set $V0 encryption.master-key $GLUSTERD_WORKDIR/$V0-master-key
TEST $CLI volume set $V0 features.encryption on
cleanup;
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
+#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
diff --git a/tests/bugs/tier/bug-1205545-CTR-and-trash-integration.t b/tests/bugs/tier/bug-1205545-CTR-and-trash-integration.t
index dc16fed..752c517 100644
--- a/tests/bugs/tier/bug-1205545-CTR-and-trash-integration.t
+++ b/tests/bugs/tier/bug-1205545-CTR-and-trash-integration.t
@@ -69,3 +69,4 @@ cleanup
+#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000
diff --git a/tests/bugs/tier/bug-1279376-rename-demoted-file.t b/tests/bugs/tier/bug-1279376-rename-demoted-file.t
index 98e61ae..c4a50d9 100755
--- a/tests/bugs/tier/bug-1279376-rename-demoted-file.t
+++ b/tests/bugs/tier/bug-1279376-rename-demoted-file.t
@@ -90,3 +90,4 @@ EXPECT 1 echo $(ls -l $M0 | grep $DST_FILE | wc -l)
cleanup;
+#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=000000
diff --git a/tests/bugs/tier/bug-1286974.t b/tests/bugs/tier/bug-1286974.t
index a2d8131..1df837c 100644
--- a/tests/bugs/tier/bug-1286974.t
+++ b/tests/bugs/tier/bug-1286974.t
@@ -69,4 +69,5 @@ TEST $CLI volume tier $V0 detach stop
EXPECT "0" tier_task_name "Tier migration";
cleanup;
-
+#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
diff --git a/tests/geo-rep/georep-basic-dr-rsync.t b/tests/geo-rep/georep-basic-dr-rsync.t
index 220b471..e8b3993 100644
--- a/tests/geo-rep/georep-basic-dr-rsync.t
+++ b/tests/geo-rep/georep-basic-dr-rsync.t
@@ -126,3 +126,5 @@ TEST $GEOREP_CLI $master $slave stop
TEST $GEOREP_CLI $master $slave delete
cleanup;
+#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
diff --git a/tests/geo-rep/georep-basic-dr-tarssh.t b/tests/geo-rep/georep-basic-dr-tarssh.t
index cf661d0..5f879db 100644
--- a/tests/geo-rep/georep-basic-dr-tarssh.t
+++ b/tests/geo-rep/georep-basic-dr-tarssh.t
@@ -128,3 +128,5 @@ TEST $GEOREP_CLI $master $slave stop
TEST $GEOREP_CLI $master $slave delete
cleanup;
+#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
diff --git a/tests/include.rc b/tests/include.rc
index 21a6946..b46a7b2 100644
--- a/tests/include.rc
+++ b/tests/include.rc
@@ -156,12 +156,13 @@ function test_header()
function test_footer()
{
RET=$?
- local err=$1
+ local lineno=$1
+ local err=$2
if [ $RET -eq 0 ]; then
- echo "ok $t";
+ echo "ok $t, LINENUM:$lineno";
else
- echo "not ok $t $err";
+ echo "not ok $t $err, LINENUM:$lineno";
# With DEBUG, this was already printed out, so skip it.
if [ x"$DEBUG" = x"0" ]; then
echo "FAILED COMMAND: $saved_cmd"
@@ -178,8 +179,9 @@ function test_footer()
function test_expect_footer()
{
- local e=$1
- local a=$2
+ local lineno=$1
+ local e=$2
+ local a=$3
local err=""
if ! [[ "$a" =~ $e ]]; then
@@ -187,7 +189,7 @@ function test_expect_footer()
fi
[[ "$a" =~ $e ]];
- test_footer "$err";
+ test_footer "$lineno" "$err";
}
function _EXPECT()
@@ -204,16 +206,17 @@ function _EXPECT()
a=$("$@" | tail -1)
if [ "x$e" = "x" ] ; then
- test_expect_footer "x$e" "x$a";
+ test_expect_footer "$TESTLINE" "x$e" "x$a";
else
- test_expect_footer "$e" "$a";
+ test_expect_footer "$TESTLINE" "$e" "$a";
fi
}
function test_expect_not_footer()
{
- local e=$1
- local a=$2
+ local lineno=$1
+ local e=$2
+ local a=$3
local err=""
if [[ "$a" =~ $e ]]; then
@@ -221,7 +224,7 @@ function test_expect_not_footer()
fi
! [[ "$a" =~ "$e" ]];
- test_footer "$err";
+ test_footer "$lineno" "$err";
}
function _EXPECT_NOT()
@@ -238,9 +241,9 @@ function _EXPECT_NOT()
a=$("$@" | tail -1)
if [ "x$e" = "x" ] ; then
- test_expect_not_footer "x$e" "x$a";
+ test_expect_not_footer "$TESTLINE" "x$e" "x$a";
else
- test_expect_not_footer "$e" "$a";
+ test_expect_not_footer "$TESTLINE" "$e" "$a";
fi
}
@@ -255,7 +258,7 @@ function _EXPECT_KEYWORD()
shift;
"$@" | tail -1 | grep -q "$e"
- test_footer;
+ test_footer "$TESTLINE";
}
function _TEST()
@@ -273,7 +276,7 @@ function _TEST()
eval "$@" >/dev/null $redirect
- test_footer;
+ test_footer "$TESTLINE";
}
function _EXPECT_WITHIN()
@@ -308,9 +311,9 @@ function _EXPECT_WITHIN()
done
if [ "x$e" = "x" ] ; then
- test_expect_footer "x$e" "x$a";
+ test_expect_footer "$TESTLINE" "x$e" "x$a";
else
- test_expect_footer "$e" "$a";
+ test_expect_footer "$TESTLINE" "$e" "$a";
fi
}