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).
This commit is contained in:
pooka 2011-03-06 16:00:16 +00:00
parent e1901f8e74
commit 951e801a6b
1 changed files with 7 additions and 1 deletions

View File

@ -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 @@ renamerace_dirs(const atf_tc_t *tc, const char *mp)
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");