Module Name: src
Committed By: christos
Date: Sat Aug 27 14:36:22 UTC 2016
Modified Files:
src/tests/lib/libc/rpc: t_rpc.c
Log Message:
skip if we are not running rpcbind.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libc/rpc/t_rpc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/lib/libc/rpc/t_rpc.c
diff -u src/tests/lib/libc/rpc/t_rpc.c:1.9 src/tests/lib/libc/rpc/t_rpc.c:1.10
--- src/tests/lib/libc/rpc/t_rpc.c:1.9 Fri Nov 27 08:59:40 2015
+++ src/tests/lib/libc/rpc/t_rpc.c Sat Aug 27 10:36:22 2016
@@ -1,7 +1,7 @@
-/* $NetBSD: t_rpc.c,v 1.9 2015/11/27 13:59:40 christos Exp $ */
+/* $NetBSD: t_rpc.c,v 1.10 2016/08/27 14:36:22 christos Exp $ */
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_rpc.c,v 1.9 2015/11/27 13:59:40 christos Exp $");
+__RCSID("$NetBSD: t_rpc.c,v 1.10 2016/08/27 14:36:22 christos Exp $");
#include <sys/types.h>
#include <sys/socket.h>
@@ -21,12 +21,12 @@ __RCSID("$NetBSD: t_rpc.c,v 1.9 2015/11/
#define SKIPX(ev, msg, ...) do { \
atf_tc_skip(msg, __VA_ARGS__); \
- return; \
+ return ev; \
} while(/*CONSTCOND*/0)
#else
-#define ERRX(ev, msg, ...) errx(ev, msg, __VA_ARGS__)
-#define SKIPX(ev, msg, ...) errx(ev, msg, __VA_ARGS__)
+#define ERRX(ev, msg, ...) errx(EXIT_FAILURE, msg, __VA_ARGS__)
+#define SKIPX(ev, msg, ...) errx(EXIT_FAILURE, msg, __VA_ARGS__)
#endif
#ifdef DEBUG
@@ -72,13 +72,13 @@ onehost(const char *host, const char *tr
__rpc_control(CLCR_SET_RPCB_TIMEOUT, &tv);
if ((clnt = clnt_create(host, RPCBPROG, RPCBVERS, transp)) == NULL)
- SKIPX(EXIT_FAILURE, "clnt_create (%s)", clnt_spcreateerror(""));
+ SKIPX(, "clnt_create (%s)", clnt_spcreateerror(""));
tv.tv_sec = 1;
tv.tv_usec = 0;
if (clnt_call(clnt, RPCBPROC_NULL, xdr_void, NULL, xdr_void, NULL, tv)
!= RPC_SUCCESS)
- ERRX(EXIT_FAILURE, "clnt_call (%s)", clnt_sperror(clnt, ""));
+ ERRX(, "clnt_call (%s)", clnt_sperror(clnt, ""));
clnt_control(clnt, CLGET_SVC_ADDR, (char *) &addr);
reply(NULL, &addr, NULL);
}
@@ -100,13 +100,13 @@ server(struct svc_req *rqstp, SVCXPRT *t
switch (rqstp->rq_proc) {
case NULLPROC:
if (!svc_sendreply(transp, (xdrproc_t)xdr_void, NULL))
- ERRX(EXIT_FAILURE, "svc_sendreply failed %d", 0);
+ ERRX(, "svc_sendreply failed %d", 0);
return;
case PLUSONE:
break;
case DESTROY:
if (!svc_sendreply(transp, (xdrproc_t)xdr_void, NULL))
- ERRX(EXIT_FAILURE, "svc_sendreply failed %d", 0);
+ ERRX(, "svc_sendreply failed %d", 0);
svc_destroy(transp);
exit(0);
default:
@@ -121,7 +121,7 @@ server(struct svc_req *rqstp, SVCXPRT *t
DPRINTF("About to increment\n");
num++;
if (!svc_sendreply(transp, (xdrproc_t)xdr_int, (void *)&num))
- ERRX(EXIT_FAILURE, "svc_sendreply failed %d", 1);
+ ERRX(, "svc_sendreply failed %d", 1);
DPRINTF("Leaving server procedure.\n");
}
@@ -176,7 +176,7 @@ regtest(const char *hostname, const char
svc_fdset_init(p ? SVC_FDSET_POLL : 0);
if (!svc_create(server, PROGNUM, VERSNUM, transp))
- ERRX(EXIT_FAILURE, "Cannot create server %d", num);
+ SKIPX(EXIT_FAILURE, "Cannot create server %d", num);
switch ((pid = fork())) {
case 0: