Source-Changes-HG archive

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

[src/trunk]: src/tests/fs/vfs Fix the t_renamerace:lfs_renamerace_dirs test o...



details:   https://anonhg.NetBSD.org/src/rev/9f34c33a2b6a
branches:  trunk
changeset: 785510:9f34c33a2b6a
user:      jmmv <jmmv%NetBSD.org@localhost>
date:      Sun Mar 17 02:48:31 2013 +0000

description:
Fix the t_renamerace:lfs_renamerace_dirs test on fast machines.

This test was failing on my machine when run natively but not causing any
problems when run within qemu, and the failure was "mkdir: No space left
on device".

My understanding of the issue is that this test overflowed the temporary
disk image due to its high rate of file churn and the lfs_cleanerd not
being able to keep up.  Note that this test is capped by time, not number
of operations, so this is why the problem does not show up in a slow
emulated system.

To fix this, just bump the test file system image limit a little bit.
(I tried increasing the frequency at which lfs_cleanerd does its thing,
but it wasn't enough.)

diffstat:

 tests/fs/vfs/t_renamerace.c |  14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r 9853d6b708a5 -r 9f34c33a2b6a tests/fs/vfs/t_renamerace.c
--- a/tests/fs/vfs/t_renamerace.c       Sun Mar 17 02:23:31 2013 +0000
+++ b/tests/fs/vfs/t_renamerace.c       Sun Mar 17 02:48:31 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_renamerace.c,v 1.26 2012/05/09 00:22:26 riastradh Exp $      */
+/*     $NetBSD: t_renamerace.c,v 1.27 2013/03/17 02:48:31 jmmv Exp $   */
 
 /*
  * Modified for rump and atf from a program supplied
@@ -21,6 +21,18 @@
 #include <rump/rump.h>
 #include <rump/rump_syscalls.h>
 
+/* 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)
+
 #include "../common/h_fsmacros.h"
 #include "../../h_macros.h"
 



Home | Main Index | Thread Index | Old Index