diff mbox series

[rt-tests,v1,07/13] pip_stress: Return failure code if test fails

Message ID 20210304192220.11272-8-dwagner@suse.de
State Superseded
Headers show
Series JSON cleanups and more tests updated | expand

Commit Message

Daniel Wagner March 4, 2021, 7:22 p.m. UTC
Let the test return a failure code when the test fails.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 src/pi_tests/pip_stress.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/src/pi_tests/pip_stress.c b/src/pi_tests/pip_stress.c
index 2c3288984202..ed034799da66 100644
--- a/src/pi_tests/pip_stress.c
+++ b/src/pi_tests/pip_stress.c
@@ -160,11 +160,11 @@  int main(int argc, char *argv[])
 		}
 	}
 
-	if (statep->inversion)
-		printf("Successfully used priority inheritance to handle an inversion\n");
-	else
+	if (!statep->inversion) {
 		printf("No inversion incurred\n");
-
+		exit(1);
+	}
+	printf("Successfully used priority inheritance to handle an inversion\n");
 	exit(0);
 }