Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/rpc - make ERRX() return a value since it doe...



details:   https://anonhg.NetBSD.org/src/rev/e1b525f2f9c0
branches:  trunk
changeset: 448492:e1b525f2f9c0
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Feb 04 04:20:13 2019 +0000

description:
- make ERRX() return a value since it doesn't actually exit in the !TEST case.

diffstat:

 tests/lib/libc/rpc/t_rpc.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (25 lines):

diff -r 7b1e06f60aa4 -r e1b525f2f9c0 tests/lib/libc/rpc/t_rpc.c
--- a/tests/lib/libc/rpc/t_rpc.c        Mon Feb 04 04:18:59 2019 +0000
+++ b/tests/lib/libc/rpc/t_rpc.c        Mon Feb 04 04:20:13 2019 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: t_rpc.c,v 1.10 2016/08/27 14:36:22 christos Exp $      */
+/*     $NetBSD: t_rpc.c,v 1.11 2019/02/04 04:20:13 mrg Exp $   */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_rpc.c,v 1.10 2016/08/27 14:36:22 christos Exp $");
+__RCSID("$NetBSD: t_rpc.c,v 1.11 2019/02/04 04:20:13 mrg Exp $");
 
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -17,7 +17,10 @@
 #ifndef TEST
 #include <atf-c.h>
 
-#define ERRX(ev, msg, ...)     ATF_REQUIRE_MSG(0, msg, __VA_ARGS__)
+#define ERRX(ev, msg, ...)     do {                    \
+       ATF_REQUIRE_MSG(0, msg, __VA_ARGS__);           \
+       return ev;                                      \
+} while(/*CONSTCOND*/0)
 
 #define SKIPX(ev, msg, ...)    do {                    \
        atf_tc_skip(msg, __VA_ARGS__);                  \



Home | Main Index | Thread Index | Old Index