/* Bump the size of the test file system image to a larger value.
*
* These tests cause a lot of churn in the file system by creating and
* deleting files/directories in quick succession. A faster CPU will cause
* more churn because the tests are capped by a run time period in seconds,
* not number of operations.
*
* This is all fine except for LFS, because the lfs_cleanerd cannot keep up
* with the churn and thus causes the test to fail on fast machines. Hence
* the reason for this hack. */
#define FSTEST_IMGSIZE (50000 * 512)
/*
* Sysvbfs supports only 8 inodes so this test would exhaust
* the inode table and creating files would fail with ENOSPC.
*/
if (FSTYPE_SYSVBFS(tc))
atf_tc_skip("filesystem has not enough inodes");
if (FSTYPE_RUMPFS(tc))
atf_tc_skip("rename not supported by file system");
if (FSTYPE_UDF(tc))
atf_tc_expect_fail("PR kern/53865");
if (FSTYPE_SYSVBFS(tc))
atf_tc_skip("directories not supported by file system");
if (FSTYPE_RUMPFS(tc))
atf_tc_skip("rename not supported by file system");
if (FSTYPE_UDF(tc))
atf_tc_expect_fail("PR kern/53865");
if (FSTYPE_SYSVBFS(tc))
atf_tc_skip("directories not supported by file system");
if (FSTYPE_RUMPFS(tc))
atf_tc_skip("rename not supported by file system");
if (FSTYPE_P2K_FFS(tc))
atf_tc_expect_fail("assertion \"vp->v_size == ip->i_size\" failed");
if (FSTYPE_PUFFS(tc))
atf_tc_expect_fail("assertion \"dfd\" failed");
if (FSTYPE_NFS(tc))
atf_tc_expect_fail("mkdir fails with ESTALE");
if (FSTYPE_UDF(tc))
atf_tc_expect_fail("sometimes fails with ENOSPC, PR kern/56253");
if (FSTYPE_UDF(tc))
atf_tc_fail("PR kern/56253 did not trigger this time");
if (FSTYPE_P2K_FFS(tc))
atf_tc_fail("did not fail this time");
if (FSTYPE_PUFFS(tc))
atf_tc_fail("did not fail this time");
if (FSTYPE_NFS(tc))
atf_tc_fail("did not fail this time");
}
ATF_TC_FSAPPLY(renamerace, "rename(2) race with file unlinked mid-operation");
ATF_TC_FSAPPLY(renamerace_dirs, "rename(2) race with directories");
ATF_TC_FSAPPLY(renamerace_cycle, "rename(2) race making directory cycles");