bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test-fprintf-posix2.sh & test-fprintf-posix3.sh skipped/fail


From: Bruno Haible
Subject: Re: test-fprintf-posix2.sh & test-fprintf-posix3.sh skipped/fail
Date: Sat, 10 Apr 2010 10:28:44 +0200
User-agent: KMail/1.9.9

Hi Jarno,

 Rajahalme wrote:
> OS: Darwin 10.3.0
> 
> While make check I get:
> 
> Skipping test: getrlimit and setrlimit don't work
> SKIP: test-fprintf-posix2.sh
> Skipping test: getrlimit and setrlimit don't work
> SKIP: test-fprintf-posix3.sh
> 
> with set -x:
> 
> tests$ ./test-fprintf-posix2.sh
> + malloc_result=78

> + test 78 = 78
> + echo 'Skipping test: getrlimit and setrlimit don'\''t work'
> Skipping test: getrlimit and setrlimit don't work
> + exit 77

This is normal: getrlimit and setrlimit really appear to not work
on MacOS X, regarding the amount of malloc() that a process can do.

> test-fprintf-posix2.c returns 78 when called with argument 0, after a
> successful malloc and memset. The script would be successful only if
> malloc fails here (this from test-fprintf-posix2.c):  
> 
>   arg = atoi (argv[1]);
>   switch (arg)
>     {
>     case 0:
>       {
>         void *memory = malloc (5000000);
>         if (memory == NULL)
>           return 1;
>         memset (memory, 17, 5000000);
>         return 78;
>       }

The expected behaviour of that test program is not that malloc fails
(although it may do so on AIX systems, which have a "commit memory
on malloc" policy), but that it gets a fatal signal during the memset
call, as it transforms shared memory pages to process-private memory
pages (through copy-on-write).

For testing, I added also a limitation of RLIMIT_RSS to 5000000,
and bumped the amound of malloc and memset to 6000000. The test program
did not stop either (on MacOS X 10.5).

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]