From: Martin R. <mr...@us...> - 2005-07-14 18:22:11
|
Update of /cvsroot/ltp/ltp/testcases/kernel/security/selinux-testsuite/tests/capable_file In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7805/tests/capable_file Modified Files: selinux_capable_file.sh Log Message: Updates and testcase cleanup from Joy Index: selinux_capable_file.sh =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/security/selinux-testsuite/tests/capable_file/selinux_capable_file.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** selinux_capable_file.sh 20 Apr 2005 16:09:06 -0000 1.1 --- selinux_capable_file.sh 14 Jul 2005 18:21:32 -0000 1.2 *************** *** 17,20 **** --- 17,21 ---- export TCID="setup" export TST_COUNT=0 + export TST_TOTAL=10 # Clean up from a previous run *************** *** 39,45 **** if [ $RC -eq 0 ] then ! echo "Test #1: capable_file passed." else ! echo "Test #1: capable_file failed." fi return $RC --- 40,46 ---- if [ $RC -eq 0 ] then ! tst_resm TPASS "Test #1: capable_file passed." else ! tst_resm TFAIL "Test #1: capable_file failed." fi return $RC *************** *** 56,64 **** runcon -t test_fcap_t -- chmod 0400 $LTPTMP/temp_file 2>&1 RC=$? ! if [ $RC -ne 0 ] ! then ! echo "Test #2: capable_file failed." else ! echo "Test #2: capable_file passed." fi return $RC --- 57,65 ---- runcon -t test_fcap_t -- chmod 0400 $LTPTMP/temp_file 2>&1 RC=$? ! if [ $RC -eq 0 ] ! then ! tst_resm TPASS "Test #2: capable_file passed." else ! tst_resm TFAIL "Test #2: capable_file failed." fi return $RC *************** *** 80,87 **** if [ $MODE_BEFORE -eq $MODE_AFTER ] then ! echo "Test #3: capable_file failed." RC=1 else ! echo "Test #3: capable_file passed." fi return $RC --- 81,88 ---- if [ $MODE_BEFORE -eq $MODE_AFTER ] then ! tst_resm TFAIL "Test #3: capable_file failed." RC=1 else ! tst_resm TPASS "Test #3: capable_file passed." fi return $RC *************** *** 97,105 **** runcon -t test_fcap_t -- selinux_lease $LTPTMP/temp_file 2>&1 RC=$? ! if [ $RC -ne 0 ] then ! echo "Test #4: capable_file failed." else ! echo "Test #4: capable_file passed." fi return $RC --- 98,106 ---- runcon -t test_fcap_t -- selinux_lease $LTPTMP/temp_file 2>&1 RC=$? ! if [ $RC -eq 0 ] then ! tst_resm TPASS "Test #4: capable_file passed." else ! tst_resm TFAIL "Test #4: capable_file failed." fi return $RC *************** *** 116,124 **** runcon -t test_fcap_t -- mknod $LTPTMP/temp_file2 c 5 5 2>&1 RC=$? ! if [ $RC -ne 0 ] then ! echo "Test #5: capable_file failed." else ! echo "Test #5: capable_file passed." fi return $RC --- 117,125 ---- runcon -t test_fcap_t -- mknod $LTPTMP/temp_file2 c 5 5 2>&1 RC=$? ! if [ $RC -eq 0 ] then ! tst_resm TPASS "Test #5: capable_file passed." else ! tst_resm TFAIL "Test #5: capable_file failed." fi return $RC *************** *** 140,147 **** if [ $RC -ne 0 ] then ! echo "Test #6: capable_file passed." RC=0 else ! echo "Test #6: capable_file failed." RC=1 fi --- 141,148 ---- if [ $RC -ne 0 ] then ! tst_resm TPASS "Test #6: capable_file passed." RC=0 else ! tst_resm TFAIL "Test #6: capable_file failed." RC=1 fi *************** *** 161,168 **** if [ $RC -ne 0 ] then ! echo "Test #7: capable_file passed." RC=0 else ! echo "Test #7: capable_file failed." RC=1 fi --- 162,169 ---- if [ $RC -ne 0 ] then ! tst_resm TPASS "Test #7: capable_file passed." RC=0 else ! tst_resm TFAIL "Test #7: capable_file failed." RC=1 fi *************** *** 184,190 **** if [ $MODE_BEFORE -eq $MODE_AFTER ] then ! echo "Test #8: capable_file passed." else ! echo "Test #8: capable_file failed." RC=1 fi --- 185,191 ---- if [ $MODE_BEFORE -eq $MODE_AFTER ] then ! tst_resm TPASS "Test #8: capable_file passed." else ! tst_resm TFAIL "Test #8: capable_file failed." RC=1 fi *************** *** 203,210 **** if [ $RC -ne 0 ] then ! echo "Test #9: capable_file passed." RC=0 else ! echo "Test #9: capable_file failed." RC=1 fi --- 204,211 ---- if [ $RC -ne 0 ] then ! tst_resm TPASS "Test #9: capable_file passed." RC=0 else ! tst_resm TFAIL "Test #9: capable_file failed." RC=1 fi *************** *** 223,230 **** if [ $RC -ne 0 ] then ! echo "Test #10: capable_file passed." RC=0 else ! echo "Test #10: capable_file failed." RC=1 fi --- 224,231 ---- if [ $RC -ne 0 ] then ! tst_resm TPASS "Test #10: capable_file passed." RC=0 else ! tst_resm FAIL "Test #10: capable_file failed." RC=1 fi *************** *** 246,262 **** # RC=0 # Return value from setup, and test functions. setup ! test01 || exit $RC ! test02 || exit $RC ! test03 || exit $RC ! test04 || exit $RC ! test05 || exit $RC cleanup ! test06 || exit $RC ! test07 || exit $RC ! test08 || exit $RC ! test09 || exit $RC ! test10 || exit $RC cleanup ! exit 0 --- 247,264 ---- # RC=0 # Return value from setup, and test functions. + EXIT_VAL=0 setup ! test01 || EXIT_VAL=$RC ! test02 || EXIT_VAL=$RC ! test03 || EXIT_VAL=$RC ! test04 || EXIT_VAL=$RC ! test05 || EXIT_VAL=$RC cleanup ! test06 || EXIT_VAL=$RC ! test07 || EXIT_VAL=$RC ! test08 || EXIT_VAL=$RC ! test09 || EXIT_VAL=$RC ! test10 || EXIT_VAL=$RC cleanup ! exit $EXIT_VAL |