changeset 14230:a09aeba402dc

Enable memory leak tests on AIX. * tests/test-dprintf-posix2.c (main): Don't skip the test on AIX. * tests/test-fprintf-posix3.c (main): Likewise.
author Bruno Haible <bruno@clisp.org>
date Wed, 26 Jan 2011 13:36:48 +0100
parents 3a0a66848038
children bfe8b07257a3
files ChangeLog tests/test-dprintf-posix2.c tests/test-fprintf-posix3.c
diffstat 3 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-01-26  Bruno Haible  <bruno@clisp.org>
+
+	Enable memory leak tests on AIX.
+	* tests/test-dprintf-posix2.c (main): Don't skip the test on AIX.
+	* tests/test-fprintf-posix3.c (main): Likewise.
+
 2011-01-26  Bruno Haible  <bruno@clisp.org>
 
 	Tests for module 'get-rusage-data'.
--- a/tests/test-dprintf-posix2.c
+++ b/tests/test-dprintf-posix2.c
@@ -55,7 +55,7 @@
 
   /* Limit the amount of malloc()ed memory to MAX_ALLOC_TOTAL or less.  */
 
-  /* On BSD systems, malloc() is limited by RLIMIT_DATA.  */
+  /* On AIX systems, malloc() is limited by RLIMIT_DATA.  */
 #if HAVE_GETRLIMIT && HAVE_SETRLIMIT && defined RLIMIT_DATA
   {
     struct rlimit limit;
@@ -69,12 +69,14 @@
       }
   }
 #endif
-  /* On Linux systems, malloc() is limited by RLIMIT_AS.
+  /* On all systems except AIX and OpenBSD, malloc() is limited by RLIMIT_AS.
      On some systems, setrlimit of RLIMIT_AS doesn't work but get_rusage_as ()
      does.  Allow the address space size to grow by at most MAX_ALLOC_TOTAL.  */
   initial_rusage_as = get_rusage_as ();
+#if !defined _AIX
   if (initial_rusage_as == 0)
     return 77;
+#endif
 
   arg = atoi (argv[1]);
   if (arg == 0)
--- a/tests/test-fprintf-posix3.c
+++ b/tests/test-fprintf-posix3.c
@@ -54,7 +54,7 @@
 
   /* Limit the amount of malloc()ed memory to MAX_ALLOC_TOTAL or less.  */
 
-  /* On BSD systems, malloc() is limited by RLIMIT_DATA.  */
+  /* On AIX systems, malloc() is limited by RLIMIT_DATA.  */
 #if HAVE_GETRLIMIT && HAVE_SETRLIMIT && defined RLIMIT_DATA
   {
     struct rlimit limit;
@@ -68,12 +68,14 @@
       }
   }
 #endif
-  /* On Linux systems, malloc() is limited by RLIMIT_AS.
+  /* On all systems except AIX and OpenBSD, malloc() is limited by RLIMIT_AS.
      On some systems, setrlimit of RLIMIT_AS doesn't work but get_rusage_as ()
      does.  Allow the address space size to grow by at most MAX_ALLOC_TOTAL.  */
   initial_rusage_as = get_rusage_as ();
+#if !defined _AIX
   if (initial_rusage_as == 0)
     return 77;
+#endif
 
   arg = atoi (argv[1]);
   if (arg == 0)