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.27.9000-653-g2c6da2f
- From: azanella at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 27 Jul 2018 17:48:45 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.27.9000-653-g2c6da2f
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 2c6da2f48769ca37b22088fe65bdcb4b0f319b80 (commit)
from da80612d6114815db698bf891fb751e7962d1c11 (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=2c6da2f48769ca37b22088fe65bdcb4b0f319b80
commit 2c6da2f48769ca37b22088fe65bdcb4b0f319b80
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Fri Jul 27 10:07:14 2018 -0300
Fix Linux fcntl OFD locks on unsupported kernels
This patch make the OFD tests return unsupported if kernel does not
support OFD locks (it was added on 3.15).
Checked on a ia64-linux-gnu with Linux 3.14.
* sysdeps/unix/sysv/linux/tst-ofdlocks.c: Return unsupported if
kernel does not support OFD locks.
* sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c: Likewise.
diff --git a/ChangeLog b/ChangeLog
index 562ddc7..50fc501 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-07-27 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+
+ * sysdeps/unix/sysv/linux/tst-ofdlocks.c: Return unsupported if
+ kernel does not support OFD locks.
+ * sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c: Likewise.
+
2018-07-27 Samuel Thibault <samuel.thibault@ens-lyon.org>
* sysdeps/mach/hurd/Versions (libc): Make __access and
diff --git a/sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c b/sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c
index 03c4abf..aaf65af 100644
--- a/sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c
+++ b/sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c
@@ -62,7 +62,12 @@ do_test (void)
.l_start = (off64_t)INT32_MAX + 1024,
.l_len = 1024,
};
- TEST_VERIFY_EXIT (fcntl (temp_fd, F_OFD_SETLKW, &lck64) == 0);
+ int ret = fcntl (temp_fd, F_OFD_SETLKW, &lck64);
+ if (ret == -1 && errno == EINVAL)
+ /* OFD locks are only available on Linux 3.15. */
+ FAIL_UNSUPPORTED ("fcntl (F_OFD_SETLKW) not supported");
+
+ TEST_VERIFY_EXIT (ret == 0);
/* Open file description locks placed through the same open file description
(either by same file descriptor or a duplicated one created by fork,
diff --git a/sysdeps/unix/sysv/linux/tst-ofdlocks.c b/sysdeps/unix/sysv/linux/tst-ofdlocks.c
index bd345e9..a660bab 100644
--- a/sysdeps/unix/sysv/linux/tst-ofdlocks.c
+++ b/sysdeps/unix/sysv/linux/tst-ofdlocks.c
@@ -46,7 +46,12 @@ do_test (void)
.l_start = (off64_t)INT32_MAX + 1024,
.l_len = 1024,
};
- TEST_VERIFY_EXIT (fcntl64 (temp_fd, F_OFD_SETLKW, &lck64) == 0);
+ int ret = fcntl64 (temp_fd, F_OFD_SETLKW, &lck64);
+ if (ret == -1 && errno == EINVAL)
+ /* OFD locks are only available on Linux 3.15. */
+ FAIL_UNSUPPORTED ("fcntl (F_OFD_SETLKW) not supported");
+
+ TEST_VERIFY_EXIT (ret == 0);
/* Open file description locks placed through the same open file description
(either by same file descriptor or a duplicated one created by fork,
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c | 7 ++++++-
sysdeps/unix/sysv/linux/tst-ofdlocks.c | 7 ++++++-
3 files changed, 18 insertions(+), 2 deletions(-)
hooks/post-receive
--
GNU C Library master sources