#!/bin/bash # source the test script helpers # BUG: This line is intentionally left commented out. # When I have the helper packages installed the line below should be # uncommented . /usr/bin/rhts-environment.sh # Commands in this section are provided by test developer. # --------------------------------------------- # Assume the test will fail. result=FAIL # Helper functions function result_fail() { export result=FAIL report_result $TEST $result 0 exit 0 } function result_pass () { export result=PASS report_result $TEST $result 0 exit 0 } # run the test. Start gdb against /bin/cat and see if can sucessfully # attach to it and cat runs to completion. echo "*** Start of test ***" >> $OUTPUTFILE gdb /bin/cat -x gdb-commands >> $OUTPUTFILE 2>&1 RC=$? if [ $RC -eq 0 ] ; then echo "*** gdb test successful ***" >> $OUTPUTFILE result_pass else echo "*** gdb test failed ***" >> $OUTPUTFILE result_fail fi # something bad must have happened, otherwise we should not get here. echo "Unhandled exception or other problem, results not reliable!" >> $OUTPUTFILE result_fail