public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [RFC PATCH] tst_taint: TCONF when kernel is alreay tainted
@ 2019-09-18  5:35 Li Wang
  2019-09-18  5:56 ` Li Wang
  2019-09-19 10:02 ` Cyril Hrubis
  0 siblings, 2 replies; 7+ messages in thread
From: Li Wang @ 2019-09-18  5:35 UTC (permalink / raw)
  To: ltp

As the tst_taint_init comments described, If the tainted-flags are already set
by the kernel, there is no reason to continue and TCONF is generated. But in
the function achieve, it uses TBROK.

  cmdline="cve-2017-17053"
  tst_test.c:1096: INFO: Timeout per run is 0h 10m 00s
  tst_taint.c:88: BROK: Kernel is already tainted: 536871424

Signed-off-by: Li Wang <liwang@redhat.com>
Cc: Chang Yin <cyin@redhat.com>
Cc: Michael Moese <mmoese@suse.de>
---

Notes:
    Hi Cyril & Michael,
    
    I'm not sure if that's a good choice to skip whole test if the kernel already
    tainted, so maybe we could also perform it but not do a strict tainted-flags
    check after testing? The reason I think is it probably have chance to find
    new issue even with a tainted kernel.
    
    Any suggestion?

 lib/tst_taint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/tst_taint.c b/lib/tst_taint.c
index a5dbf77d2..f7cafb96f 100644
--- a/lib/tst_taint.c
+++ b/lib/tst_taint.c
@@ -85,7 +85,7 @@ void tst_taint_init(unsigned int mask)
 
 	taint = tst_taint_read();
 	if ((taint & mask) != 0)
-		tst_brk(TBROK, "Kernel is already tainted: %u", taint);
+		tst_brk(TCONF, "Kernel is already tainted: %u", taint);
 }
 
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-10-15 15:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-18  5:35 [LTP] [RFC PATCH] tst_taint: TCONF when kernel is alreay tainted Li Wang
2019-09-18  5:56 ` Li Wang
2019-09-19 10:02 ` Cyril Hrubis
2019-09-20  3:00   ` Li Wang
2019-10-15 14:00   ` Jan Stancek
2019-10-15 14:38     ` Cyril Hrubis
2019-10-15 15:19       ` Jan Stancek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox