This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: apply gnulib test suite to glibc


On Sat, Apr 21, 2012 at 3:20 PM, Bruno Haible <bruno@clisp.org> wrote:

> The procedure to run it is:
> ?1. On a development machine (a machine with GNU tools), checkout GNU gnulib
> ? ? <https://savannah.gnu.org/projects/gnulib>
> ? ? and run
> ? ? $ ./gnulib-tool --create-testdir --dir=/tmp/testdir \
> ? ? ? ? ? ? ? ? ? ? --with-tests --single-configure \
> ? ? ? ? ? ? ? ? ? ? `./posix-modules`

This failed with missing gperf. Perhaps gnulib-tool should check for
its dependencies?


> ?2. Copy the /tmp/testdir directory to the target machine, if it is a
> ? ? different machine.

This step appears to be using installed glibc with messages like:
...
checking for library containing gethostbyname... (cached) none required
checking for gethostbyname... (cached) yes
checking whether hypot works according to ISO C 99 with IEC 60559... yes
checking for hypotf... yes
...

> ?3. In /tmp/testdir, run
> ? ? $ ./configure CPPFLAGS="-Wall"

This also uses installed glibc.
I could probably figure out how to make it use newly-built glibc.


> ? ? $ make
> ? ? Verify that Gnulib has built no replacement/workaround code
> ? ? (gllib/*.o files) - if so, this indicates problems in the libc.

Using installed Ubuntu EGLIBC 2.11.1-0ubuntu7.10, I get 85 *.o files
there. Here is a sample:

gllib/allocator.o
gllib/areadlinkat.o
gllib/areadlink.o
gllib/asnprintf.o
gllib/basename-lgpl.o
gllib/careadlinkat.o
gllib/c-ctype.o
gllib/chdir-long.o
gllib/cloexec.o
gllib/c-strcasecmp.o


While it's conceivable that there are 85 bugs discovered so far, how
do I figure out what's wrong with e.g. glibc's strerror ?


> ? ? $ make check

FWIW, this one produced:

All 461 tests passed
(26 tests were not run)


> What do you think of it? Could it become part of the pre-release testing
> of Glibc to apply this test suite?

It sounds good, but I think there would need to be a way to tell
what's broken at step 3, and also support for testing non-installed
glibc.

As-is, I don't think it's very practical to test glibc that way.


Thanks,
-- 
Paul Pluzhnikov


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]