From b0e34f71e6de8859edc13599caaff3ef5f8810ad Mon Sep 17 00:00:00 2001 From: njn Date: Wed, 25 Feb 2009 04:34:44 +0000 Subject: Remove toobig-allocs.c -- it was unreliable and didn't test any functionality of note. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9261 a5019735-40e9-0310-863c-91ae7b9d1cf9 --- massif/tests/Makefile.am | 1 - massif/tests/toobig-allocs.stderr.exp | 4 ---- massif/tests/toobig-allocs.vgtest | 3 --- memcheck/tests/Makefile.am | 1 - memcheck/tests/toobig-allocs.stderr.exp | 2 -- memcheck/tests/toobig-allocs.vgtest | 2 -- tests/Makefile.am | 1 - tests/toobig-allocs.c | 27 --------------------------- 8 files changed, 41 deletions(-) delete mode 100644 massif/tests/toobig-allocs.stderr.exp delete mode 100644 massif/tests/toobig-allocs.vgtest delete mode 100644 memcheck/tests/toobig-allocs.stderr.exp delete mode 100644 memcheck/tests/toobig-allocs.vgtest delete mode 100644 tests/toobig-allocs.c diff --git a/massif/tests/Makefile.am b/massif/tests/Makefile.am index ea0d2c9fc..7b0f9445d 100644 --- a/massif/tests/Makefile.am +++ b/massif/tests/Makefile.am @@ -36,7 +36,6 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ thresholds_5_0.post.exp thresholds_5_0.stderr.exp thresholds_5_0.vgtest \ thresholds_5_10.post.exp thresholds_5_10.stderr.exp thresholds_5_10.vgtest \ thresholds_10_10.post.exp thresholds_10_10.stderr.exp thresholds_10_10.vgtest \ - toobig-allocs.stderr.exp toobig-allocs.vgtest \ zero1.post.exp zero1.stderr.exp zero1.vgtest \ zero2.post.exp zero2.stderr.exp zero2.vgtest diff --git a/massif/tests/toobig-allocs.stderr.exp b/massif/tests/toobig-allocs.stderr.exp deleted file mode 100644 index 28c2b9ee0..000000000 --- a/massif/tests/toobig-allocs.stderr.exp +++ /dev/null @@ -1,4 +0,0 @@ - -Attempting too-big malloc()... -Attempting too-big mmap()... - diff --git a/massif/tests/toobig-allocs.vgtest b/massif/tests/toobig-allocs.vgtest deleted file mode 100644 index 76f4d6357..000000000 --- a/massif/tests/toobig-allocs.vgtest +++ /dev/null @@ -1,3 +0,0 @@ -prog: ../../tests/toobig-allocs -vgopts: --massif-out-file=massif.out -cleanup: rm massif.out diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 8461d9ee9..d88c071c5 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -149,7 +149,6 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ supp2.stderr.exp supp2.vgtest \ supp.supp \ suppfree.stderr.exp suppfree.vgtest \ - toobig-allocs.stderr.exp toobig-allocs.vgtest \ trivialleak.stderr.exp trivialleak.vgtest \ unit_libcbase.stderr.exp unit_libcbase.stdout.exp unit_libcbase.vgtest \ unit_oset.stderr.exp unit_oset.stdout.exp unit_oset.vgtest \ diff --git a/memcheck/tests/toobig-allocs.stderr.exp b/memcheck/tests/toobig-allocs.stderr.exp deleted file mode 100644 index 17d25e4ae..000000000 --- a/memcheck/tests/toobig-allocs.stderr.exp +++ /dev/null @@ -1,2 +0,0 @@ -Attempting too-big malloc()... -Attempting too-big mmap()... diff --git a/memcheck/tests/toobig-allocs.vgtest b/memcheck/tests/toobig-allocs.vgtest deleted file mode 100644 index 15639a05c..000000000 --- a/memcheck/tests/toobig-allocs.vgtest +++ /dev/null @@ -1,2 +0,0 @@ -prog: ../../tests/toobig-allocs -vgopts: -q diff --git a/tests/Makefile.am b/tests/Makefile.am index 43d7d88a8..70fefaf12 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -16,7 +16,6 @@ EXTRA_DIST = $(noinst_SCRIPTS) check_PROGRAMS = \ arch_test \ - toobig-allocs \ true AM_CFLAGS += $(AM_FLAG_M3264_PRI) diff --git a/tests/toobig-allocs.c b/tests/toobig-allocs.c deleted file mode 100644 index 1b1d12f0e..000000000 --- a/tests/toobig-allocs.c +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include -#include - -int main(void) -{ - void *p; - - // This is the biggest word-sized signed number. We use a signed number, - // even though malloc takes an unsigned SizeT, because the "silly malloc - // arg" checking done by memcheck treats the arg like a signed int in - // order to detect the passing of a silly size arg like -1. - unsigned long size = (~(0UL)) >> 1; - - fprintf(stderr, "Attempting too-big malloc()...\n"); - p = malloc(size); // way too big! - if (p) - fprintf(stderr, "huge malloc() succeeded??\n"); - - fprintf(stderr, "Attempting too-big mmap()...\n"); - p = mmap( 0, size, PROT_READ|PROT_WRITE|PROT_EXEC, - MAP_PRIVATE|MAP_ANON, -1, 0 ); - if (-1 != (long)p) - fprintf(stderr, "huge mmap() succeeded??\n"); - - return 0; -} -- cgit v1.2.3