about summary refs log tree commit diff
path: root/io/test-lfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/test-lfs.c')
-rw-r--r--io/test-lfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/io/test-lfs.c b/io/test-lfs.c
index f73e67e0ef..16b2be9718 100644
--- a/io/test-lfs.c
+++ b/io/test-lfs.c
@@ -24,6 +24,7 @@
 #include <fcntl.h>
 #include <error.h>
 #include <errno.h>
+#include <sys/resource.h>
 
 /* Prototype for our test function.  */
 extern void do_prepare (int argc, char *argv[]);
@@ -70,6 +71,11 @@ do_prepare (int argc, char *argv[])
 
   if (fd == -1)
     error (EXIT_FAILURE, errno, "cannot open test file `%s'", name);
+
+  if (setrlimit64 (RLIMIT_FSIZE, &((const struct rlimit64)
+                                   { RLIM_INFINITY, RLIM_INFINITY }))
+      == -1)
+    error (EXIT_FAILURE, errno, "cannot reset file size limits");
 }
 
 int