Source-Changes-HG archive

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

[src/trunk]: src/tests/fs/common Wait for child (rumpnfsd) to die before decl...



details:   https://anonhg.NetBSD.org/src/rev/35564f841b8d
branches:  trunk
changeset: 756726:35564f841b8d
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Jul 30 10:23:26 2010 +0000

description:
Wait for child (rumpnfsd) to die before declaring unmount successful.
(yes, should be in delfs, but delfs doesn't work due to the cleanup hassle)

diffstat:

 tests/fs/common/fstest_nfs.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r fe4137a01552 -r 35564f841b8d tests/fs/common/fstest_nfs.c
--- a/tests/fs/common/fstest_nfs.c      Fri Jul 30 10:20:20 2010 +0000
+++ b/tests/fs/common/fstest_nfs.c      Fri Jul 30 10:23:26 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fstest_nfs.c,v 1.1 2010/07/29 14:15:47 pooka Exp $     */
+/*     $NetBSD: fstest_nfs.c,v 1.2 2010/07/30 10:23:26 pooka Exp $     */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -196,6 +196,7 @@
 nfs_fstest_unmount(const atf_tc_t *tc, const char *path, int flags)
 {
        struct nfstestargs *args = theargs;
+       int status;
 
        if (rump_sys_unmount(path, flags) == -1) {
                return errno;
@@ -212,9 +213,11 @@
         * to send some unmount RPCs, leading to sticky situations.
         */
        kill(args->ta_childpid, SIGKILL);
+       wait(&status);
 
        /* remove ethernet bus */
-       unlink(args->ta_ethername);
+       if (unlink(args->ta_ethername) == -1)
+               atf_tc_fail_errno("unlink ethername");
 
        return 0;
 }



Home | Main Index | Thread Index | Old Index