diff options
author | Steve Ellcey <sellcey@caviumnetworks.com> | 2017-09-05 12:24:00 -0700 |
---|---|---|
committer | Steve Ellcey <sellcey@caviumnetworks.com> | 2017-09-05 12:24:00 -0700 |
commit | 05b38d64b1a3451d1fa10794b01dbc9bebe6a398 (patch) | |
tree | 5cc14d93f5b6c1e4d86bdd1cae495e6bbadcda34 /math | |
parent | 99d6791899c43eb31b4d1896134501d814da7741 (diff) | |
download | glibc-05b38d64b1a3451d1fa10794b01dbc9bebe6a398.tar.gz glibc-05b38d64b1a3451d1fa10794b01dbc9bebe6a398.tar.xz glibc-05b38d64b1a3451d1fa10794b01dbc9bebe6a398.zip |
Fix tests that are testing obsoleted functionality
* 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.
Diffstat (limited to 'math')
-rw-r--r-- | math/test-matherr-2.c | 14 | ||||
-rw-r--r-- | math/test-matherr.c | 14 |
2 files changed, 24 insertions, 4 deletions
diff --git a/math/test-matherr-2.c b/math/test-matherr-2.c index c2fc5e63c8..7b5f49cd3d 100644 --- a/math/test-matherr-2.c +++ b/math/test-matherr-2.c @@ -22,8 +22,11 @@ #include <math-svid-compat.h> #include <shlib-compat.h> -#undef matherr -#undef _LIB_VERSION + +#if TEST_COMPAT (libm, GLIBC_2_0, GLIBC_2_27) + +# undef matherr +# undef _LIB_VERSION compat_symbol_reference (libm, matherr, matherr, GLIBC_2_0); compat_symbol_reference (libm, _LIB_VERSION, _LIB_VERSION, GLIBC_2_0); @@ -45,5 +48,12 @@ do_test (void) acos (2.0); return fail; } +#else +static int +do_test (void) +{ + return 77; +} +#endif #include <support/test-driver.c> diff --git a/math/test-matherr.c b/math/test-matherr.c index 34856f1ffb..23521c0d89 100644 --- a/math/test-matherr.c +++ b/math/test-matherr.c @@ -22,8 +22,11 @@ #include <math-svid-compat.h> #include <shlib-compat.h> -#undef matherr -#undef _LIB_VERSION + +#if TEST_COMPAT (libm, GLIBC_2_0, GLIBC_2_27) + +# undef matherr +# undef _LIB_VERSION compat_symbol_reference (libm, matherr, matherr, GLIBC_2_0); compat_symbol_reference (libm, _LIB_VERSION, _LIB_VERSION, GLIBC_2_0); @@ -44,5 +47,12 @@ do_test (void) acos (2.0); return fail; } +#else +static int +do_test (void) +{ + return 77; +} +#endif #include <support/test-driver.c> |