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]

GNU C Library master sources branch master updated. glibc-2.19-172-gb1dbb42


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  b1dbb426e164ad1236c2c76268e03fec5c7a7bbe (commit)
       via  fcd89ebe4f5ea948ff4c796771b918cde8960721 (commit)
      from  9962a2d34e2478bd05a8a08e537a1e2b6897adb2 (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=b1dbb426e164ad1236c2c76268e03fec5c7a7bbe

commit b1dbb426e164ad1236c2c76268e03fec5c7a7bbe
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Mon Mar 10 16:20:01 2014 +0530

    Fix up return codes for tests in tst-ftell-active-handler
    
    The test functions used a variable ret to store failure codes for
    individual tests, but the variable was incorrectly used to record
    other failure codes too, resulting in overwriting of the tests status.
    This is now fixed by making sure that the ret variable is used only
    for recording test failures.
    
    	* libio/tst-ftell-active-handler.c (do_ftell_test): Don't mix
    	up test status with function return status.
    	(do_write_test): Likewise.
    	(do_append_test): Likewise.

diff --git a/ChangeLog b/ChangeLog
index 005b678..1bb538f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-03-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
+	* libio/tst-ftell-active-handler.c (do_ftell_test): Don't mix
+	up test status with function return status.
+	(do_write_test): Likewise.
+	(do_append_test): Likewise.
+
 	* nptl/sysdeps/pthread/bits/libc-lockP.h [defined NOT_IN_libc
 	&& !defined IS_IN_libpthread && __LT_SPINNOCK_INIT != 0]:
 	Remove.
diff --git a/libio/tst-ftell-active-handler.c b/libio/tst-ftell-active-handler.c
index 54bfe63..5d5fc26 100644
--- a/libio/tst-ftell-active-handler.c
+++ b/libio/tst-ftell-active-handler.c
@@ -119,17 +119,20 @@ do_ftell_test (const char *filename)
 	{
 	  FILE *fp;
 	  int fd;
+	  int fileret;
+
 	  printf ("\tftell: %s (file, \"%s\"): ", j == 0 ? "fdopen" : "fopen",
 		  test_modes[i].mode);
 
 	  if (j == 0)
-	    ret = get_handles_fdopen (filename, fd, fp, test_modes[i].fd_mode,
-				      test_modes[i].mode);
+	    fileret = get_handles_fdopen (filename, fd, fp,
+					  test_modes[i].fd_mode,
+					  test_modes[i].mode);
 	  else
-	    ret = get_handles_fopen (filename, fd, fp, test_modes[i].mode);
+	    fileret = get_handles_fopen (filename, fd, fp, test_modes[i].mode);
 
-	  if (ret != 0)
-	    return ret;
+	  if (fileret != 0)
+	    return fileret;
 
 	  long off = ftell (fp);
 	  if (off != test_modes[i].old_off)
@@ -143,7 +146,12 @@ do_ftell_test (const char *filename)
 
 	  /* The effect of this write on the offset should be seen in the ftell
 	     call that follows it.  */
-	  int ret = write (fd, data, data_len);
+	  int write_ret = write (fd, data, data_len);
+	  if (write_ret != data_len)
+	    {
+	      printf ("write failed (%m)\n");
+	      ret |= 1;
+	    }
 	  off = ftell (fp);
 
 	  if (off != test_modes[i].new_off)
@@ -184,21 +192,23 @@ do_write_test (const char *filename)
     {
       for (int i = 0; i < sizeof (test_modes) / sizeof (struct test); i++)
 	{
+	  int fileret;
 	  printf ("\twrite: %s (file, \"%s\"): ", j == 0 ? "fopen" : "fdopen",
 		  test_modes[i].mode);
 
 	  if (j == 0)
-	    ret = get_handles_fopen (filename, fd, fp, test_modes[i].mode);
+	    fileret = get_handles_fopen (filename, fd, fp, test_modes[i].mode);
 	  else
-	    ret = get_handles_fdopen (filename, fd, fp, test_modes[i].fd_mode,
-				      test_modes[i].mode);
+	    fileret = get_handles_fdopen (filename, fd, fp,
+					  test_modes[i].fd_mode,
+					  test_modes[i].mode);
 
-	  if (ret != 0)
-	    return ret;
+	  if (fileret != 0)
+	    return fileret;
 
 	  /* Move offset to just before the end of the file.  */
-	  off_t ret = lseek (fd, file_len - 1, SEEK_SET);
-	  if (ret == -1)
+	  off_t seek_ret = lseek (fd, file_len - 1, SEEK_SET);
+	  if (seek_ret == -1)
 	    {
 	      printf ("lseek failed: %m\n");
 	      ret |= 1;
@@ -258,17 +268,20 @@ do_append_test (const char *filename)
     {
       for (int i = 0; i < sizeof (test_modes) / sizeof (struct test); i++)
 	{
+	  int fileret;
+
 	  printf ("\tappend: %s (file, \"%s\"): ", j == 0 ? "fopen" : "fdopen",
 		  test_modes[i].mode);
 
 	  if (j == 0)
-	    ret = get_handles_fopen (filename, fd, fp, test_modes[i].mode);
+	    fileret = get_handles_fopen (filename, fd, fp, test_modes[i].mode);
 	  else
-	    ret = get_handles_fdopen (filename, fd, fp, test_modes[i].fd_mode,
-				      test_modes[i].mode);
+	    fileret = get_handles_fdopen (filename, fd, fp,
+					  test_modes[i].fd_mode,
+					  test_modes[i].mode);
 
-	  if (ret != 0)
-	    return ret;
+	  if (fileret != 0)
+	    return fileret;
 
 	  /* Write some data.  */
 	  size_t written = fputs_func (data, fp);

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fcd89ebe4f5ea948ff4c796771b918cde8960721

commit fcd89ebe4f5ea948ff4c796771b918cde8960721
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Mon Mar 17 19:31:46 2014 +0530

    Get rid of __LT_SPINLOCK_INIT
    
    We got rid of LinuxThreads in 2005, but we didn't remove
    __LT_SPINLOCK_INIT back then.  Do it now.
    
    	* nptl/sysdeps/pthread/bits/libc-lockP.h [defined NOT_IN_libc
    	&& !defined IS_IN_libpthread && __LT_SPINNOCK_INIT != 0]:
    	Remove.

diff --git a/ChangeLog b/ChangeLog
index 1c6b384..005b678 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+	* nptl/sysdeps/pthread/bits/libc-lockP.h [defined NOT_IN_libc
+	&& !defined IS_IN_libpthread && __LT_SPINNOCK_INIT != 0]:
+	Remove.
+
 2014-03-17  Joseph Myers  <joseph@codesourcery.com>
 
 	* math/gen-libm-test.pl (parse_args): Handle results specified for
diff --git a/nptl/sysdeps/pthread/bits/libc-lockP.h b/nptl/sysdeps/pthread/bits/libc-lockP.h
index bacc678..ec20271 100644
--- a/nptl/sysdeps/pthread/bits/libc-lockP.h
+++ b/nptl/sysdeps/pthread/bits/libc-lockP.h
@@ -78,13 +78,8 @@ typedef pthread_key_t __libc_key_t;
   CLASS __libc_lock_t NAME = LLL_LOCK_INITIALIZER;
 # endif
 #else
-# if __LT_SPINLOCK_INIT == 0
-#  define __libc_lock_define_initialized(CLASS,NAME) \
+# define __libc_lock_define_initialized(CLASS,NAME) \
   CLASS __libc_lock_t NAME;
-# else
-#  define __libc_lock_define_initialized(CLASS,NAME) \
-  CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER;
-# endif
 #endif
 
 #define __libc_rwlock_define_initialized(CLASS,NAME) \

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

Summary of changes:
 ChangeLog                              |   11 +++++++
 libio/tst-ftell-active-handler.c       |   49 ++++++++++++++++++++-----------
 nptl/sysdeps/pthread/bits/libc-lockP.h |    7 +----
 3 files changed, 43 insertions(+), 24 deletions(-)


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


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