[PATCH] Fix tests that are testing obsoleted functionality

Steve Ellcey sellcey@cavium.com
Thu Aug 24 22:55:00 GMT 2017


Here is a patch to fix three tests; malloc/tst-mallocstate.c,
math/test-matherr.c, and math/test-matherr-2.c.  These tests
test functionality that is no longer in the latest GLIBC but
should still exist for programs linked with an older GLIBC.
If you have a new ABI (like ILP32 aarch64) which never existed
in the older form, these tests will fail. tst-mallocstate.c
and test-matherr.c give link errors and test-matherr-2.c
compiles and links but exits with status 1.

See https://sourceware.org/ml/libc-alpha/2017-08/msg01127.html
and https://sourceware.org/ml/libc-alpha/2016-12/msg00527.html
for some more discussions on this problem.

This patch fixes the tests so that they will compile and
link and, if on a platform that does not support the functionality
being tested return an UNSUPPORTED return code.  They continue
to run and pass as before on other platforms.  To do this
I created a new macro TEST_COMPAT, similar to SHLIB_COMPAT
that can be used to check for the abi versions available
when building the test.

Tested on aarch64 with LP64 (where they run) and ILP32 (where
they return unsupported).  While I tested this with the aarch64
ILP32 ABI, they changes are not specific to any ABI so I would
like to check them in now and not wait for aarch64 ILP32 or some
other new ABI get checked in first.

Steve Ellcey
sellcey@cavium.com


2017-08-24  Steve Ellcey  <sellcey@cavium.com>

	* include/shlib-compat.h (TEST_COMPAT): New Macro.
	* malloc/tst-mallocstate.c: Convert from test-skeleton
	to test-driver.  Ifdef code using TEST_COMPAT macro.
	* math/test-matherr-2.c: Ifdef test using TEST_COMPAT macro.
	* math/test-matherr.c: Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glibc-test.patch
Type: text/x-patch
Size: 6706 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170824/af33ab7d/attachment.bin>


More information about the Libc-alpha mailing list