svn commit: r309470 - stable/11/contrib/netbsd-tests/lib/libc/rpc
Ngie Cooper
ngie at FreeBSD.org
Sat Dec 3 03:04:22 UTC 2016
Author: ngie
Date: Sat Dec 3 03:04:20 2016
New Revision: 309470
URL: https://svnweb.freebsd.org/changeset/base/309470
Log:
MFC r305451:
Fix lib/libc/rpc test assumptions added in r305358
- Require root in the tcp/udp subtests (it's needed on FreeBSD when
registering services).
- Skip the tests if service registration fails.
Modified:
stable/11/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c
==============================================================================
--- stable/11/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Sat Dec 3 02:55:19 2016 (r309469)
+++ stable/11/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Sat Dec 3 03:04:20 2016 (r309470)
@@ -24,6 +24,13 @@ __RCSID("$NetBSD: t_rpc.c,v 1.9 2015/11/
return; \
} while(/*CONSTCOND*/0)
+#ifdef __FreeBSD__
+#define SKIPXI(ev, msg, ...) do { \
+ atf_tc_skip(msg, __VA_ARGS__); \
+ return ev; \
+} while(/*CONSTCOND*/0)
+#endif
+
#else
#define ERRX(ev, msg, ...) errx(ev, msg, __VA_ARGS__)
#define SKIPX(ev, msg, ...) errx(ev, msg, __VA_ARGS__)
@@ -188,7 +195,13 @@ regtest(const char *hostname, const char
svc_fdset_init(p ? SVC_FDSET_POLL : 0);
#endif
if (!svc_create(server, PROGNUM, VERSNUM, transp))
+#ifdef __NetBSD__
ERRX(EXIT_FAILURE, "Cannot create server %d", num);
+#else
+ {
+ SKIPXI(EXIT_FAILURE, "Cannot create server %d", num);
+ }
+#endif
switch ((pid = fork())) {
case 0:
@@ -335,6 +348,9 @@ ATF_TC(tcp);
ATF_TC_HEAD(tcp, tc)
{
atf_tc_set_md_var(tc, "descr", "Checks svc tcp (select)");
+#ifdef __FreeBSD__
+ atf_tc_set_md_var(tc, "require.user", "root");
+#endif
}
ATF_TC_BODY(tcp, tc)
@@ -347,6 +363,9 @@ ATF_TC(udp);
ATF_TC_HEAD(udp, tc)
{
atf_tc_set_md_var(tc, "descr", "Checks svc udp (select)");
+#ifdef __FreeBSD__
+ atf_tc_set_md_var(tc, "require.user", "root");
+#endif
}
ATF_TC_BODY(udp, tc)
@@ -359,6 +378,9 @@ ATF_TC(tcp_poll);
ATF_TC_HEAD(tcp_poll, tc)
{
atf_tc_set_md_var(tc, "descr", "Checks svc tcp (poll)");
+#ifdef __FreeBSD__
+ atf_tc_set_md_var(tc, "require.user", "root");
+#endif
}
ATF_TC_BODY(tcp_poll, tc)
@@ -371,6 +393,9 @@ ATF_TC(udp_poll);
ATF_TC_HEAD(udp_poll, tc)
{
atf_tc_set_md_var(tc, "descr", "Checks svc udp (poll)");
+#ifdef __FreeBSD__
+ atf_tc_set_md_var(tc, "require.user", "root");
+#endif
}
ATF_TC_BODY(udp_poll, tc)
More information about the svn-src-stable
mailing list