From e44a6b616764810093a3c6f3d15254793865ffb7 Mon Sep 17 00:00:00 2001 From: Manoj Joseph Date: Wed, 28 Apr 2010 21:27:21 -0600 Subject: [PATCH] b=22075 buffalo-v2 should detect test timeouts buffalo-v2 now detects test timeouts. It now generates status entries in results.yml after a sub-test completes. If the test status is missing a timeout is assumed to have occured. i=robert.read i=grev --- lustre/tests/test-framework.sh | 11 ++++++++--- lustre/tests/yaml.sh | 15 ++++++++++----- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index ea708a2..3a9573e 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -2713,6 +2713,7 @@ run_one_logged() { rm -rf $LOGDIR/err echo + log_sub_test_begin test_${1} (run_one $1 "$2") 2>&1 | tee $test_log local RC=${PIPESTATUS[0]} @@ -2722,7 +2723,7 @@ run_one_logged() { duration=$((`date +%s` - $BEFORE)) pass "(${duration}s)" [ -f $LOGDIR/err ] && TEST_ERROR=$(cat $LOGDIR/err) - log_sub_test test_${1} $TEST_STATUS $duration "$RC" "$TEST_ERROR" + log_sub_test_end $TEST_STATUS $duration "$RC" "$TEST_ERROR" if [ -f $LOGDIR/err ]; then $FAIL_ON_ERROR && exit $RC @@ -3929,8 +3930,12 @@ log_test() { yml_log_test $1 >> $YAML_LOG } -log_sub_test() { - yml_log_sub_test $@ >> $YAML_LOG +log_sub_test_begin() { + yml_log_sub_test_begin $@ >> $YAML_LOG +} + +log_sub_test_end() { + yml_log_sub_test_end $@ >> $YAML_LOG } run_llverdev() diff --git a/lustre/tests/yaml.sh b/lustre/tests/yaml.sh index 506a1e7..4dbdfe7 100644 --- a/lustre/tests/yaml.sh +++ b/lustre/tests/yaml.sh @@ -159,15 +159,20 @@ yml_log_test_status() { EOF } -yml_log_sub_test() { +yml_log_sub_test_begin() { cat <