Using test.sh in the case:
* Change the tst_resm() followed by exit to tst_brkm and remove the exit
* Change the exit -1 at the end of the test to tst_resm TFAIL and call
tst_exit at the very end of the test
---
.../kernel/syscalls/utimensat/utimensat_tests.sh | 22 ++++++++-----------
1 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
index b8eba51..5ae252e 100755
--- a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
+++ b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
@@ -24,11 +24,10 @@
export TCID=utimensat01
export TST_TOTAL=99
export TST_COUNT=0
+. test.sh
if tst_kvercmp 2 6 22 ; then
- tst_resm TCONF "System kernel version is less than 2.6.22"
- tst_resm TCONF "Cannot execute test"
- exit 0
+ tst_brkm TCONF "System kernel version is less than 2.6.22 and cannot
execute test"
fi
RESULT_FILE=$TMPDIR/utimensat.result
@@ -39,8 +38,7 @@ FILE=$TEST_DIR/utimensat.test_file
TEST_PROG=utimensat01
if [ ! -f $LTPROOT/testcases/bin/$TEST_PROG ]; then
- tst_resm TWARN "$LTPROOT/testcases/bin/$TEST_PROG is missing (please
check install)"
- exit 1
+ tst_brkm TWARN "$LTPROOT/testcases/bin/$TEST_PROG is missing (please
check install)"
fi
# Summary counters of all test results
@@ -254,15 +252,13 @@ run_test()
# Use trap to restore this line after program terminates.
sudoers=/etc/sudoers
if [ ! -r $sudoers ]; then
- tst_resm TBROK "can't read $sudoers"
- exit 1
+ tst_brkm TBROK "can't read $sudoers"
fi
pattern="[[:space:]]*Defaults[[:space:]]*requiretty.*"
if grep -q "^${pattern}" $sudoers; then
tst_resm TINFO "Comment requiretty in $sudoers for automated testing
systems"
if ! sed -r -i.$$ -e "s/^($pattern)/#\1/" $sudoers; then
- tst_resm TBROK "failed to mangle $sudoers properly"
- exit 1
+ tst_brkm TBROK "failed to mangle $sudoers properly"
fi
trap 'trap "" EXIT; restore_sudoers' EXIT
fi
@@ -284,8 +280,7 @@ else
fi
if ! sudo $s_arg true; then
- tst_resm TBROK "sudo cannot be run by user non-interactively"
- exit 1
+ tst_brkm TBROK "sudo cannot be run by user non-interactively"
fi
if test ! -f $sudoers
then
@@ -494,7 +489,8 @@ date
echo "Total tests: $test_num; passed: $passed_cnt; failed: $failed_cnt"
if test $failed_cnt -gt 0; then
echo "Failed tests: $failed_list"
- exit -1
+ tst_resm TFAIL "test failed"
fi
-exit
+tst_resm TPASS "test pass"
+tst_exit
-- 1.6.0.2
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list