Module Name: src
Committed By: njoly
Date: Sun Mar 16 10:28:03 UTC 2014
Modified Files:
src/tests/fs/common: fstest_rumpfs.c
Log Message:
Retrict rumpfs to the provided size, like other filesystems.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/fs/common/fstest_rumpfs.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/common/fstest_rumpfs.c
diff -u src/tests/fs/common/fstest_rumpfs.c:1.1 src/tests/fs/common/fstest_rumpfs.c:1.2
--- src/tests/fs/common/fstest_rumpfs.c:1.1 Thu Nov 11 17:39:29 2010
+++ src/tests/fs/common/fstest_rumpfs.c Sun Mar 16 10:28:03 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: fstest_rumpfs.c,v 1.1 2010/11/11 17:39:29 pooka Exp $ */
+/* $NetBSD: fstest_rumpfs.c,v 1.2 2014/03/16 10:28:03 njoly Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -47,6 +47,13 @@ int
rumpfs_fstest_newfs(const atf_tc_t *tc, void **buf, const char *image,
off_t size, void *fspriv)
{
+ char tmp[64];
+ int res;
+
+ snprintf(tmp, sizeof(tmp), "%"PRId64, size);
+ res = setenv("RUMP_MEMLIMIT", tmp, 0);
+ if (res == -1)
+ return res;
return rump_init();
}