about summary refs log tree commit diff
path: root/include/shlib-compat.h
diff options
context:
space:
mode:
authorSteve Ellcey <sellcey@caviumnetworks.com>2017-09-05 12:24:00 -0700
committerSteve Ellcey <sellcey@caviumnetworks.com>2017-09-05 12:24:00 -0700
commit05b38d64b1a3451d1fa10794b01dbc9bebe6a398 (patch)
tree5cc14d93f5b6c1e4d86bdd1cae495e6bbadcda34 /include/shlib-compat.h
parent99d6791899c43eb31b4d1896134501d814da7741 (diff)
downloadglibc-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 'include/shlib-compat.h')
-rw-r--r--include/shlib-compat.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/shlib-compat.h b/include/shlib-compat.h
index 41eb362f1d..d872afcbab 100644
--- a/include/shlib-compat.h
+++ b/include/shlib-compat.h
@@ -97,4 +97,14 @@
   compat_symbol (libc, name, aliasname, version);
 # endif
 
+/* The TEST_COMPAT macro acts just like the SHLIB_COMPAT macro except
+   that it does not check IS_IN.  It is used by tests that are testing
+   functionality that is only available in specific GLIBC versions.  */
+
+# define TEST_COMPAT(lib, introduced, obsoleted)			      \
+  _TEST_COMPAT (lib, introduced, obsoleted)
+# define _TEST_COMPAT(lib, introduced, obsoleted)			      \
+   (!(ABI_##lib##_##obsoleted - 0)					      \
+       || ((ABI_##lib##_##introduced - 0) < (ABI_##lib##_##obsoleted - 0)))
+
 #endif	/* shlib-compat.h */