Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/kernel clear failure, print signals symbolically.
details: https://anonhg.NetBSD.org/src/rev/3be0f91ad4c7
branches: trunk
changeset: 348857:3be0f91ad4c7
user: christos <christos%NetBSD.org@localhost>
date: Fri Nov 11 17:08:54 2016 +0000
description:
clear failure, print signals symbolically.
diffstat:
tests/kernel/t_ptrace_wait.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diffs (52 lines):
diff -r 6e4271309d38 -r 3be0f91ad4c7 tests/kernel/t_ptrace_wait.c
--- a/tests/kernel/t_ptrace_wait.c Fri Nov 11 16:49:30 2016 +0000
+++ b/tests/kernel/t_ptrace_wait.c Fri Nov 11 17:08:54 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ptrace_wait.c,v 1.3 2016/11/11 12:01:14 kamil Exp $ */
+/* $NetBSD: t_ptrace_wait.c,v 1.4 2016/11/11 17:08:54 christos Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.3 2016/11/11 12:01:14 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.4 2016/11/11 17:08:54 christos Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -203,7 +203,8 @@
ATF_REQUIRE_MSG(!WIFSTOPPED(status), "Reported stopped process");
ATF_REQUIRE_EQ_MSG(WEXITSTATUS(status), expected,
- "The process has exited with invalid value");
+ "The process has exited with invalid value %d != %d",
+ WEXITSTATUS(status), expected);
}
static void __used
@@ -270,8 +271,12 @@
ATF_REQUIRE_MSG(!WIFSIGNALED(status), "Reported signaled process");
ATF_REQUIRE_MSG(WIFSTOPPED(status), "Reported stopped process");
+ char st[128], ex[128];
+ strlcpy(st, strsignal(WSTOPSIG(status)), sizeof(st));
+ strlcpy(ex, strsignal(expected), sizeof(ex));
+
ATF_REQUIRE_EQ_MSG(WSTOPSIG(status), expected,
- "Unexpected stop signal received");
+ "Unexpected stop signal received [%s] != [%s]", st, ex);
}
static void __used
@@ -826,9 +831,6 @@
int status;
#endif
- /* PT_ATTACH from a parent is unreliable */
- atf_tc_expect_fail("PR kern/51621");
-
printf("Spawn tracee\n");
ATF_REQUIRE(pipe(fds_totracee) == 0);
ATF_REQUIRE(pipe(fds_fromtracee) == 0);
Home |
Main Index |
Thread Index |
Old Index