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.24-278-ga9bfffe


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  a9bfffe59333fdc6785f3cc903188d1ead36539d (commit)
      from  b3d17c1cf29ac8cd6b2fcd1db7d824e4af9ea505 (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=a9bfffe59333fdc6785f3cc903188d1ead36539d

commit a9bfffe59333fdc6785f3cc903188d1ead36539d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.com>
Date:   Mon Oct 17 16:59:17 2016 -0200

    Fix Linux fallocate tests for EOPNOTSUPP
    
    The fallocate syscall might fail on Linux due missing support from
    underlying filesystem (for instance some NFS versions).  This patch
    adds this check for fallocate tests.  It also moves tst-fallocate{64}
    to 'io' folder (since it is on fallocate{64} is built).
    
    Checked on x86_64.
    
    	* sysdeps/unix/sysv/linux/Makefile [$(subdir) = math] (tests): Move
    	tst-fallocate{64}.
    	* sysdeps/unix/sysv/linux/tst-fallocate-common.c: Check for EOPNOTSUPP
    	on syscall return.

diff --git a/ChangeLog b/ChangeLog
index 11ee620..adc4df9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-10-18  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+	* sysdeps/unix/sysv/linux/Makefile [$(subdir) = math] (tests): Move
+	tst-fallocate{64}.
+	* sysdeps/unix/sysv/linux/tst-fallocate-common.c: Check for EOPNOTSUPP
+	on syscall return.
+
 2016-10-17  Carlos O'Donell  <carlos@redhat.com>
 
 	[BZ #20689]
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 101e120..e329a6b 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -43,7 +43,7 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
 		  bits/mman-linux.h
 
 tests += tst-clone tst-clone2 tst-fanotify tst-personality tst-quota \
-	 tst-fallocate tst-fallocate64 tst-sync_file_range
+	 tst-sync_file_range
 
 # Generate the list of SYS_* macros for the system calls (__NR_* macros).
 
@@ -173,6 +173,8 @@ ifeq ($(subdir),io)
 sysdep_routines += xstatconv internal_statvfs internal_statvfs64 \
 		   sync_file_range fallocate fallocate64
 sysdep_headers += bits/fcntl-linux.h
+
+tests += tst-fallocate tst-fallocate64
 endif
 
 ifeq ($(subdir),elf)
diff --git a/sysdeps/unix/sysv/linux/tst-fallocate-common.c b/sysdeps/unix/sysv/linux/tst-fallocate-common.c
index 9879488..d98bf4a 100644
--- a/sysdeps/unix/sysv/linux/tst-fallocate-common.c
+++ b/sysdeps/unix/sysv/linux/tst-fallocate-common.c
@@ -58,7 +58,13 @@ do_test_with_offset (off_t offset)
      and check if both buffer have the same contents.  */
   ret = fallocate (temp_fd, 0, offset, BLK_SIZE);
   if (ret == -1)
-    FAIL_EXIT1 ("fallocate failed");
+    {
+      /* fallocate might not be fully supported by underlying filesystem (for
+	 instance some NFS versions).   */
+      if (errno == EOPNOTSUPP)
+	FAIL_EXIT (77, "fallocate not supported");
+      FAIL_EXIT1 ("fallocate failed");
+    }
 
   ret = fstat (temp_fd, &finfo);
   if (ret == -1)

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

Summary of changes:
 ChangeLog                                      |    7 +++++++
 sysdeps/unix/sysv/linux/Makefile               |    4 +++-
 sysdeps/unix/sysv/linux/tst-fallocate-common.c |    8 +++++++-
 3 files changed, 17 insertions(+), 2 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]