Source-Changes-HG archive

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

[src/trunk]: src/tests/fs/vfs Add a kludge to prevent a test run from complet...



details:   https://anonhg.NetBSD.org/src/rev/7c937ea30c45
branches:  trunk
changeset: 762943:7c937ea30c45
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sun Mar 06 10:33:40 2011 +0000

description:
Add a kludge to prevent a test run from completely hanging.
Some analysis:

1) p2k_ffs test program opens a socketpair and forks off rump_ffs
2) after mounting the file system, test program decides it
   wants to skip the test and exits
3) somehow, the puffs event thread of rump_ffs stays in kqueue
   waiting for activity.  fstat+gdb suggests it's waiting for the
   now-orphaned socketpair (but I didn't fully verify.  is there
   an easy way to dump the state of a kqueue descriptor?).
4) test program is a zombie
5) atf-run waits forever

Note: this doesn't trigger always.

So, it seems there are at least two bugs: 1) test case doesn't
timeout 2) the kevent call in rump_ffs never returns even though
the sockerpair is orphaned

So, explicitly unmount the file system before skipping the test.
Obviously the above bugs needs to be properly fixed, since other
skipping test cases can unbeknowingly trigger the issue.

diffstat:

 tests/fs/vfs/t_full.c |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 993c1e178347 -r 7c937ea30c45 tests/fs/vfs/t_full.c
--- a/tests/fs/vfs/t_full.c     Sun Mar 06 10:32:47 2011 +0000
+++ b/tests/fs/vfs/t_full.c     Sun Mar 06 10:33:40 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_full.c,v 1.5 2011/01/07 11:41:54 pooka Exp $ */
+/*     $NetBSD: t_full.c,v 1.6 2011/03/06 10:33:40 pooka Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -57,6 +57,13 @@
        int fd, i = 0;
 
        if (FSTYPE_P2K_FFS(tc) || FSTYPE_PUFFS(tc) || FSTYPE_RUMPFS(tc)) {
+               /*
+                * XXX: explicitly unmount to prevent some race.
+                * temporary hack, fix properly
+                */
+               if (FSTYPE_P2K_FFS(tc)) {
+                       puffs_fstest_unmount(tc, mp, MNT_FORCE);
+               }
                atf_tc_skip("fs does not support explicit block allocation "
                    "(GOP_ALLOC)");
        }



Home | Main Index | Thread Index | Old Index