GNU C Library master sources branch master updated. glibc-2.28.9000-273-g43257c3

gftg@sourceware.org gftg@sourceware.org
Fri Nov 9 00:45: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  43257c335ad6b9e05fb882975e1776ff763164ee (commit)
      from  e5de3b5b72afffdebb7f4642015060a5c437d546 (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=43257c335ad6b9e05fb882975e1776ff763164ee

commit 43257c335ad6b9e05fb882975e1776ff763164ee
Author: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
Date:   Tue Nov 6 17:44:13 2018 -0200

    Use TEST_COMPARE_STRING in recently added test
    
    The commit
    
    commit 1df872fd74f730bcae3df201a229195445d2e18a
    Author: Florian Weimer <fweimer@redhat.com>
    Date:   Wed Nov 7 12:42:44 2018 +0100
    
        support: Implement TEST_COMPARE_STRING
    
    added the new macro TEST_COMPARE_STRING, which compares the output of
    functions under test against expected strings, and, when there's a
    mismatch, automatically reports an error and prints the differences.
    This patch adapts recently added test cases to use this new macro.
    
    Tested for powerpc64le (as is, and locally patched to intentionally fail
    and produce error output).
    
    	* argp/tst-ldbl-argp.c (do_one_test): Use TEST_COMPARE_STRING,
    	instead of manually comparing and reporting mismatching strings.
    	* misc/tst-ldbl-error.c (do_one_test): Likewise.
    	* misc/tst-ldbl-warn.c (do_one_test): Likewise.

diff --git a/ChangeLog b/ChangeLog
index f5a8656..c75111b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2018-11-08  Gabriel F. T. Gomes  <gabriel@inconstante.eti.br>
+
+	* argp/tst-ldbl-argp.c (do_one_test): Use TEST_COMPARE_STRING,
+	instead of manually comparing and reporting mismatching strings.
+	* misc/tst-ldbl-error.c (do_one_test): Likewise.
+	* misc/tst-ldbl-warn.c (do_one_test): Likewise.
+
 2018-11-08  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/kernel-features.h: Remove comment about
diff --git a/argp/tst-ldbl-argp.c b/argp/tst-ldbl-argp.c
index 4465f81..231abeb 100644
--- a/argp/tst-ldbl-argp.c
+++ b/argp/tst-ldbl-argp.c
@@ -73,14 +73,7 @@ do_one_test (const char *expected)
   struct support_capture_subprocess result;
   result = support_capture_subprocess ((void *) &do_test_call, NULL);
 
-  if (strcmp (result.err.buffer, expected) != 0)
-    {
-      support_record_failure ();
-      printf ("error:\n"
-	      "    expected: '%s'\n"
-	      "      actual: '%s'\n",
-	      expected, result.err.buffer);
-    }
+  TEST_COMPARE_STRING (result.err.buffer, expected);
 
   return 0;
 }
diff --git a/misc/tst-ldbl-error.c b/misc/tst-ldbl-error.c
index a02cb27..76b2c8f 100644
--- a/misc/tst-ldbl-error.c
+++ b/misc/tst-ldbl-error.c
@@ -95,14 +95,7 @@ do_one_test (void *callback, const char *expected, ...)
   message = strstr (result.err.buffer, needle);
 
   /* Verify that the output message is as expected.  */
-  if (strcmp (message, expected) != 0)
-    {
-      support_record_failure ();
-      printf ("error:\n"
-	      "    expected: '%s'\n"
-	      "      actual: '%s'\n",
-	      expected, message);
-    }
+  TEST_COMPARE_STRING (message, expected);
 
   va_end (args);
 }
diff --git a/misc/tst-ldbl-warn.c b/misc/tst-ldbl-warn.c
index 3ac0e4c..69a5287 100644
--- a/misc/tst-ldbl-warn.c
+++ b/misc/tst-ldbl-warn.c
@@ -61,11 +61,7 @@ do_one_test (int select, const char *format, va_list args,
 
   /* Close the in-memory stream and check the output buffer.  */
   xfclose_memstream (&stream);
-  if (strcmp (stream.buffer, expected) != 0)
-    FAIL_EXIT1 ("error:\n"
-		"    expected: '%s'\n"
-		"      actual: '%s'\n",
-		expected, stream.buffer);
+  TEST_COMPARE_STRING (stream.buffer, expected);
 
   if (stream.buffer != NULL)
     free (stream.buffer);

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

Summary of changes:
 ChangeLog             |    7 +++++++
 argp/tst-ldbl-argp.c  |    9 +--------
 misc/tst-ldbl-error.c |    9 +--------
 misc/tst-ldbl-warn.c  |    6 +-----
 4 files changed, 10 insertions(+), 21 deletions(-)


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



More information about the Glibc-cvs mailing list