CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: christos Date: Sat Aug 13 11:20:00 UTC 2016 Modified Files: src/tests/fs/nfs/nfsservice: Makefile Log Message: The required initialization order for net rump net services is: rumpnet rumpnet_net [rumpnet_netinet6] rumpnet_netinet. We need rumpnent_net first because of if_init1() and to initialize loopback. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/tests/fs/nfs/nfsservice/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/nfs/nfsservice/Makefile diff -u src/tests/fs/nfs/nfsservice/Makefile:1.11 src/tests/fs/nfs/nfsservice/Makefile:1.12 --- src/tests/fs/nfs/nfsservice/Makefile:1.11 Wed Dec 23 13:42:23 2015 +++ src/tests/fs/nfs/nfsservice/Makefile Sat Aug 13 07:20:00 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2015/12/23 18:42:23 christos Exp $ +# $NetBSD: Makefile,v 1.12 2016/08/13 11:20:00 christos Exp $ # NOMAN= 1 @@ -18,10 +18,11 @@ TESTS_C=rumpnfsd SRCS.rumpnfsd= rumpnfsd.c nfsd.c mountd.c getmntinfo.c get_net.c +LDADD+= -lrumpnet -lrumpnet_net -lrumpnet_local +LDADD+= -lrumpnet_netinet6 -lrumpnet_netinet # TCP/IP LDADD+= -lrumpfs_nfsserver -lrumpfs_nfs# NFS support LDADD+= -lrumpdev_disk -lrumpdev# disk devices LDADD+= -lrumpfs_ffs -lrumpvfs # FFS -LDADD+= -lrumpnet_netinet -lrumpnet_net -lrumpnet_local # TCP/IP LDADD+= -lrumpnet_shmif # shmif LDADD+= -lrumpnet -lrumpkern_sysproxy -lrump -lrumpuser # base LDADD+= -lpthread -lutil
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: christos Date: Wed Dec 23 18:42:23 UTC 2015 Modified Files: src/tests/fs/nfs/nfsservice: Makefile Removed Files: src/tests/fs/nfs/nfsservice: nfsd.c Log Message: Use the original nfsd. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/fs/nfs/nfsservice/Makefile cvs rdiff -u -r1.6 -r0 src/tests/fs/nfs/nfsservice/nfsd.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/fs/nfs/nfsservice/Makefile diff -u src/tests/fs/nfs/nfsservice/Makefile:1.10 src/tests/fs/nfs/nfsservice/Makefile:1.11 --- src/tests/fs/nfs/nfsservice/Makefile:1.10 Wed Dec 23 13:10:10 2015 +++ src/tests/fs/nfs/nfsservice/Makefile Wed Dec 23 13:42:23 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2015/12/23 18:10:10 christos Exp $ +# $NetBSD: Makefile,v 1.11 2015/12/23 18:42:23 christos Exp $ # NOMAN= 1 @@ -27,9 +27,9 @@ LDADD+= -lrumpnet -lrumpkern_sysproxy -l LDADD+= -lpthread -lutil CPPFLAGS+= -DDEBUG -DMOUNT_NOMAIN -D_REENTRANT -CPPFLAGS+= -DRUMP_SYS_NETWORKING -DMOUNTD_RUMP +CPPFLAGS+= -DRUMP_SYS_NETWORKING -DMOUNTD_RUMP -DNFSD_RUMP -.PATH.c: ${NETBSDSRCDIR}/usr.sbin/mountd +.PATH.c: ${NETBSDSRCDIR}/usr.sbin/mountd ${NETBSDSRCDIR}/usr.sbin/nfsd # RPCBIND .PATH.c: ${NETBSDSRCDIR}/usr.sbin/rpcbind
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: christos Date: Wed Dec 23 18:10:39 UTC 2015 Modified Files: src/tests/fs/nfs/nfsservice: nfsd.c Log Message: ggr, make debug static. I hate that the copy of this and the original source has diverged so much! To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/fs/nfs/nfsservice/nfsd.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/fs/nfs/nfsservice/nfsd.c diff -u src/tests/fs/nfs/nfsservice/nfsd.c:1.5 src/tests/fs/nfs/nfsservice/nfsd.c:1.6 --- src/tests/fs/nfs/nfsservice/nfsd.c:1.5 Fri Aug 21 10:19:10 2015 +++ src/tests/fs/nfs/nfsservice/nfsd.c Wed Dec 23 13:10:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nfsd.c,v 1.5 2015/08/21 14:19:10 christos Exp $ */ +/* $NetBSD: nfsd.c,v 1.6 2015/12/23 18:10:39 christos Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = "@(#)nfsd.c 8.9 (Berkeley) 3/29/95"; #else -__RCSID("$NetBSD: nfsd.c,v 1.5 2015/08/21 14:19:10 christos Exp $"); +__RCSID("$NetBSD: nfsd.c,v 1.6 2015/12/23 18:10:39 christos Exp $"); #endif #endif /* not lint */ @@ -89,9 +89,9 @@ do { \ fprintf(stderr,(s), ## args); \ fprintf(stderr, "\n"); \ } while (/*CONSTCOND*/0) -int debug = 1; +static int debug = 1; #else -int debug = 0; +static int debug = 0; #endif void nonfs(int);
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: christos Date: Wed Dec 23 18:10:10 UTC 2015 Modified Files: src/tests/fs/nfs/nfsservice: Makefile Log Message: add get_net.c To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/tests/fs/nfs/nfsservice/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/nfs/nfsservice/Makefile diff -u src/tests/fs/nfs/nfsservice/Makefile:1.9 src/tests/fs/nfs/nfsservice/Makefile:1.10 --- src/tests/fs/nfs/nfsservice/Makefile:1.9 Sun Nov 8 16:05:39 2015 +++ src/tests/fs/nfs/nfsservice/Makefile Wed Dec 23 13:10:10 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2015/11/08 21:05:39 christos Exp $ +# $NetBSD: Makefile,v 1.10 2015/12/23 18:10:10 christos Exp $ # NOMAN= 1 @@ -16,7 +16,7 @@ LDADD+= -L${VFSTESTDIR} -Wl,--whole-arch TESTS_C=rumpnfsd -SRCS.rumpnfsd= rumpnfsd.c nfsd.c mountd.c getmntinfo.c +SRCS.rumpnfsd= rumpnfsd.c nfsd.c mountd.c getmntinfo.c get_net.c LDADD+= -lrumpfs_nfsserver -lrumpfs_nfs# NFS support LDADD+= -lrumpdev_disk -lrumpdev# disk devices
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: christos Date: Sun Nov 8 21:05:39 UTC 2015 Modified Files: src/tests/fs/nfs/nfsservice: Makefile Removed Files: src/tests/fs/nfs/nfsservice: mountd.c src/tests/fs/nfs/nfsservice/rpcbind: Makefile.inc Log Message: Use the regular mountd, and include the rpcbind stuff here. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/fs/nfs/nfsservice/Makefile cvs rdiff -u -r1.11 -r0 src/tests/fs/nfs/nfsservice/mountd.c cvs rdiff -u -r1.4 -r0 src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/nfs/nfsservice/Makefile diff -u src/tests/fs/nfs/nfsservice/Makefile:1.8 src/tests/fs/nfs/nfsservice/Makefile:1.9 --- src/tests/fs/nfs/nfsservice/Makefile:1.8 Wed Jan 7 23:00:31 2015 +++ src/tests/fs/nfs/nfsservice/Makefile Sun Nov 8 16:05:39 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2015/01/08 04:00:31 pooka Exp $ +# $NetBSD: Makefile,v 1.9 2015/11/08 21:05:39 christos Exp $ # NOMAN= 1 @@ -27,11 +27,24 @@ LDADD+= -lrumpnet -lrumpkern_sysproxy -l LDADD+= -lpthread -lutil CPPFLAGS+= -DDEBUG -DMOUNT_NOMAIN -D_REENTRANT -CPPFLAGS+= -DRUMP_SYS_NETWORKING +CPPFLAGS+= -DRUMP_SYS_NETWORKING -DMOUNTD_RUMP -.PATH: ${.CURDIR}/rpcbind -.include "rpcbind/Makefile.inc" +.PATH.c: ${NETBSDSRCDIR}/usr.sbin/mountd -WARNS= 2 +# RPCBIND +.PATH.c: ${NETBSDSRCDIR}/usr.sbin/rpcbind +SRCS.rumpnfsd+= check_bound.c rpcb_stat.c rpcb_svc_4.c rpcbind.c pmap_svc.c \ + rpcb_svc.c rpcb_svc_com.c security.c util.c + +LIBRPCDIR=${NETBSDSRCDIR}/lib/libc/rpc + +CPPFLAGS+= -I${LIBRPCDIR} -DPORTMAP -DLIBWRAP -DRPCBIND_RUMP + +# Uncomment these to get any useful output from 'rpcbind -d' +# CPPFLAGS+= -DRPCBIND_DEBUG +# CPPFLAGS+= -DSVC_RUN_DEBUG + +LDADD+= -lwrap -lutil +DPADD+= ${LIBWRAP} ${LIBUTIL} .include
CVS commit: src/tests/fs/nfs/nfsservice/rpcbind
Module Name:src Committed By: christos Date: Sun Nov 8 16:38:56 UTC 2015 Modified Files: src/tests/fs/nfs/nfsservice/rpcbind: Makefile.inc Log Message: Use the regular rpcbind source now. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc diff -u src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc:1.3 src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc:1.4 --- src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc:1.3 Wed Mar 6 08:36:50 2013 +++ src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc Sun Nov 8 11:38:56 2015 @@ -1,11 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.3 2013/03/06 13:36:50 christos Exp $ +# $NetBSD: Makefile.inc,v 1.4 2015/11/08 16:38:56 christos Exp $ +.PATH.c: ${NETBSDSRCDIR}/usr.sbin/rpcbind SRCS.rumpnfsd+= check_bound.c rpcb_stat.c rpcb_svc_4.c rpcbind.c pmap_svc.c \ rpcb_svc.c rpcb_svc_com.c security.c util.c LIBRPCDIR=${NETBSDSRCDIR}/lib/libc/rpc -CPPFLAGS+= -I${LIBRPCDIR} -DPORTMAP -DLIBWRAP +CPPFLAGS+= -I${LIBRPCDIR} -DPORTMAP -DLIBWRAP -DRPCBIND_RUMP # Uncomment these to get any useful output from 'rpcbind -d' # CPPFLAGS+= -DRPCBIND_DEBUG
CVS commit: src/tests/fs/nfs/nfsservice/rpcbind
Module Name:src Committed By: christos Date: Sun Nov 8 16:37:57 UTC 2015 Removed Files: src/tests/fs/nfs/nfsservice/rpcbind: check_bound.c pmap_svc.c rpcb_stat.c rpcb_svc.c rpcb_svc_4.c rpcb_svc_com.c rpcbind.8 rpcbind.c rpcbind.h security.c util.c Log Message: Remove dup copy of rpcbind sources that had grown stale. To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/tests/fs/nfs/nfsservice/rpcbind/check_bound.c \ src/tests/fs/nfs/nfsservice/rpcbind/rpcb_stat.c \ src/tests/fs/nfs/nfsservice/rpcbind/rpcbind.8 \ src/tests/fs/nfs/nfsservice/rpcbind/rpcbind.h \ src/tests/fs/nfs/nfsservice/rpcbind/security.c cvs rdiff -u -r1.3 -r0 src/tests/fs/nfs/nfsservice/rpcbind/pmap_svc.c \ src/tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_com.c cvs rdiff -u -r1.2 -r0 src/tests/fs/nfs/nfsservice/rpcbind/rpcb_svc.c \ src/tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_4.c \ src/tests/fs/nfs/nfsservice/rpcbind/util.c cvs rdiff -u -r1.6 -r0 src/tests/fs/nfs/nfsservice/rpcbind/rpcbind.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: christos Date: Sun Nov 8 16:38:25 UTC 2015 Modified Files: src/tests/fs/nfs/nfsservice: mountd.c Log Message: Don't use POLL again. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/fs/nfs/nfsservice/mountd.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/fs/nfs/nfsservice/mountd.c diff -u src/tests/fs/nfs/nfsservice/mountd.c:1.10 src/tests/fs/nfs/nfsservice/mountd.c:1.11 --- src/tests/fs/nfs/nfsservice/mountd.c:1.10 Sat Nov 7 21:45:16 2015 +++ src/tests/fs/nfs/nfsservice/mountd.c Sun Nov 8 11:38:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mountd.c,v 1.10 2015/11/08 02:45:16 christos Exp $ */ +/* $NetBSD: mountd.c,v 1.11 2015/11/08 16:38:25 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: mountd.c,v 1.10 2015/11/08 02:45:16 christos Exp $"); +__RCSID("$NetBSD: mountd.c,v 1.11 2015/11/08 16:38:25 christos Exp $"); #endif #endif/* not lint */ @@ -353,7 +353,7 @@ mountd_main(void *arg) extern sem_t gensem; pthread_t ptdummy; - svc_fdset_init(SVC_FDSET_MT | SVC_FDSET_POLL); + svc_fdset_init(SVC_FDSET_MT); #if 0 while ((c = getopt(argc, argv, "dNnrp:" ADDOPTS)) != -1)
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: christos Date: Sun Nov 8 02:45:16 UTC 2015 Modified Files: src/tests/fs/nfs/nfsservice: mountd.c rumpnfsd.c src/tests/fs/nfs/nfsservice/rpcbind: pmap_svc.c rpcb_svc_com.c rpcbind.c Log Message: make this work with the new fdset stuff. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/tests/fs/nfs/nfsservice/mountd.c cvs rdiff -u -r1.8 -r1.9 src/tests/fs/nfs/nfsservice/rumpnfsd.c cvs rdiff -u -r1.2 -r1.3 src/tests/fs/nfs/nfsservice/rpcbind/pmap_svc.c \ src/tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_com.c cvs rdiff -u -r1.5 -r1.6 src/tests/fs/nfs/nfsservice/rpcbind/rpcbind.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/fs/nfs/nfsservice/mountd.c diff -u src/tests/fs/nfs/nfsservice/mountd.c:1.9 src/tests/fs/nfs/nfsservice/mountd.c:1.10 --- src/tests/fs/nfs/nfsservice/mountd.c:1.9 Fri Aug 21 10:19:10 2015 +++ src/tests/fs/nfs/nfsservice/mountd.c Sat Nov 7 21:45:16 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mountd.c,v 1.9 2015/08/21 14:19:10 christos Exp $ */ +/* $NetBSD: mountd.c,v 1.10 2015/11/08 02:45:16 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: mountd.c,v 1.9 2015/08/21 14:19:10 christos Exp $"); +__RCSID("$NetBSD: mountd.c,v 1.10 2015/11/08 02:45:16 christos Exp $"); #endif #endif/* not lint */ @@ -353,7 +353,7 @@ mountd_main(void *arg) extern sem_t gensem; pthread_t ptdummy; - alloc_fdset(); + svc_fdset_init(SVC_FDSET_MT | SVC_FDSET_POLL); #if 0 while ((c = getopt(argc, argv, "dNnrp:" ADDOPTS)) != -1) Index: src/tests/fs/nfs/nfsservice/rumpnfsd.c diff -u src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.8 src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.9 --- src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.8 Mon May 12 11:31:07 2014 +++ src/tests/fs/nfs/nfsservice/rumpnfsd.c Sat Nov 7 21:45:16 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpnfsd.c,v 1.8 2014/05/12 15:31:07 christos Exp $ */ +/* $NetBSD: rumpnfsd.c,v 1.9 2015/11/08 02:45:16 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -37,6 +37,7 @@ #include #include #include +#include void *mountd_main(void *); void *rpcbind_main(void *); @@ -87,7 +88,7 @@ main(int argc, char *argv[]) } rump_init(); - init_fdsets(); + svc_fdset_init(SVC_FDSET_MT); rv = rump_pub_etfs_register("/etc/exports", "./exports", RUMP_ETFS_REG); if (rv) { Index: src/tests/fs/nfs/nfsservice/rpcbind/pmap_svc.c diff -u src/tests/fs/nfs/nfsservice/rpcbind/pmap_svc.c:1.2 src/tests/fs/nfs/nfsservice/rpcbind/pmap_svc.c:1.3 --- src/tests/fs/nfs/nfsservice/rpcbind/pmap_svc.c:1.2 Sat Oct 19 13:45:00 2013 +++ src/tests/fs/nfs/nfsservice/rpcbind/pmap_svc.c Sat Nov 7 21:45:16 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_svc.c,v 1.2 2013/10/19 17:45:00 christos Exp $ */ +/* $NetBSD: pmap_svc.c,v 1.3 2015/11/08 02:45:16 christos Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -173,18 +173,18 @@ pmapproc_change(struct svc_req *rqstp, S struct sockcred *sc; char uidbuf[32]; -#ifdef RPCBIND_DEBUG - if (debugging) - fprintf(stderr, "%s request for (%lu, %lu) : ", - op == PMAPPROC_SET ? "PMAP_SET" : "PMAP_UNSET", - reg.pm_prog, reg.pm_vers); -#endif if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { svcerr_decode(xprt); return (FALSE); } +#ifdef RPCBIND_DEBUG + if (debugging) + fprintf(stderr, "%s request for (%lu, %lu) : ", + op == PMAPPROC_SET ? "PMAP_SET" : "PMAP_UNSET", + reg.pm_prog, reg.pm_vers); +#endif if (!check_access(xprt, op, ®, PMAPVERS)) { svcerr_weakauth(xprt); return FALSE; Index: src/tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_com.c diff -u src/tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_com.c:1.2 src/tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_com.c:1.3 --- src/tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_com.c:1.2 Fri Sep 16 12:13:18 2011 +++ src/tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_com.c Sat Nov 7 21:45:16 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: rpcb_svc_com.c,v 1.2 2011/09/16 16:13:18 plunky Exp $ */ +/* $NetBSD: rpcb_svc_com.c,v 1.3 2015/11/08 02:45:16 christos Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -291,7 +291,7 @@ void delete_prog(int prog) { RPCB reg; - register rpcblist_ptr rbl; + rpcblist_ptr rbl; for (rbl = list_rbl; rbl != NULL; rbl = rbl->rpcb_next) { if ((rbl->rpcb_map.r_prog != prog)) @@ -514,10 +514,7 @@ create_rmtcall_fd(struct netconfig *ncon rmttail->next = rmt; rmttail = rmt; } - /* XXX not threadsafe */ - if (fd > *get_fdsetmax()) - *get_fdsetmax() = fd; - FD_SET(fd, get_fdset()); + svc_fdset_set(fd); return (fd); } @@ -590,7 +587,7 @@ void rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, rp
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: christos Date: Fri Aug 21 14:19:10 UTC 2015 Modified Files: src/tests/fs/nfs/nfsservice: mountd.c nfsd.c src/tests/fs/nfs/nfsservice/rpcbind: rpcbind.c Log Message: don't abuse %m in printf fix error messages To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/fs/nfs/nfsservice/mountd.c cvs rdiff -u -r1.4 -r1.5 src/tests/fs/nfs/nfsservice/nfsd.c cvs rdiff -u -r1.4 -r1.5 src/tests/fs/nfs/nfsservice/rpcbind/rpcbind.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/fs/nfs/nfsservice/mountd.c diff -u src/tests/fs/nfs/nfsservice/mountd.c:1.8 src/tests/fs/nfs/nfsservice/mountd.c:1.9 --- src/tests/fs/nfs/nfsservice/mountd.c:1.8 Sat Oct 19 13:45:00 2013 +++ src/tests/fs/nfs/nfsservice/mountd.c Fri Aug 21 10:19:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mountd.c,v 1.8 2013/10/19 17:45:00 christos Exp $ */ +/* $NetBSD: mountd.c,v 1.9 2015/08/21 14:19:10 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: mountd.c,v 1.8 2013/10/19 17:45:00 christos Exp $"); +__RCSID("$NetBSD: mountd.c,v 1.9 2015/08/21 14:19:10 christos Exp $"); #endif #endif/* not lint */ @@ -904,14 +904,12 @@ parse_directory(line, lineno, tgrp, got_ struct exportlist **ep; struct statvfs *fsp; { - int error = 0; - if (!check_dirpath(line, lineno, cp)) return 0; if (rump_sys_statvfs1(cp, fsp, ST_WAIT) == -1) { - syslog(LOG_ERR, "\"%s\", line %ld: statvfs for `%s' failed: %m %d", - line, (unsigned long)lineno, cp, error); + syslog(LOG_ERR, "\"%s\", line %ld: statvfs for `%s' failed (%s)", + line, (unsigned long)lineno, cp, strerror(errno)); return 0; } @@ -1011,8 +1009,8 @@ get_exportlist(n) mel.mel_nexports = 0; if (rump_sys_nfssvc(NFSSVC_SETEXPORTSLIST, &mel) == -1 && errno != EOPNOTSUPP) - syslog(LOG_ERR, "Can't delete exports for %s (%m)", - fsp->f_mntonname); + syslog(LOG_ERR, "Can't delete exports for %s (%s)", + fsp->f_mntonname, strerror(errno)); fsp++; } @@ -1997,13 +1995,13 @@ do_nfssvc(line, lineno, ep, grp, exflags if (rump_sys_nfssvc(NFSSVC_SETEXPORTSLIST, &mel) != 0) { syslog(LOG_ERR, - "\"%s\", line %ld: Can't change attributes for %s to %s: %m %d", + "\"%s\", line %ld: Can't change attributes for %s to %s (%s)", line, (unsigned long)lineno, dirp, (grp->gr_type == GT_HOST) ? grp->gr_ptr.gt_addrinfo->ai_canonname : (grp->gr_type == GT_NET) ? grp->gr_ptr.gt_net.nt_name : - "Unknown", errno); + "Unknown", strerror(errno)); return (1); } skip: @@ -2258,7 +2256,8 @@ get_mountlist() FILE *mlfile; if ((mlfile = rumpfopen(_PATH_RMOUNTLIST, "r")) == NULL) { - syslog(LOG_ERR, "Can't open %s: %m", _PATH_RMOUNTLIST); + syslog(LOG_ERR, "Can't open %s (%s)", _PATH_RMOUNTLIST, + strerror(errno)); return; } mlpp = &mlhead; @@ -2330,8 +2329,8 @@ cont: } if (fnd) { if ((mlfile = rumpfopen(_PATH_RMOUNTLIST, "w")) == NULL) { - syslog(LOG_ERR, "Can't update %s: %m", - _PATH_RMOUNTLIST); + syslog(LOG_ERR, "Can't update %s (%s)", + _PATH_RMOUNTLIST, strerror(errno)); return ret; } mlp = mlhead; @@ -2370,7 +2369,8 @@ add_mlist(hostp, dirp, flags) mlp->ml_next = NULL; *mlpp = mlp; if ((mlfile = rumpfopen(_PATH_RMOUNTLIST, "a")) == NULL) { - syslog(LOG_ERR, "Can't update %s: %m", _PATH_RMOUNTLIST); + syslog(LOG_ERR, "Can't update %s (%s)", _PATH_RMOUNTLIST, + strerror(errno)); return; } (void)fprintf(mlfile, "%s %s\n", mlp->ml_host, mlp->ml_dirp); @@ -2520,8 +2520,8 @@ check_dirpath(line, lineno, dirp) bad: syslog(LOG_ERR, - "\"%s\", line %ld: lstat for `%s' failed: %m", - line, (unsigned long)lineno, dirp); + "\"%s\", line %ld: lstat for `%s' failed (%s)", + line, (unsigned long)lineno, dirp, strerror(errno)); if (cp) *cp = '/'; return 0; @@ -2563,7 +2563,8 @@ bind_resv_port(int sock, sa_family_t fam return; } if (bindresvport_sa(sock, sa) == -1) - syslog(LOG_ERR, "Cannot bind to reserved port %d (%m)", port); + syslog(LOG_ERR, "Cannot bind to reserved port %d (%s)", port, + strerror(errno)); } /* ARGSUSED */ Index: src/tests/fs/nfs/nfsservice/nfsd.c diff -u src/tests/fs/nfs/nfsservice/nfsd.c:1.4 src/tests/fs/nfs/nfsservice/nfsd.c:1.5 --- src/tests/fs/nfs/nfsservice/nfsd.c:1.4 Sat Oct 19 13:45:00 2013 +++ src/tests/fs/nfs/nfsservice/nfsd.c Fri Aug 21 10:19:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nfsd.c,v 1.4 2013/10/19 17:45:00 christos Exp $ */ +/* $NetBSD: nfsd.c,v 1.5 2015/08/21 14:19:10 christos Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = "@(#)nfsd.c 8.9 (Berkel
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: pooka Date: Thu Jan 8 04:00:31 UTC 2015 Modified Files: src/tests/fs/nfs/nfsservice: Makefile Log Message: one more MKZFS fix (how many subdirs does this place have?) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/fs/nfs/nfsservice/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/nfs/nfsservice/Makefile diff -u src/tests/fs/nfs/nfsservice/Makefile:1.7 src/tests/fs/nfs/nfsservice/Makefile:1.8 --- src/tests/fs/nfs/nfsservice/Makefile:1.7 Wed Mar 6 13:35:22 2013 +++ src/tests/fs/nfs/nfsservice/Makefile Thu Jan 8 04:00:31 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2013/03/06 13:35:22 christos Exp $ +# $NetBSD: Makefile,v 1.8 2015/01/08 04:00:31 pooka Exp $ # NOMAN= 1 @@ -23,7 +23,7 @@ LDADD+= -lrumpdev_disk -lrumpdev# di LDADD+= -lrumpfs_ffs -lrumpvfs # FFS LDADD+= -lrumpnet_netinet -lrumpnet_net -lrumpnet_local # TCP/IP LDADD+= -lrumpnet_shmif # shmif -LDADD+= -lrumpnet -lrump -lrumpuser# base +LDADD+= -lrumpnet -lrumpkern_sysproxy -lrump -lrumpuser # base LDADD+= -lpthread -lutil CPPFLAGS+= -DDEBUG -DMOUNT_NOMAIN -D_REENTRANT
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: christos Date: Mon May 12 15:31:07 UTC 2014 Modified Files: src/tests/fs/nfs/nfsservice: rumpnfsd.c Log Message: CID 975238: Unchecked returns To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/fs/nfs/nfsservice/rumpnfsd.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/fs/nfs/nfsservice/rumpnfsd.c diff -u src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.7 src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.8 --- src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.7 Mon Feb 28 16:21:14 2011 +++ src/tests/fs/nfs/nfsservice/rumpnfsd.c Mon May 12 11:31:07 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpnfsd.c,v 1.7 2011/02/28 21:21:14 pooka Exp $ */ +/* $NetBSD: rumpnfsd.c,v 1.8 2014/05/12 15:31:07 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -95,9 +95,10 @@ main(int argc, char *argv[]) } /* mini-mtree for mountd */ - rump_sys_mkdir("/var", 0777); - rump_sys_mkdir("/var/run", 0777); - rump_sys_mkdir("/var/db", 0777); + static const char *const dirs[] = { "/var", "/var/run", "/var/db" }; + for (size_t i = 0; i < __arraycount(dirs); i++) + if (rump_sys_mkdir(dirs[i], 0777) == -1) + err(1, "can't mkdir `%s'", dirs[i]); if (ffs_fstest_newfs(NULL, &fsarg, imagename, FSTEST_IMGSIZE, NULL) != 0)
CVS commit: src/tests/fs/nfs/nfsservice/rpcbind
Module Name:src Committed By: christos Date: Wed Mar 6 13:36:50 UTC 2013 Modified Files: src/tests/fs/nfs/nfsservice/rpcbind: Makefile.inc Log Message: Mystery solved: The build worked for me because the my src tree is in /usr/src. Refer to the correct source tree instead of the conventionally correct one. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc diff -u src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc:1.2 src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc:1.3 --- src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc:1.2 Tue Aug 3 13:24:45 2010 +++ src/tests/fs/nfs/nfsservice/rpcbind/Makefile.inc Wed Mar 6 08:36:50 2013 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.inc,v 1.2 2010/08/03 17:24:45 drochner Exp $ +# $NetBSD: Makefile.inc,v 1.3 2013/03/06 13:36:50 christos Exp $ SRCS.rumpnfsd+= check_bound.c rpcb_stat.c rpcb_svc_4.c rpcbind.c pmap_svc.c \ rpcb_svc.c rpcb_svc_com.c security.c util.c -LIBRPCDIR=/usr/src/lib/libc/rpc +LIBRPCDIR=${NETBSDSRCDIR}/lib/libc/rpc CPPFLAGS+= -I${LIBRPCDIR} -DPORTMAP -DLIBWRAP
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: christos Date: Wed Mar 6 13:35:22 UTC 2013 Modified Files: src/tests/fs/nfs/nfsservice: Makefile Log Message: don't refer to things that are irrelevant or never existed. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/fs/nfs/nfsservice/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/nfs/nfsservice/Makefile diff -u src/tests/fs/nfs/nfsservice/Makefile:1.6 src/tests/fs/nfs/nfsservice/Makefile:1.7 --- src/tests/fs/nfs/nfsservice/Makefile:1.6 Mon Jul 18 23:30:46 2011 +++ src/tests/fs/nfs/nfsservice/Makefile Wed Mar 6 08:35:22 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2011/07/19 03:30:46 dholland Exp $ +# $NetBSD: Makefile,v 1.7 2013/03/06 13:35:22 christos Exp $ # NOMAN= 1 @@ -28,12 +28,9 @@ LDADD+= -lpthread -lutil CPPFLAGS+= -DDEBUG -DMOUNT_NOMAIN -D_REENTRANT CPPFLAGS+= -DRUMP_SYS_NETWORKING -#CPPFLAGS+= -DSVC_RUN_DEBUG -CPPFLAGS+= -I${.CURDIR}/../../common/nfsrpc .PATH: ${.CURDIR}/rpcbind .include "rpcbind/Makefile.inc" -#.include "rpc/Makefile.inc" WARNS= 2
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: dholland Date: Tue Jul 19 03:30:46 UTC 2011 Modified Files: src/tests/fs/nfs/nfsservice: Makefile Log Message: Remove nonexistent include directory from CPPFLAGS. PR 45068 from Henning Petersen. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/fs/nfs/nfsservice/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/nfs/nfsservice/Makefile diff -u src/tests/fs/nfs/nfsservice/Makefile:1.5 src/tests/fs/nfs/nfsservice/Makefile:1.6 --- src/tests/fs/nfs/nfsservice/Makefile:1.5 Sat Dec 18 04:31:41 2010 +++ src/tests/fs/nfs/nfsservice/Makefile Tue Jul 19 03:30:46 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2010/12/18 04:31:41 joerg Exp $ +# $NetBSD: Makefile,v 1.6 2011/07/19 03:30:46 dholland Exp $ # NOMAN= 1 @@ -26,7 +26,7 @@ LDADD+= -lrumpnet -lrump -lrumpuser# base LDADD+= -lpthread -lutil -CPPFLAGS+= -DDEBUG -DMOUNT_NOMAIN -I${.CURDIR}/include -D_REENTRANT +CPPFLAGS+= -DDEBUG -DMOUNT_NOMAIN -D_REENTRANT CPPFLAGS+= -DRUMP_SYS_NETWORKING #CPPFLAGS+= -DSVC_RUN_DEBUG CPPFLAGS+= -I${.CURDIR}/../../common/nfsrpc
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: pooka Date: Fri Dec 31 17:59:24 UTC 2010 Modified Files: src/tests/fs/nfs/nfsservice: mountd.c Log Message: Don't broadcast unmntall with SIGTERM -- it just makes the atf default cleanup kill hang for a while. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/fs/nfs/nfsservice/mountd.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/fs/nfs/nfsservice/mountd.c diff -u src/tests/fs/nfs/nfsservice/mountd.c:1.4 src/tests/fs/nfs/nfsservice/mountd.c:1.5 --- src/tests/fs/nfs/nfsservice/mountd.c:1.4 Wed Jul 28 15:15:22 2010 +++ src/tests/fs/nfs/nfsservice/mountd.c Fri Dec 31 17:59:24 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mountd.c,v 1.4 2010/07/28 15:15:22 pooka Exp $ */ +/* $NetBSD: mountd.c,v 1.5 2010/12/31 17:59:24 pooka Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: mountd.c,v 1.4 2010/07/28 15:15:22 pooka Exp $"); +__RCSID("$NetBSD: mountd.c,v 1.5 2010/12/31 17:59:24 pooka Exp $"); #endif #endif/* not lint */ @@ -210,7 +210,9 @@ static int put_exlist __P((struct dirlist *, XDR *, struct dirlist *, int *)); static int scan_tree __P((struct dirlist *, struct sockaddr *)); static void send_umntall __P((int)); +#if 0 static int umntall_each __P((caddr_t, struct sockaddr_in *)); +#endif static int xdr_dir __P((XDR *, char *)); static int xdr_explist __P((XDR *, caddr_t)); static int xdr_fhs __P((XDR *, caddr_t)); @@ -2386,11 +2388,14 @@ send_umntall(n) int n; { +#if 0 (void)clnt_broadcast(RPCPROG_MNT, RPCMNT_VER1, RPCMNT_UMNTALL, xdr_void, NULL, xdr_void, NULL, (resultproc_t)umntall_each); +#endif exit(0); } +#if 0 static int umntall_each(resultsp, raddr) caddr_t resultsp; @@ -2398,6 +2403,7 @@ { return (1); } +#endif /* * Free up a group list.
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: joerg Date: Sat Dec 18 04:31:41 UTC 2010 Modified Files: src/tests/fs/nfs/nfsservice: Makefile Log Message: Don't force debug build. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/fs/nfs/nfsservice/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/nfs/nfsservice/Makefile diff -u src/tests/fs/nfs/nfsservice/Makefile:1.4 src/tests/fs/nfs/nfsservice/Makefile:1.5 --- src/tests/fs/nfs/nfsservice/Makefile:1.4 Tue Aug 3 17:24:45 2010 +++ src/tests/fs/nfs/nfsservice/Makefile Sat Dec 18 04:31:41 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2010/08/03 17:24:45 drochner Exp $ +# $NetBSD: Makefile,v 1.5 2010/12/18 04:31:41 joerg Exp $ # NOMAN= 1 @@ -30,7 +30,6 @@ CPPFLAGS+= -DRUMP_SYS_NETWORKING #CPPFLAGS+= -DSVC_RUN_DEBUG CPPFLAGS+= -I${.CURDIR}/../../common/nfsrpc -DBG=-g .PATH: ${.CURDIR}/rpcbind .include "rpcbind/Makefile.inc"
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: pooka Date: Thu Sep 2 15:13:56 UTC 2010 Modified Files: src/tests/fs/nfs/nfsservice: rumpnfsd.c Log Message: Actually use the imagename parameter. Also, fail with err instead of atf_tc_fail since we are not directly under the control of atf. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/fs/nfs/nfsservice/rumpnfsd.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/fs/nfs/nfsservice/rumpnfsd.c diff -u src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.4 src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.5 --- src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.4 Thu Aug 5 16:47:59 2010 +++ src/tests/fs/nfs/nfsservice/rumpnfsd.c Thu Sep 2 15:13:55 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpnfsd.c,v 1.4 2010/08/05 16:47:59 pooka Exp $ */ +/* $NetBSD: rumpnfsd.c,v 1.5 2010/09/02 15:13:55 pooka Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -93,10 +93,10 @@ rump_sys_mkdir("/var/db", 0777); if (ffs_fstest_newfs(NULL, &fsarg, - FSTEST_IMGNAME, FSTEST_IMGSIZE, NULL) != 0) - atf_tc_fail("newfs failed"); + imagename, FSTEST_IMGSIZE, NULL) != 0) + err(1, "newfs failed"); if (ffs_fstest_mount(NULL, fsarg, exportpath, 0) != 0) - atf_tc_fail("mount failed"); + err(1, "mount failed"); #if 0 /*
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: pooka Date: Thu Aug 5 16:47:59 UTC 2010 Modified Files: src/tests/fs/nfs/nfsservice: rumpnfsd.c Log Message: remove leftover debug printf To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/fs/nfs/nfsservice/rumpnfsd.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/fs/nfs/nfsservice/rumpnfsd.c diff -u src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.3 src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.4 --- src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.3 Fri Jul 30 21:10:44 2010 +++ src/tests/fs/nfs/nfsservice/rumpnfsd.c Thu Aug 5 16:47:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpnfsd.c,v 1.3 2010/07/30 21:10:44 pooka Exp $ */ +/* $NetBSD: rumpnfsd.c,v 1.4 2010/08/05 16:47:59 pooka Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -92,7 +92,6 @@ rump_sys_mkdir("/var/run", 0777); rump_sys_mkdir("/var/db", 0777); - fprintf(stderr, "imagename %s\n", imagename); if (ffs_fstest_newfs(NULL, &fsarg, FSTEST_IMGNAME, FSTEST_IMGSIZE, NULL) != 0) atf_tc_fail("newfs failed");
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: pooka Date: Fri Jul 30 21:10:44 UTC 2010 Modified Files: src/tests/fs/nfs/nfsservice: rumpnfsd.c Log Message: Revert macroization, as the default mountpath doesn't match the default export path. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/fs/nfs/nfsservice/rumpnfsd.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/fs/nfs/nfsservice/rumpnfsd.c diff -u src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.2 src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.3 --- src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.2 Fri Jul 30 16:15:06 2010 +++ src/tests/fs/nfs/nfsservice/rumpnfsd.c Fri Jul 30 21:10:44 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpnfsd.c,v 1.2 2010/07/30 16:15:06 pooka Exp $ */ +/* $NetBSD: rumpnfsd.c,v 1.3 2010/07/30 21:10:44 pooka Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -93,7 +93,11 @@ rump_sys_mkdir("/var/db", 0777); fprintf(stderr, "imagename %s\n", imagename); - FSTEST_CONSTRUCTOR(NULL, ffs, fsarg); + if (ffs_fstest_newfs(NULL, &fsarg, + FSTEST_IMGNAME, FSTEST_IMGSIZE, NULL) != 0) + atf_tc_fail("newfs failed"); + if (ffs_fstest_mount(NULL, fsarg, exportpath, 0) != 0) + atf_tc_fail("mount failed"); #if 0 /*
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: pooka Date: Wed Jul 28 15:15:23 UTC 2010 Modified Files: src/tests/fs/nfs/nfsservice: mountd.c Log Message: Defer definitely-nonreentrant signal handler to thread context. This protects from rump kernel reentry and makes things not crash && burn. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/fs/nfs/nfsservice/mountd.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/fs/nfs/nfsservice/mountd.c diff -u src/tests/fs/nfs/nfsservice/mountd.c:1.3 src/tests/fs/nfs/nfsservice/mountd.c:1.4 --- src/tests/fs/nfs/nfsservice/mountd.c:1.3 Tue Jul 27 14:04:47 2010 +++ src/tests/fs/nfs/nfsservice/mountd.c Wed Jul 28 15:15:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mountd.c,v 1.3 2010/07/27 14:04:47 macallan Exp $ */ +/* $NetBSD: mountd.c,v 1.4 2010/07/28 15:15:22 pooka Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: mountd.c,v 1.3 2010/07/27 14:04:47 macallan Exp $"); +__RCSID("$NetBSD: mountd.c,v 1.4 2010/07/28 15:15:22 pooka Exp $"); #endif #endif/* not lint */ @@ -75,6 +75,7 @@ #include #include #include +#include #include #include #include @@ -305,6 +306,31 @@ } /* + * Make sure mountd signal handler is executed from a thread context + * instead of the signal handler. This avoids the signal handler + * ruining our kernel context. + */ +static sem_t exportsem; +static void +signal_get_exportlist(int sig) +{ + + sem_post(&exportsem); +} + +static void * +exportlist_thread(void *arg) +{ + + for (;;) { + sem_wait(&exportsem); + get_exportlist(0); + } + + return NULL; +} + +/* * Mountd server for NFS mount protocol as described in: * NFS: Network File System Protocol Specification, RFC1094, Appendix A * The optional arguments are the exports file name @@ -323,6 +349,7 @@ int maxrec = RPC_MAXDATASIZE; in_port_t forcedport = 0; extern sem_t gensem; + pthread_t ptdummy; alloc_fdset(); @@ -361,6 +388,9 @@ argv += optind; #endif + sem_init(&exportsem, 0, 0); + pthread_create(&ptdummy, NULL, exportlist_thread, NULL); + grphead = NULL; exphead = NULL; mlhead = NULL; @@ -381,7 +411,7 @@ (void)signal(SIGINT, SIG_IGN); (void)signal(SIGQUIT, SIG_IGN); } - (void)signal(SIGHUP, get_exportlist); + (void)signal(SIGHUP, signal_get_exportlist); (void)signal(SIGTERM, send_umntall); pidfile(NULL);
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: pooka Date: Wed Jul 28 15:12:17 UTC 2010 Modified Files: src/tests/fs/nfs/nfsservice: nfsd.c Log Message: Make sure we are not executed in non-debug mode (which forks). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/fs/nfs/nfsservice/nfsd.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/fs/nfs/nfsservice/nfsd.c diff -u src/tests/fs/nfs/nfsservice/nfsd.c:1.2 src/tests/fs/nfs/nfsservice/nfsd.c:1.3 --- src/tests/fs/nfs/nfsservice/nfsd.c:1.2 Tue Jul 27 14:04:47 2010 +++ src/tests/fs/nfs/nfsservice/nfsd.c Wed Jul 28 15:12:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: nfsd.c,v 1.2 2010/07/27 14:04:47 macallan Exp $ */ +/* $NetBSD: nfsd.c,v 1.3 2010/07/28 15:12:17 pooka Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)nfsd.c 8.9 (Berkeley) 3/29/95"; #else -__RCSID("$NetBSD: nfsd.c,v 1.2 2010/07/27 14:04:47 macallan Exp $"); +__RCSID("$NetBSD: nfsd.c,v 1.3 2010/07/28 15:12:17 pooka Exp $"); #endif #endif /* not lint */ @@ -220,11 +220,16 @@ udpflag = 1; if (debug == 0) { + fprintf(stderr, "non-debug not supported here\n"); + exit(1); + +#ifdef not_the_debug_man daemon(0, 0); (void)signal(SIGHUP, SIG_IGN); (void)signal(SIGINT, SIG_IGN); (void)signal(SIGQUIT, SIG_IGN); (void)signal(SIGSYS, nonfs); +#endif } if (udpflag) {
CVS commit: src/tests/fs/nfs/nfsservice/rpcbind
Module Name:src Committed By: pooka Date: Wed Jul 28 15:11:30 UTC 2010 Modified Files: src/tests/fs/nfs/nfsservice/rpcbind: rpcbind.c Log Message: Don't ignore SIGHUP here since mountd uses it. The mountd signal handler is installed later, so technically this is unnecessary, but try to be complete. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/fs/nfs/nfsservice/rpcbind/rpcbind.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/fs/nfs/nfsservice/rpcbind/rpcbind.c diff -u src/tests/fs/nfs/nfsservice/rpcbind/rpcbind.c:1.1 src/tests/fs/nfs/nfsservice/rpcbind/rpcbind.c:1.2 --- src/tests/fs/nfs/nfsservice/rpcbind/rpcbind.c:1.1 Mon Jul 26 15:53:00 2010 +++ src/tests/fs/nfs/nfsservice/rpcbind/rpcbind.c Wed Jul 28 15:11:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rpcbind.c,v 1.1 2010/07/26 15:53:00 pooka Exp $ */ +/* $NetBSD: rpcbind.c,v 1.2 2010/07/28 15:11:30 pooka Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -173,7 +173,7 @@ (void) signal(SIGQUIT, terminate); /* ignore others that could get sent */ (void) signal(SIGPIPE, SIG_IGN); - (void) signal(SIGHUP, SIG_IGN); + //(void) signal(SIGHUP, SIG_IGN); used by mountd (void) signal(SIGUSR1, SIG_IGN); (void) signal(SIGUSR2, SIG_IGN); #ifdef WARMSTART
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: macallan Date: Tue Jul 27 14:04:47 UTC 2010 Modified Files: src/tests/fs/nfs/nfsservice: mountd.c nfsd.c Log Message: initialize a few variables to shut up compiler warnings To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/fs/nfs/nfsservice/mountd.c cvs rdiff -u -r1.1 -r1.2 src/tests/fs/nfs/nfsservice/nfsd.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/fs/nfs/nfsservice/mountd.c diff -u src/tests/fs/nfs/nfsservice/mountd.c:1.2 src/tests/fs/nfs/nfsservice/mountd.c:1.3 --- src/tests/fs/nfs/nfsservice/mountd.c:1.2 Mon Jul 26 19:24:35 2010 +++ src/tests/fs/nfs/nfsservice/mountd.c Tue Jul 27 14:04:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mountd.c,v 1.2 2010/07/26 19:24:35 pooka Exp $ */ +/* $NetBSD: mountd.c,v 1.3 2010/07/27 14:04:47 macallan Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: mountd.c,v 1.2 2010/07/26 19:24:35 pooka Exp $"); +__RCSID("$NetBSD: mountd.c,v 1.3 2010/07/27 14:04:47 macallan Exp $"); #endif #endif/* not lint */ @@ -477,7 +477,7 @@ struct sockaddr_in6 *sin6; struct sockaddr_in *sin; size_t fh_size; - int error; + int error = 0; (void)sigemptyset(&sighup_mask); (void)sigaddset(&sighup_mask, SIGHUP); @@ -874,7 +874,7 @@ struct exportlist **ep; struct statvfs *fsp; { - int error; + int error = 0; if (!check_dirpath(line, lineno, cp)) return 0; Index: src/tests/fs/nfs/nfsservice/nfsd.c diff -u src/tests/fs/nfs/nfsservice/nfsd.c:1.1 src/tests/fs/nfs/nfsservice/nfsd.c:1.2 --- src/tests/fs/nfs/nfsservice/nfsd.c:1.1 Mon Jul 26 15:53:00 2010 +++ src/tests/fs/nfs/nfsservice/nfsd.c Tue Jul 27 14:04:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: nfsd.c,v 1.1 2010/07/26 15:53:00 pooka Exp $ */ +/* $NetBSD: nfsd.c,v 1.2 2010/07/27 14:04:47 macallan Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)nfsd.c 8.9 (Berkeley) 3/29/95"; #else -__RCSID("$NetBSD: nfsd.c,v 1.1 2010/07/26 15:53:00 pooka Exp $"); +__RCSID("$NetBSD: nfsd.c,v 1.2 2010/07/27 14:04:47 macallan Exp $"); #endif #endif /* not lint */ @@ -153,7 +153,7 @@ int nfsdcnt, on = 1, reregister, sock, tcpflag, tcpsock; int tcp6sock, ip6flag; int tp4cnt, tp4flag, tpipcnt, tpipflag, udpflag, ecode, s; - int error; + int error = 0; #define DEFNFSDCNT 4 nfsdcnt = DEFNFSDCNT;
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: pooka Date: Mon Jul 26 19:24:35 UTC 2010 Modified Files: src/tests/fs/nfs/nfsservice: mountd.c Log Message: comment out lp64-offensive line (the syslog() calls are not used currently) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/fs/nfs/nfsservice/mountd.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/fs/nfs/nfsservice/mountd.c diff -u src/tests/fs/nfs/nfsservice/mountd.c:1.1 src/tests/fs/nfs/nfsservice/mountd.c:1.2 --- src/tests/fs/nfs/nfsservice/mountd.c:1.1 Mon Jul 26 15:53:00 2010 +++ src/tests/fs/nfs/nfsservice/mountd.c Mon Jul 26 19:24:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mountd.c,v 1.1 2010/07/26 15:53:00 pooka Exp $ */ +/* $NetBSD: mountd.c,v 1.2 2010/07/26 19:24:35 pooka Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: mountd.c,v 1.1 2010/07/26 15:53:00 pooka Exp $"); +__RCSID("$NetBSD: mountd.c,v 1.2 2010/07/26 19:24:35 pooka Exp $"); #endif #endif/* not lint */ @@ -570,7 +570,7 @@ error = 0; if (rump_sys_getfh(dpath, &fhr.fhr_fh, &fh_size) < 0) { bad = error; -syslog(LOG_ERR, "Can't get fh for %s %d %d", dpath, error, fh_size); +//syslog(LOG_ERR, "Can't get fh for %s %d %d", dpath, error, fh_size); if (!svc_sendreply(transp, xdr_long, (char *)&bad)) syslog(LOG_ERR, "Can't send reply");
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: pooka Date: Mon Jul 26 19:17:37 UTC 2010 Modified Files: src/tests/fs/nfs/nfsservice: Makefile Log Message: Install the exports file too so that the server can find it. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/fs/nfs/nfsservice/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/nfs/nfsservice/Makefile diff -u src/tests/fs/nfs/nfsservice/Makefile:1.2 src/tests/fs/nfs/nfsservice/Makefile:1.3 --- src/tests/fs/nfs/nfsservice/Makefile:1.2 Mon Jul 26 16:17:21 2010 +++ src/tests/fs/nfs/nfsservice/Makefile Mon Jul 26 19:17:37 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2010/07/26 16:17:21 pooka Exp $ +# $NetBSD: Makefile,v 1.3 2010/07/26 19:17:37 pooka Exp $ # NOMAN= 1 @@ -7,6 +7,10 @@ TESTSDIR= ${TESTSBASE}/fs/nfs/nfsservice ATFFILE= no +# install pre-generated /etc/exports +FILES+= exports +FILESDIR_exports= ${TESTSDIR} + VFSTESTDIR != cd ${.CURDIR}/../../common && ${PRINTOBJDIR} LDADD+= -L${VFSTESTDIR} -Wl,--whole-archive -lvfstest -Wl,--no-whole-archive
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: pooka Date: Mon Jul 26 16:17:21 UTC 2010 Modified Files: src/tests/fs/nfs/nfsservice: Makefile Log Message: fix TESTSDIR To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/fs/nfs/nfsservice/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/nfs/nfsservice/Makefile diff -u src/tests/fs/nfs/nfsservice/Makefile:1.1 src/tests/fs/nfs/nfsservice/Makefile:1.2 --- src/tests/fs/nfs/nfsservice/Makefile:1.1 Mon Jul 26 15:53:00 2010 +++ src/tests/fs/nfs/nfsservice/Makefile Mon Jul 26 16:17:21 2010 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2010/07/26 15:53:00 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2010/07/26 16:17:21 pooka Exp $ # NOMAN= 1 .include -TESTSDIR= ${TESTSBASE}/nfs/nfsservice +TESTSDIR= ${TESTSBASE}/fs/nfs/nfsservice ATFFILE= no VFSTESTDIR != cd ${.CURDIR}/../../common && ${PRINTOBJDIR}