This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.25-127-g0fbca26
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 16 Mar 2017 17:51:47 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.25-127-g0fbca26
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 0fbca26c39e4735e7285092c98c75500550d84f4 (commit)
from 598fe6d9f4c860fe084abb769510a4636fe8f293 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0fbca26c39e4735e7285092c98c75500550d84f4
commit 0fbca26c39e4735e7285092c98c75500550d84f4
Author: Joseph Myers <joseph@codesourcery.com>
Date: Thu Mar 16 17:51:23 2017 +0000
conformtest: Make more tests into compilation tests.
The conformtest header tests test some things through compilation
tests and others through execution tests. This patch makes more of
the tests into compilation tests, using _Static_assert (note: for
float.h tests on floating-point values this is depending on a GNU
extension, that those assertions are allowed in the absence of
-pedantic although they aren't strictly integer constant expressions).
The remaining execution tests are for values of things listed as
"symbol" (in fact no such things have a value expectation listed) and
for values of macros defined as string constants (three such values
listed in total).
This is intended as preparation for enabling the vast bulk of the
tests to run for cross compilation. (Even the few remaining execution
tests ought in principle to run for cross compilation when a test
wrapper is defined, but that's more complicated. The existing
execution tests for native builds in fact are linked and run with an
existing installed libc that's required to exist to link against,
rather than with the newly built libc; only the new headers are used.)
Tested for x86_64.
* conform/conformtest.pl: Use compilation instead of execution
tests for testing values of constants and usability in #if.
diff --git a/ChangeLog b/ChangeLog
index 69d31cb..bcfa26e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-03-16 Joseph Myers <joseph@codesourcery.com>
+
+ * conform/conformtest.pl: Use compilation instead of execution
+ tests for testing values of constants and usability in #if.
+
2017-03-16 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
* math/auto-libm-test-in: Mark some catan and catanh as
diff --git a/conform/conformtest.pl b/conform/conformtest.pl
index fedcbc3..54b38f8 100644
--- a/conform/conformtest.pl
+++ b/conform/conformtest.pl
@@ -472,11 +472,11 @@ while ($#headers >= 0) {
}
print TESTFILE "# define conformtest_value ($s)\n";
print TESTFILE "#endif\n";
- print TESTFILE "int main (void) { return !((($symbol < 0) == conformtest_negative) && ($symbol == conformtest_value)); }\n";
+ print TESTFILE "_Static_assert ((($symbol < 0) == conformtest_negative) && ($symbol == conformtest_value), \"value match inside and outside #if\");\n";
close (TESTFILE);
- runtest ($fnamebase, "Testing for #if usability of symbol $symbol",
- "Symbol \"$symbol\" not usable in #if.", $res, $xfail);
+ compiletest ($fnamebase, "Testing for #if usability of symbol $symbol",
+ "Symbol \"$symbol\" not usable in #if.", $res, 0, $xfail);
}
if (defined ($type) && ($res == 0 || !$optional)) {
@@ -503,13 +503,12 @@ while ($#headers >= 0) {
open (TESTFILE, ">$fnamebase.c");
print TESTFILE "$prepend";
print TESTFILE "#include <$h>\n";
- # Negate the value since 0 means ok
- print TESTFILE "int main (void) { return !($symbol $op $value); }\n";
+ print TESTFILE "_Static_assert ($symbol $op $value, \"value constraint\");\n";
close (TESTFILE);
- $res = runtest ($fnamebase, "Testing for value of symbol $symbol",
- "Symbol \"$symbol\" has not the right value.", $res,
- $xfail);
+ $res = compiletest ($fnamebase, "Testing for value of symbol $symbol",
+ "Symbol \"$symbol\" has not the right value.",
+ $res, 0, $xfail);
}
} elsif (/^symbol *([a-zA-Z0-9_]*) *([A-Za-z0-9_-]*)?/) {
my($symbol) = $1;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
conform/conformtest.pl | 15 +++++++--------
2 files changed, 12 insertions(+), 8 deletions(-)
hooks/post-receive
--
GNU C Library master sources