bug-gnulib
[Top][All Lists]
Advanced

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

Re: [bug-idutils] [PATCH 1/9] tests: disable gnulib's get-rusage-as test


From: Jim Meyering
Subject: Re: [bug-idutils] [PATCH 1/9] tests: disable gnulib's get-rusage-as test
Date: Fri, 03 Feb 2012 09:17:52 +0100

Claudio Fontana wrote:
> On Thu, Feb 2, 2012 at 8:38 AM, Jim Meyering <address@hidden> wrote:
>> From: Jim Meyering <address@hidden>
>>
>> * bootstrap.conf (avoided_gnulib_modules): Disable the get-rusage-as
>> test: it's failing.
>
> Hi Jim,
>
> why are you disabling this test?
> When I was maintaining idutils some years back all tests worked (one
> did not and it was a bug that had to be fixed).
>
> Is this a new test? If not, maybe the test is just doing its job of
> reporting a real problem, which should be pursued and fixed?

Hi Claudio,

That test fails on Fedora 16 and I didn't have time to investigate.
Here are details, and I'm Cc'ing bug-gnulib:

    $ ./test-get-rusage-as
    ../../gltests/test-get-rusage-as.c:56: assertion failed
    zsh: abort (core dumped)  ./test-get-rusage-as

I've marked line 56 below.
Each of the three variables value1, value2, value3 has the value 4218880.
Raising the 0x281237 to a value greater than 4218880 does not help.

int
main ()
{
  uintptr_t value1, value2, value3;

  value1 = get_rusage_as ();

  malloc (0x88);

  value2 = get_rusage_as ();

  malloc (0x281237);

  value3 = get_rusage_as ();

  if (value1 == 0 && value2 == 0 && value3 == 0)
    {
      fprintf (stderr, "Skipping test: no way to determine address space 
size\n");
      return 77;
    }
  else
    {
      /* The address space size is positive.  */
      ASSERT (value1 > 0);

      /* Allocating memory should not decrease the address space size.  */
      ASSERT (value2 >= value1);
      ASSERT (value3 >= value2);

      /* Allocating 2.5 MB of memory should increase the address space size.  */
***   ASSERT (value3 > value1);

      return 0;
    }
}



reply via email to

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