Skip to content

Commit fecdd88

Browse files
committed
tst_test: Fix exit value on tst_brk(TCONF, ...)
We decided not to propagate TCONF into the test exit value in a case that the test had at least one TPASS in: commit 5390d6e Author: Cyril Hrubis <[email protected]> Date: Thu Sep 7 15:47:22 2017 +0200 lib/tst_test: Report 0 if test has both TPASS and TCONF However this commit missed a case when TCONF is passed directly to the do_exit() function. This may happen in two cases actually, one of the is tst_brk(TCONF, ...) called from a test and second one is more subtle and happens when the last result in the run_tcases_per_fs() produces TCONF which is then propagated to the do_exit() function. This commit simply masks the TCONF from the exit value in this cases if we happen to have non-zero success counter. Signed-off-by: Cyril Hrubis <[email protected]> Acked-by: Jan Stancek <[email protected]>
1 parent a2e789c commit fecdd88

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/tst_test.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,9 @@ static void do_exit(int ret)
580580
printf("skipped %d\n", results->skipped);
581581
printf("warnings %d\n", results->warnings);
582582

583+
if (results->passed && ret == TCONF)
584+
ret = 0;
585+
583586
if (results->failed)
584587
ret |= TFAIL;
585588

0 commit comments

Comments
 (0)