[LTP] [PATCH 1/1] syscalls: Add missing WEXITSTATUS() check
Petr Vorel
pvorel@suse.cz
Mon Nov 11 15:36:09 CET 2024
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
I haven't found any other test which would need it.
testcases/kernel/syscalls/madvise/madvise08.c | 2 +-
testcases/kernel/syscalls/select/select03.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/syscalls/madvise/madvise08.c b/testcases/kernel/syscalls/madvise/madvise08.c
index 96bcaf159a..cd5ce722a5 100644
--- a/testcases/kernel/syscalls/madvise/madvise08.c
+++ b/testcases/kernel/syscalls/madvise/madvise08.c
@@ -173,7 +173,7 @@ static pid_t run_child(int advice)
SAFE_WAITPID(pid, &status, 0);
if (WIFSIGNALED(status) && WCOREDUMP(status))
return pid;
- if (WIFEXITED(status))
+ if (WIFEXITED(status) && !WEXITSTATUS(status))
return 0;
tst_res(TCONF, "No coredump produced after signal (%d)",
diff --git a/testcases/kernel/syscalls/select/select03.c b/testcases/kernel/syscalls/select/select03.c
index 1cec3a4c76..216b22104f 100644
--- a/testcases/kernel/syscalls/select/select03.c
+++ b/testcases/kernel/syscalls/select/select03.c
@@ -77,7 +77,7 @@ static void run(unsigned int n)
SAFE_WAITPID(pid, &status, 0);
- if (WIFEXITED(status))
+ if (WIFEXITED(status) && !WEXITSTATUS(status))
return;
if (tst_variant == GLIBC_SELECT_VARIANT &&
--
2.45.2
More information about the ltp
mailing list