about summary refs log tree commit diff
path: root/malloc
diff options
context:
space:
mode:
Diffstat (limited to 'malloc')
-rw-r--r--malloc/tst-calloc.c7
-rw-r--r--malloc/tst-malloc.c7
-rw-r--r--malloc/tst-mallocstate.c7
-rw-r--r--malloc/tst-mcheck.c7
-rw-r--r--malloc/tst-mtrace.c7
-rw-r--r--malloc/tst-obstack.c7
6 files changed, 30 insertions, 12 deletions
diff --git a/malloc/tst-calloc.c b/malloc/tst-calloc.c
index 51e6c25ebf..7ad51246a3 100644
--- a/malloc/tst-calloc.c
+++ b/malloc/tst-calloc.c
@@ -104,8 +104,8 @@ null_test (void)
 }
 
 
-int
-main (void)
+static int
+do_test (void)
 {
   /* We are allocating blocks with `calloc' and check whether every
      block is completely cleared.  We first try this for some fixed
@@ -123,3 +123,6 @@ main (void)
 
   return 0;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/malloc/tst-malloc.c b/malloc/tst-malloc.c
index a75ab1e3aa..2685315077 100644
--- a/malloc/tst-malloc.c
+++ b/malloc/tst-malloc.c
@@ -29,8 +29,8 @@ merror (const char *msg)
   printf ("Error: %s\n", msg);
 }
 
-int
-main (void)
+static int
+do_test (void)
 {
   void *p, *q;
   int save;
@@ -75,3 +75,6 @@ main (void)
 
   return errors != 0;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/malloc/tst-mallocstate.c b/malloc/tst-mallocstate.c
index 69c4500b85..539539ed03 100644
--- a/malloc/tst-mallocstate.c
+++ b/malloc/tst-mallocstate.c
@@ -29,8 +29,8 @@ merror (const char *msg)
   printf ("Error: %s\n", msg);
 }
 
-int
-main (void)
+static int
+do_test (void)
 {
   void *p1, *p2;
   void *save_state;
@@ -79,3 +79,6 @@ main (void)
  * c-basic-offset: 2
  * End:
  */
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/malloc/tst-mcheck.c b/malloc/tst-mcheck.c
index 478ca8cd24..bd9ab0efa7 100644
--- a/malloc/tst-mcheck.c
+++ b/malloc/tst-mcheck.c
@@ -29,8 +29,8 @@ merror (const char *msg)
   printf ("Error: %s\n", msg);
 }
 
-int
-main (void)
+static int
+do_test (void)
 {
   void *p, *q;
 
@@ -88,3 +88,6 @@ main (void)
 
   return errors != 0;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/malloc/tst-mtrace.c b/malloc/tst-mtrace.c
index 9b5151c7e0..b2c0c2c951 100644
--- a/malloc/tst-mtrace.c
+++ b/malloc/tst-mtrace.c
@@ -30,8 +30,8 @@ static void print (const void *node, VISIT value, int level);
 static FILE *fp;
 
 
-int
-main (void)
+static int
+do_test (void)
 {
   void *root = NULL;
   size_t linelen = 0;
@@ -100,3 +100,6 @@ print (const void *node, VISIT value, int level)
   if (value == postorder || value == leaf)
     fprintf (fp, "%3d: %s", ++cnt, *(const char **) node);
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/malloc/tst-obstack.c b/malloc/tst-obstack.c
index 769697f185..ee1385d0f7 100644
--- a/malloc/tst-obstack.c
+++ b/malloc/tst-obstack.c
@@ -25,8 +25,8 @@ verbose_free (void *buf)
   printf ("free (%p)\n", buf);
 }
 
-int
-main (void)
+static int
+do_test (void)
 {
   int result = 0;
   int align = 2;
@@ -62,3 +62,6 @@ main (void)
 
   return result;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"