This is the mail archive of the glibc-cvs@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]

[glibc] Correct TEST_COMPAT conditions in totalorder compat tests.


https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4745f4c1ca4f5c774e91436e952bde27b4d91e28

commit 4745f4c1ca4f5c774e91436e952bde27b4d91e28
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Aug 16 19:23:30 2019 +0000

    Correct TEST_COMPAT conditions in totalorder compat tests.
    
    I noticed that the totalorder compat tests mixed TEST_COMPAT
    conditions using COMPAT_VER (computed as the first symbol version for
    the symbol being tested) and those with a hardcoded GLIBC_2_25.
    
    COMPAT_VER is logically correct here, so this patch changes the tests
    to use it.  GLIBC_2_25 is harmless at present (even for _FloatN /
    _FloatNx functions added in later glibc versions).  However, if in
    future we support _Float16 functions in glibc for any existing
    configuration, the test using GLIBC_2_25 would get things wrong
    (wrongly think that there are compat versions of totalorderf16 and
    totalordermagf16 to test).
    
    (The actual definitions of the compat / versioned symbols for the
    totalorder functions make no attempt to deal with the possibility of
    libm function support for a new floating-point format, already
    supported for other architectures in glibc, being added in some glibc
    configuration in future, for which the only vaguely plausible case
    would be if some architecture gets _Float128 support it previously
    lacked; this is much like functions added after glibc 2.4 not
    generally attempting to deal with compat support for long double
    changing away from having the same format as double.)
    
    Tested for x86_64, and with build-many-glibcs.py.
    
    	* math/libm-test-compat_totalorder.inc (do_test)
    	[TEST_COMPAT (libm, GLIBC_2_25, GLIBC_2_31)]: Change condition to
    	[TEST_COMPAT (libm, COMPAT_VER, GLIBC_2_31)].
    	* math/libm-test-compat_totalordermag.inc (do_test)
    	[TEST_COMPAT (libm, GLIBC_2_25, GLIBC_2_31)]: Likewise.

Diff:
---
 ChangeLog                               | 8 ++++++++
 math/libm-test-compat_totalorder.inc    | 2 +-
 math/libm-test-compat_totalordermag.inc | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 47a3fa0..637c1c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-08-16  Joseph Myers  <joseph@codesourcery.com>
+
+	* math/libm-test-compat_totalorder.inc (do_test)
+	[TEST_COMPAT (libm, GLIBC_2_25, GLIBC_2_31)]: Change condition to
+	[TEST_COMPAT (libm, COMPAT_VER, GLIBC_2_31)].
+	* math/libm-test-compat_totalordermag.inc (do_test)
+	[TEST_COMPAT (libm, GLIBC_2_25, GLIBC_2_31)]: Likewise.
+
 2019-08-15  Florian Weimer  <fweimer@redhat.com>
 
 	nptl: Move pthread_attr_init implementation into libc.
diff --git a/math/libm-test-compat_totalorder.inc b/math/libm-test-compat_totalorder.inc
index 7ad8734..313e947 100644
--- a/math/libm-test-compat_totalorder.inc
+++ b/math/libm-test-compat_totalorder.inc
@@ -44,7 +44,7 @@ compat_totalorder_test (void)
 static void
 do_test (void)
 {
-#if TEST_COMPAT (libm, GLIBC_2_25, GLIBC_2_31)
+#if TEST_COMPAT (libm, COMPAT_VER, GLIBC_2_31)
   compat_totalorder_test ();
 #endif
 }
diff --git a/math/libm-test-compat_totalordermag.inc b/math/libm-test-compat_totalordermag.inc
index 1f82946..5cbe879 100644
--- a/math/libm-test-compat_totalordermag.inc
+++ b/math/libm-test-compat_totalordermag.inc
@@ -44,7 +44,7 @@ compat_totalordermag_test (void)
 static void
 do_test (void)
 {
-#if TEST_COMPAT (libm, GLIBC_2_25, GLIBC_2_31)
+#if TEST_COMPAT (libm, COMPAT_VER, GLIBC_2_31)
   compat_totalordermag_test ();
 #endif
 }


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