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.18-891-gf877c4f
- From: carlos at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 5 Feb 2014 15:13:45 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.18-891-gf877c4f
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 f877c4f2bf2ebc9ecd3e099e33fc4184f4fcac1a (commit)
from cff469ca41181c67e805eaf7c0a1b518b60fbf10 (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=f877c4f2bf2ebc9ecd3e099e33fc4184f4fcac1a
commit f877c4f2bf2ebc9ecd3e099e33fc4184f4fcac1a
Author: Carlos O'Donell <carlos@redhat.com>
Date: Wed Feb 5 10:10:34 2014 -0500
Fix tst-setgetname for Linux kernels < 2.6.33.
Support for /proc/self/task/$tid/comm as added in Linux 2.6.33,
therefore since the test tst-setgetname relies on this functionality
to operate we must skip the test in kernels < 2.6.33. We wrap the
checks with __ASSUME_PROC_PID_TASK_COMM such that in the future when
we move arch_minimum_kernel to 2.6.33 we can remove this code.
diff --git a/ChangeLog b/ChangeLog
index 9c0a003..a75fb0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-02-05 Carlos O'Donell <carlos@rehdat.com>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h
+ [__LINUX_KERNEL_VERSION >= 0x020621]
+ (__ASSUME_PROC_PID_TASK_COMM): Define.
+
2014-02-05 Siddhesh Poyarekar <siddhesh@redhat.com>
* manual/contrib.texi: Update entry for Ondrej Bilka, Will
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 8761f5b..003e290 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,9 @@
+2014-02-05 Carlos O'Donell <carlos@redhat.com>
+
+ * sysdeps/unix/sysv/linux/tst-setgetname.c (do_test): Skip the
+ test if !__ASSUME_PROC_PID_TASK_COMM and get_self_comm returns
+ ENOENT.
+
2014-01-23 Stefan Liebler <stli@linux.vnet.ibm.com>
* tst-tls7.c: Adjust testcase timeout
diff --git a/nptl/sysdeps/unix/sysv/linux/tst-setgetname.c b/nptl/sysdeps/unix/sysv/linux/tst-setgetname.c
index 2aceba5..f5693e2 100644
--- a/nptl/sysdeps/unix/sysv/linux/tst-setgetname.c
+++ b/nptl/sysdeps/unix/sysv/linux/tst-setgetname.c
@@ -23,6 +23,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
+#include <kernel-features.h>
/* New name of process. */
#define NEW_NAME "setname"
@@ -99,6 +100,19 @@ do_test (int argc, char **argv)
if (res == 0)
{
res = get_self_comm (gettid (), name_check, TASK_COMM_LEN);
+
+#if !__ASSUME_PROC_PID_TASK_COMM
+ /* On this first test we look for ENOENT to be returned from
+ get_self_comm to indicate that the kernel is older than
+ 2.6.33 and doesn't contain comm within the proc structure.
+ In that case we skip the entire test. */
+ if (res == ENOENT)
+ {
+ printf ("SKIP: The kernel does not have /proc/self/task/%%lu/comm.\n");
+ return 0;
+ }
+#endif
+
if (res == 0)
{
if (strncmp (name, name_check, strlen (BIG_NAME)) == 0)
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index 3723535..aabf69d 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -202,6 +202,12 @@
# define __ASSUME_RECVMMSG 1
#endif
+/* Support for /proc/self/task/$tid/comm and /proc/$pid/task/$tid/comm were
+ added in 2.6.33. */
+#if __LINUX_KERNEL_VERSION >= 0x020621
+# define __ASSUME_PROC_PID_TASK_COMM 1
+#endif
+
/* statfs fills in f_flags since 2.6.36. */
#if __LINUX_KERNEL_VERSION >= 0x020624
# define __ASSUME_STATFS_F_FLAGS 1
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
nptl/ChangeLog | 6 ++++++
nptl/sysdeps/unix/sysv/linux/tst-setgetname.c | 14 ++++++++++++++
sysdeps/unix/sysv/linux/kernel-features.h | 6 ++++++
4 files changed, 32 insertions(+), 0 deletions(-)
hooks/post-receive
--
GNU C Library master sources