GNU C Library master sources branch master updated. glibc-2.28.9000-276-g968ed53

gftg@sourceware.org gftg@sourceware.org
Fri Nov 9 18:26:00 GMT 2018


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  968ed5301d0921e6ea33dafd60e4a4208be6a6f4 (commit)
      from  91faaa93a5bb1da37f24c82269d830dcd7f2596f (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=968ed5301d0921e6ea33dafd60e4a4208be6a6f4

commit 968ed5301d0921e6ea33dafd60e4a4208be6a6f4
Author: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
Date:   Thu Nov 1 15:02:47 2018 -0300

    Convert tst-efgcvt to the new test framework
    
    The function do_test, in tst-efgcvt.c, increments an error counter for
    each error that it finds, then returns it to the test framework.
    However, the test framework does not expect an error count as return,
    but zero for a passing test, one for a failing test, or 77 for an
    unsupported test.  Alternatively, the framework provides the function
    support_record_failure that records errors, which then allows the test
    program to return zero unconditionally.
    
    This patch removes the error counter, replaces each increment of the
    counter with a call to support_record_failure, and makes do_test
    unconditionally return zero.
    
    Tested for powerpc64le (as-is and with a patched results table to check
    that the error reporting actually works).
    
    	* misc/tst-efgcvt.c: Include support/check.h and
    	support/test-driver.c.  Do not include test-skeleton.c.
    	(error_count): Remove.
    	(output_error): Replace increments to error_count with calls to
    	support_record_failure.
    	(output_r_error): Likewise.
    	(special): Likewise.
    	(do_test): Unconditionally return zero.
    	(TEST_FUNCTION): Remove.

diff --git a/ChangeLog b/ChangeLog
index 1153c53..7d723f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2018-11-09  Gabriel F. T. Gomes  <gabriel@inconstante.eti.br>
+
+	* misc/tst-efgcvt.c: Include support/check.h and
+	support/test-driver.c.  Do not include test-skeleton.c.
+	(error_count): Remove.
+	(output_error): Replace increments to error_count with calls to
+	support_record_failure.
+	(output_r_error): Likewise.
+	(special): Likewise.
+	(do_test): Unconditionally return zero.
+	(TEST_FUNCTION): Remove.
+
 2018-11-09  Joseph Myers  <joseph@codesourcery.com>
 
 	* conform/Makefile ($(conformtest-header-tests)): Create $(@D),
diff --git a/misc/tst-efgcvt.c b/misc/tst-efgcvt.c
index bb716d5..5a598f4 100644
--- a/misc/tst-efgcvt.c
+++ b/misc/tst-efgcvt.c
@@ -25,7 +25,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-int error_count;
+#include <support/check.h>
 
 typedef struct
 {
@@ -101,7 +101,7 @@ output_error (const char *name, double value, int ndigit,
 	  res_p, res_decpt, res_sign);
   printf ("Should be  p: \"%s\", decpt: %d, sign: %d\n",
 	  exp_p, exp_decpt, exp_sign);
-  ++error_count;
+  support_record_failure ();
 }
 
 
@@ -116,7 +116,7 @@ output_r_error (const char *name, double value, int ndigit,
 	  res_p, res_decpt, res_sign, res_return);
   printf ("Should be  buf: \"%s\", decpt: %d, sign: %d\n",
 	  exp_p, exp_decpt, exp_sign);
-  ++error_count;
+  support_record_failure ();
 }
 
 static void
@@ -189,13 +189,13 @@ special (void)
   if (res == 0)
     {
       printf ("ecvt_r with a too small buffer was succesful.\n");
-      ++error_count;
+      support_record_failure ();
     }
   res = fcvt_r (123.456, 10, &decpt, &sign, buf, 1);
   if (res == 0)
     {
       printf ("fcvt_r with a too small buffer was succesful.\n");
-      ++error_count;
+      support_record_failure ();
     }
 }
 
@@ -209,8 +209,7 @@ do_test (void)
   test_r (fcvt_tests, fcvt_r, "fcvt_r");
   special ();
 
-  return error_count;
+  return 0;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |   12 ++++++++++++
 misc/tst-efgcvt.c |   15 +++++++--------
 2 files changed, 19 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources



More information about the Glibc-cvs mailing list