All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v1 1/6] realtime:async_handler_jk: return actual exit code
@ 2021-09-14 17:08 ` Bogdan Lezhepekov via ltp
  2021-09-14 17:08     ` Bogdan Lezhepekov via ltp
                     ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Bogdan Lezhepekov via ltp @ 2021-09-14 17:08 UTC (permalink / raw)
  To: ltp

The original version always returned 0.

Signed-off-by: Bogdan Lezhepekov <bogdan.lezhepekov@suse.com>
---
 testcases/realtime/func/async_handler/async_handler_jk.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/testcases/realtime/func/async_handler/async_handler_jk.c b/testcases/realtime/func/async_handler/async_handler_jk.c
index 4d8721822..8b40a474a 100644
--- a/testcases/realtime/func/async_handler/async_handler_jk.c
+++ b/testcases/realtime/func/async_handler/async_handler_jk.c
@@ -137,6 +137,7 @@ int main(int argc, char *argv[])
 {
 	int aes_id;		// asynchronous event server id
 	int user_id;		// User thread - that fires the event
+	int result;
 	long delta;
 	struct thread *server;
 	setup();
@@ -155,10 +156,11 @@ int main(int argc, char *argv[])
 	join_thread(user_id);
 	join_threads();
 	delta = (end - start) / NS_PER_US;
+	result = delta > pass_criteria ? 1 : 0;
 
 	printf("delta = %ld us\n", delta);
 	printf("\nCriteria: latencies < %d\n", (int)pass_criteria);
-	printf("Result: %s\n", delta > pass_criteria ? "FAIL" : "PASS");
+	printf("Result: %s\n",  result ? "FAIL" : "PASS");
 
-	return 0;
+	return result;
 }
-- 
2.32.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2021-09-24 15:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 17:08 [LTP] [PATCH v1 1/6] realtime:async_handler_jk: return actual exit code Bogdan Lezhepekov via ltp
2021-09-14 17:08 ` Bogdan Lezhepekov via ltp
2021-09-14 17:08   ` [LTP] [PATCH v1 2/6] rt:pi-tests::sbrk_mutex: " Bogdan Lezhepekov via ltp
2021-09-14 17:08     ` Bogdan Lezhepekov via ltp
2021-09-24 15:33       ` Cyril Hrubis
2021-09-14 17:08   ` [LTP] [PATCH v1 3/6] rt:pi-tests:testpi-0: " Bogdan Lezhepekov via ltp
2021-09-14 17:08     ` Bogdan Lezhepekov via ltp
2021-09-14 17:08   ` [LTP] [PATCH v1 4/6] rt:pi-tests:test-skeleton: fix wrong return value Bogdan Lezhepekov via ltp
2021-09-14 17:08     ` Bogdan Lezhepekov via ltp
2021-09-14 17:08   ` [LTP] [PATCH v1 5/6] rt:pi-tests:testpi-5: return exit code Bogdan Lezhepekov via ltp
2021-09-14 17:08     ` Bogdan Lezhepekov via ltp
2021-09-24  9:53       ` Petr Vorel
2021-09-24 10:07         ` Bogdan Lezhepekov via ltp
2021-09-14 17:08   ` [LTP] [PATCH v1 6/6] rt:pi-tests:testpi-6: " Bogdan Lezhepekov via ltp
2021-09-14 17:08     ` Bogdan Lezhepekov via ltp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.