Taint check: Use TFAIL instead of TBROK in fork_testrun()
PATCH 1/1 Taint check: Use TFAIL instead of TBROK in fork_testrun()
Signed-off-by Martin Doucha <[email protected]>
--- doc/test-writing-guidelines.txt | 6 +++--- lib/tst_test.c | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-)
doc/test-writing-guidelines.txt +3 -3
@@ -1567,9 +1567,9 @@ the test. LTP library will then automatically check kernel taint at the end of testing. If '.all_filesystems' is set in struct tst_test, taint check will be performed -after each file system and testing may be aborted early by 'TBROK'. You can -optionally also call 'tst_taint_check()' during 'run()', which returns 0 or -the tainted flags set in '/proc/sys/kernel/tainted' as specified earlier. +after each file system and taint will abort testing early with 'TFAIL'. You +can optionally also call 'tst_taint_check()' during 'run()', which returns 0 +or the tainted flags set in '/proc/sys/kernel/tainted' as specified earlier. Depending on your kernel version, not all tainted-flags will be supported.
lib/tst_test.c +4 -2
@@ -1282,8 +1282,10 @@ static int fork_testrun(void)alarm (0 );SAFE_SIGNAL (SIGINT ,SIG_DFL ); -if (tst_test->taint_check &&tst_taint_check ()) -tst_brk (TBROK ,"Kernel is now tainted." ); +if (tst_test->taint_check &&tst_taint_check ()) { +tst_res (TFAIL ,"Kernel is now tainted." ); +return TFAIL ; + }if (WIFEXITED (status) &&WEXITSTATUS (status))return WEXITSTATUS (status);
Signature · 1 line
2.28.0
PATCH 1/1 Taint check: Use TFAIL instead of TBROK in fork_testrun()
----- Original Message -----
Quoted 2 lines
Signed-off-by Martin Doucha <[email protected]>---
Acked-by Jan Stancek <[email protected]>
PATCH 1/1 Taint check: Use TFAIL instead of TBROK in fork_testrun()
In reply to Martin DouchaPATCH 1/1 Taint check: Use TFAIL instead of TBROK in fork_testrun()
Quoted 5 lines · Petr Vorel
Hi,
LGTM.
Reviewed-by Petr Vorel <[email protected]>
Pushed, thanks!
Signature · 5 lines
Regards, Li Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20200825/0b0b7c7c/attachment-0001.htm>