<div dir="auto">Ping</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Nov 27, 2021, 14:16 Sagi Nakash <<a href="mailto:saginakash@gmail.com">saginakash@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In case a test fails to run in run_child() for some reason (signaled via<br>
SIGTERM/SIGTOP, execve() failure, etc.), runltp still reports success:<br>
"INFO: ltp-pan reported all tests PASS".<br>
<br>
Failed tests are reported via check_pids(), by checking their exit<br>
status, yet it doesn't catch tests which weren't able to run at all.<br>
<br>
exit_stat holds the exit status code: 0 in case of success in all tests,<br>
otherwise, the number of failed tests.<br>
<br>
Fix this by increasing exit_stat also when a test fails to run.<br>
<br>
Signed-off-by: Sagi Nakash <<a href="mailto:saginakash@gmail.com" target="_blank" rel="noreferrer">saginakash@gmail.com</a>><br>
---<br>
pan/ltp-pan.c | 2 ++<br>
1 file changed, 2 insertions(+)<br>
<br>
diff --git a/pan/ltp-pan.c b/pan/ltp-pan.c<br>
index 0bdb51477..eff9a867d 100644<br>
--- a/pan/ltp-pan.c<br>
+++ b/pan/ltp-pan.c<br>
@@ -551,6 +551,8 @@ int main(int argc, char **argv)<br>
++num_active;<br>
if ((cpid != -1 || sequential) && starts > 0)<br>
--starts;<br>
+ if (cpid == -1 && track_exit_stats)<br>
+ exit_stat++;<br>
<br>
if (sequential)<br>
if (++c >= coll->cnt)<br>
-- <br>
2.25.1<br>
<br>
</blockquote></div>