diff mbox series

fix pan/ltp-pan return values

Message ID 20210608084431.62769-1-dongshijiang@inspur.com
State Rejected
Headers show
Series fix pan/ltp-pan return values | expand

Commit Message

dongshijiang June 8, 2021, 8:44 a.m. UTC
When performing an LTP test, if there are only "PASS" and "TCONF" in the test results, but "runltp" displays "INFO: ltp-pan reported all tests PASS", I think it should give something like "INFO: ltp-pan reported some "tests FAIL or TCONF" prompt.

Signed-off-by: dongshijiang <dongshijiang@inspur.com>
---
 pan/ltp-pan.c | 2 +-
 runltp        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Cyril Hrubis June 8, 2021, 8:24 a.m. UTC | #1
Hi!
Can we please stop adding band aids over the broken-by-design runltp
script and ltp-pan?

We are going to finally push runltp-ng into LTP git during this
development cycle and finally deprecate ltp-pan, feel free to try it
yourself:

https://github.com/metan-ucw/runltp-ng
diff mbox series

Patch

diff --git a/pan/ltp-pan.c b/pan/ltp-pan.c
index 298072fe0..05690f7c9 100644
--- a/pan/ltp-pan.c
+++ b/pan/ltp-pan.c
@@ -770,7 +770,7 @@  check_pids(struct tag_pgrp *running, int *num_active, int keep_active,
 					"child %d exited with status %d\n",
 					cpid, w);
 			--*num_active;
-			if (w != 0 && w != TCONF)
+			if (w != 0)
 				ret++;
 		} else if (WIFSTOPPED(stat_loc)) {	/* should never happen */
 			w = WSTOPSIG(stat_loc);
diff --git a/runltp b/runltp
index 4447da156..539e7800d 100755
--- a/runltp
+++ b/runltp
@@ -811,7 +811,7 @@  EOF
       VALUE=0
       export LTP_EXIT_VALUE=0;
     else
-      echo "INFO: ltp-pan reported some tests FAIL"
+      echo "INFO: ltp-pan reported some tests FAIL or TCONF"
       VALUE=1
       export LTP_EXIT_VALUE=1;
     fi