mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
There didn't seem to be a way to see individual test successes, so I added
a check for "VERBOSE=1" in the kernel regression testsuite.
This commit is contained in:
parent
27ce962708
commit
e180ed4ccb
2 changed files with 21 additions and 4 deletions
|
@ -12,10 +12,13 @@ triggered, would cause the kernel to crash.)
|
|||
Test output
|
||||
===========
|
||||
|
||||
No output is displayed for a passing test. The makefile will output
|
||||
By default, no output is displayed for a passing test. The makefile will
|
||||
output:
|
||||
running <testname> for each test.
|
||||
|
||||
Output other than this indicates a problem.
|
||||
To have verbose output with each subtest reporting successes, set the
|
||||
environment variable VERBOSE=1:
|
||||
sudo VERBOSE=1 make tests
|
||||
|
||||
There are three typical failure scenarios:
|
||||
- Test failed when it was expected to pass
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
# vim:syntax=sh
|
||||
#
|
||||
# prologue.inc
|
||||
#
|
||||
# Test infrastructure support.
|
||||
#
|
||||
# Copyright 2010 Canonical, Ltd.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, version 2 of the
|
||||
# License.
|
||||
#
|
||||
# This file should be included by each test case
|
||||
# It does a lot of hidden 'magic', Downside is that
|
||||
# this magic makes debugging fauling tests more difficult.
|
||||
|
@ -253,6 +258,7 @@ checktestfg()
|
|||
then
|
||||
echo "Error: ${testname} passed. Test '${_testdesc}' was expected to '${_pfmode}'"
|
||||
testfailed
|
||||
return
|
||||
elif [ "$_pfmode" == "pass" -a -n "${_known}" ]
|
||||
then
|
||||
echo "Alert: ${testname} passed. Test '${_testdesc}' was marked as expected pass but known problem (xpass)"
|
||||
|
@ -262,6 +268,7 @@ checktestfg()
|
|||
then
|
||||
echo "Error: ${testname} failed. Test '${_testdesc}' was expected to '${_pfmode}'. Reason for failure '${ret}'"
|
||||
testfailed
|
||||
return
|
||||
elif [ "$_pfmode" == "fail" -a -n "${_known}" ]
|
||||
then
|
||||
echo "Alert: ${testname} failed. Test '${_testdesc}' was marked as expected fail but known problem (xfail)."
|
||||
|
@ -274,16 +281,23 @@ checktestfg()
|
|||
then
|
||||
echo "Error: ${testname} failed. Test '${_testdesc}' was expected to terminate with signal ${expectedsig}${_known}. Instead it terminated with signal ${killedsig}"
|
||||
testfailed
|
||||
return
|
||||
fi
|
||||
;;
|
||||
*) echo "Error: ${testname} failed. Test '${_testdesc}' was expected to '${_pfmode}'${_known}. Reason for failure 'killed by signal ${killedsig}'"
|
||||
testfailed
|
||||
return
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*) testerror
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$VERBOSE" ]; then
|
||||
echo "ok: ${_testdesc}"
|
||||
fi
|
||||
}
|
||||
|
||||
runchecktest()
|
||||
|
|
Loading…
Add table
Reference in a new issue