Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/sys Handle core dumps in ATF ptr...
details: https://anonhg.NetBSD.org/src/rev/b5021d19acdf
branches: trunk
changeset: 318541:b5021d19acdf
user: kamil <kamil%NetBSD.org@localhost>
date: Sat Apr 28 17:56:55 2018 +0000
description:
Handle core dumps in ATF ptrace(2) tests easier
Cast WCOREDUMP() to either 1 or 0.
It could be changed to a boolean type, but it's already good enough.
Sponsored by <The NetBSD Foundation>
diffstat:
tests/lib/libc/sys/t_ptrace_wait.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 6f08306aa976 -r b5021d19acdf tests/lib/libc/sys/t_ptrace_wait.h
--- a/tests/lib/libc/sys/t_ptrace_wait.h Sat Apr 28 17:42:07 2018 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.h Sat Apr 28 17:56:55 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ptrace_wait.h,v 1.2 2018/03/13 13:34:40 kamil Exp $ */
+/* $NetBSD: t_ptrace_wait.h,v 1.3 2018/04/28 17:56:55 kamil Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -273,7 +273,7 @@
ATF_REQUIRE_EQ_MSG(WTERMSIG(status), expected_termsig,
"Unexpected signal received");
- ATF_REQUIRE_EQ_MSG(WCOREDUMP(status), expected_core,
+ ATF_REQUIRE_EQ_MSG(!!WCOREDUMP(status), expected_core,
"Unexpectedly core file %s generated", expected_core ? "not" : "");
}
@@ -286,7 +286,7 @@
FORKEE_ASSERTX(!WIFSTOPPED(status));
FORKEE_ASSERT_EQ(WTERMSIG(status), expected_termsig);
- FORKEE_ASSERT_EQ(WCOREDUMP(status), expected_core);
+ FORKEE_ASSERT_EQ(!!WCOREDUMP(status), expected_core);
}
static void __used
Home |
Main Index |
Thread Index |
Old Index