Module Name:    src
Committed By:   pooka
Date:           Sun Mar  6 16:00:17 UTC 2011

Modified Files:
        src/tests/fs/vfs: t_renamerace.c

Log Message:
Add a race catcher for p2k_ffs renamerace -- it seems like the
problem doesn't trigger always especially in a qemu env (but triggers
100% of the time on my desktop).


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/tests/fs/vfs/t_renamerace.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/vfs/t_renamerace.c
diff -u src/tests/fs/vfs/t_renamerace.c:1.20 src/tests/fs/vfs/t_renamerace.c:1.21
--- src/tests/fs/vfs/t_renamerace.c:1.20	Thu Mar  3 11:01:27 2011
+++ src/tests/fs/vfs/t_renamerace.c	Sun Mar  6 16:00:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_renamerace.c,v 1.20 2011/03/03 11:01:27 pooka Exp $	*/
+/*	$NetBSD: t_renamerace.c,v 1.21 2011/03/06 16:00:16 pooka Exp $	*/
 
 /*
  * Modified for rump and atf from a program supplied
@@ -158,6 +158,12 @@
 	if (FSTYPE_FFS(tc) || FSTYPE_EXT2FS(tc) || FSTYPE_LFS(tc) ||
 	    FSTYPE_MSDOS(tc) || FSTYPE_FFSLOG(tc))
 		abort();
+
+	if (FSTYPE_P2K_FFS(tc)) {
+		/* XXX: some races may hang test run if we don't unmount */
+		puffs_fstest_unmount(tc, mp, MNT_FORCE);
+		atf_tc_fail("problem did not trigger");
+	}
 }
 
 ATF_TC_FSAPPLY(renamerace, "rename(2) race with file unlinked mid-operation");

Reply via email to