tests: add status about missing kernel support

Some tests might fail due to a lack of kernel support, such as a
missing driver which have to to be involved for running such
tests. Introduce the EXIT_NO_SUPPORT code for this case, to be
distinguished by the test runner from a functional failure.
This commit is contained in:
Philippe Gerum 2020-01-21 14:45:20 +01:00
parent 9aa9a84489
commit d816bdc993
2 changed files with 8 additions and 2 deletions

View File

@ -11,6 +11,8 @@
#include <errno.h>
#include <pthread.h>
#define EXIT_NO_SUPPORT 42
#define __stringify_1(x...) #x
#define __stringify(x...) __stringify_1(x)

View File

@ -73,8 +73,12 @@ for t in $test_list; do
test \! -x $t && echo "$(basename $t): no such test" && exit 2
$t && echo "$(basename $t): OK" && continue
c=$?
echo "** $(basename $t): BROKEN"
test x$keep_going = xfalse && exit $c
if test $c = 42; then
echo "$(basename $t): no kernel support"
else
echo "** $(basename $t): BROKEN"
test x$keep_going = xfalse && exit $c
fi
done
exit 0