This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Reduce the size of bigcore.exp
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Sat, 20 Jan 2007 13:36:09 -0500
- Subject: [commit] Reduce the size of bigcore.exp
As Eli, Mark, and I discussed on the gdb list a week ago. For 32-bit
systems it will still try a core file of the maximum size; for 64-bit
systems I arbitrarily throttled it at 16GB. This lets us still test
that >32bit core files work.
Tested both i686-linux and x86_64-linux and committed.
--
Daniel Jacobowitz
CodeSourcery
2007-01-20 Daniel Jacobowitz <dan@codesourcery.com>
* gdb.base/bigcore.c (RLIMIT_CAP): Define.
(maximize_rlimit): Reduce limits on 64-bit systems.
Index: testsuite/gdb.base/bigcore.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/bigcore.c,v
retrieving revision 1.7
diff -u -p -r1.7 bigcore.c
--- testsuite/gdb.base/bigcore.c 9 Jan 2007 17:59:09 -0000 1.7
+++ testsuite/gdb.base/bigcore.c 20 Jan 2007 18:28:16 -0000
@@ -31,6 +31,13 @@
#include <stdlib.h>
#include <unistd.h>
+/* This test was written for >2GB core files on 32-bit systems. On
+ current 64-bit systems, generating a >4EB (2 ** 63) core file is
+ not practical, and getting as close as we can takes a lot of
+ useless CPU time. So limit ourselves to a bit bigger than
+ 32-bit, which is still a useful test. */
+#define RLIMIT_CAP (1ULL << 34)
+
/* Print routines:
The following are so that printf et.al. can be avoided. Those
@@ -110,6 +117,8 @@ maximize_rlimit (int resource, const cha
print_rlimit (resource);
getrlimit (resource, &rl);
rl.rlim_cur = rl.rlim_max;
+ if (sizeof (rl.rlim_cur) >= sizeof (RLIMIT_CAP))
+ rl.rlim_cur = (rlim_t) RLIMIT_CAP;
setrlimit (resource, &rl);
print_string (" -> ");
print_rlimit (resource);