The current exit syscall tests pass numbers to denote the exit status which have to be interpreted in a special way to pass or fail the test. Keep the exit status as EXIT_SUCCESS (0) so as to treat the successful termination in a generic way.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com --- tools/testing/selftests/arm64/morello/exit.c | 4 ++-- tools/testing/selftests/arm64/morello/freestanding.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/arm64/morello/exit.c b/tools/testing/selftests/arm64/morello/exit.c index 07c43e7d781e..dd4a91b10bc3 100644 --- a/tools/testing/selftests/arm64/morello/exit.c +++ b/tools/testing/selftests/arm64/morello/exit.c @@ -16,8 +16,8 @@ void __attribute__ ((noreturn)) main(void) { /* try any exit() */ - syscall(__NR_exit_group, 0x21); - syscall(__NR_exit, 0x22); + syscall(__NR_exit_group, EXIT_SUCCESS); + syscall(__NR_exit, EXIT_SUCCESS); /* "report" failure the only way you can */ for (;;); } diff --git a/tools/testing/selftests/arm64/morello/freestanding.h b/tools/testing/selftests/arm64/morello/freestanding.h index f8a0fdcbdec3..ede290f3ca1b 100644 --- a/tools/testing/selftests/arm64/morello/freestanding.h +++ b/tools/testing/selftests/arm64/morello/freestanding.h @@ -22,6 +22,8 @@ typedef __kernel_clockid_t clockid_t; typedef __kernel_uid_t uid_t; typedef __kernel_mode_t mode_t;
+#define EXIT_SUCCESS 0 + struct __test_meta { int message; };