diff options
Diffstat (limited to 'contrib/netbsd-tests')
-rw-r--r-- | contrib/netbsd-tests/kernel/t_lockf.c | 3 | ||||
-rw-r--r-- | contrib/netbsd-tests/lib/libc/regex/debug.c | 22 | ||||
-rw-r--r-- | contrib/netbsd-tests/lib/libc/rpc/t_rpc.c | 6 | ||||
-rw-r--r-- | contrib/netbsd-tests/lib/libc/stdio/t_fopen.c | 2 | ||||
-rw-r--r-- | contrib/netbsd-tests/lib/libcrypt/t_crypt.c | 4 |
5 files changed, 25 insertions, 12 deletions
diff --git a/contrib/netbsd-tests/kernel/t_lockf.c b/contrib/netbsd-tests/kernel/t_lockf.c index d937301..702e612 100644 --- a/contrib/netbsd-tests/kernel/t_lockf.c +++ b/contrib/netbsd-tests/kernel/t_lockf.c @@ -102,6 +102,9 @@ trylocks(int id) (void)fcntl(fd, F_SETLKW, &fl); if (usleep(sleeptime) < 0) +#if defined(__FreeBSD__) + if (errno != EINTR) +#endif err(1, "usleep"); } printf("%d: done\n", id); diff --git a/contrib/netbsd-tests/lib/libc/regex/debug.c b/contrib/netbsd-tests/lib/libc/regex/debug.c index fd2e467..3fc6d5b 100644 --- a/contrib/netbsd-tests/lib/libc/regex/debug.c +++ b/contrib/netbsd-tests/lib/libc/regex/debug.c @@ -45,16 +45,18 @@ #include "test_regex.h" +#ifdef __NetBSD__ static void s_print(struct re_guts *, FILE *); static char *regchar(int); +#endif +#ifdef __NetBSD__ /* * regprint - print a regexp for debugging */ void regprint(regex_t *r, FILE *d) { -#ifdef __NetBSD__ struct re_guts *g = r->re_g; int c; int last; @@ -116,7 +118,6 @@ regprint(regex_t *r, FILE *d) } fprintf(d, "\n"); } -#endif } /* @@ -126,15 +127,11 @@ static void s_print(struct re_guts *g, FILE *d) { sop *s; -#ifdef __NetBSD__ cset *cs; -#endif int done = 0; sop opnd; int col = 0; -#ifdef __NetBSD__ ssize_t last; -#endif sopno offset = 2; # define GAP() { if (offset % 5 == 0) { \ if (col > 40) { \ @@ -181,7 +178,6 @@ s_print(struct re_guts *g, FILE *d) break; case OANYOF: fprintf(d, "[(%ld)", (long)opnd); -#ifdef __NetBSD__ cs = &g->sets[opnd]; last = -1; for (size_t i = 0; i < g->csetsize+1; i++) /* +1 flushes */ @@ -198,7 +194,6 @@ s_print(struct re_guts *g, FILE *d) last = -1; } } -#endif fprintf(d, "]"); break; case OBACK_: @@ -254,11 +249,7 @@ s_print(struct re_guts *g, FILE *d) fprintf(d, ">"); break; default: -#ifdef __FreeBSD__ - fprintf(d, "!%ld(%ld)!", OP(*s), opnd); -#else fprintf(d, "!%d(%d)!", OP(*s), opnd); -#endif break; } if (!done) @@ -280,3 +271,10 @@ regchar(int ch) sprintf(buf, "\\%o", ch); return(buf); } +#else +void +regprint(regex_t *r, FILE *d) +{ + +} +#endif diff --git a/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c b/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c index 67bc8c7..a9715cf 100644 --- a/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c +++ b/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c @@ -73,8 +73,14 @@ onehost(const char *host, const char *transp) tv.tv_sec = 1; tv.tv_usec = 0; +#ifdef __FreeBSD__ + if (clnt_call(clnt, RPCBPROC_NULL, (xdrproc_t)xdr_void, NULL, + (xdrproc_t)xdr_void, NULL, tv) + != RPC_SUCCESS) +#else if (clnt_call(clnt, RPCBPROC_NULL, xdr_void, NULL, xdr_void, NULL, tv) != RPC_SUCCESS) +#endif ERRX(EXIT_FAILURE, "clnt_call (%s)", clnt_sperror(clnt, "")); clnt_control(clnt, CLGET_SVC_ADDR, (char *) &addr); reply(NULL, &addr, NULL); diff --git a/contrib/netbsd-tests/lib/libc/stdio/t_fopen.c b/contrib/netbsd-tests/lib/libc/stdio/t_fopen.c index d9e2dd6..4083b80 100644 --- a/contrib/netbsd-tests/lib/libc/stdio/t_fopen.c +++ b/contrib/netbsd-tests/lib/libc/stdio/t_fopen.c @@ -303,6 +303,7 @@ ATF_TC_BODY(fopen_perm, tc) ATF_REQUIRE_ERRNO(EACCES, fopen("/bin/ls", "w+") == NULL); } +#ifdef __NetBSD__ ATF_TC(fopen_regular); ATF_TC_HEAD(fopen_regular, tc) { @@ -335,6 +336,7 @@ ATF_TC_BODY(fopen_regular, tc) } } } +#endif ATF_TC_WITH_CLEANUP(fopen_seek); ATF_TC_HEAD(fopen_seek, tc) diff --git a/contrib/netbsd-tests/lib/libcrypt/t_crypt.c b/contrib/netbsd-tests/lib/libcrypt/t_crypt.c index 1a192cb..a5a4dcb 100644 --- a/contrib/netbsd-tests/lib/libcrypt/t_crypt.c +++ b/contrib/netbsd-tests/lib/libcrypt/t_crypt.c @@ -124,6 +124,10 @@ ATF_TC_HEAD(crypt_salts, tc) ATF_TC_BODY(crypt_salts, tc) { for (size_t i = 0; tests[i].hash; i++) { +#if defined(__FreeBSD__) + if (22 <= i) + atf_tc_expect_fail("Old-style/bad inputs fail on FreeBSD"); +#endif char *hash = crypt(tests[i].pw, tests[i].hash); if (!hash) { ATF_CHECK_MSG(0, "Test %zu NULL\n", i); |