]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Remove __ASSUME_PROC_PID_TASK_COMM.
authorJoseph Myers <joseph@codesourcery.com>
Mon, 8 May 2017 16:44:54 +0000 (16:44 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 8 May 2017 16:44:54 +0000 (16:44 +0000)
This patch removes the __ASSUME_PROC_PID_TASK_COMM macro, and
associated conditional code (in a testcase), now that 3.2 is the
global minimum Linux kernel version supported.

Tested for x86_64.

* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_PROC_PID_TASK_COMM): Remove macro.
* sysdeps/unix/sysv/linux/tst-setgetname.c: Do not include
<kernel-features.h>.
(do_test) [!__ASSUME_PROC_PID_TASK_COMM]: Remove conditional code.

ChangeLog
sysdeps/unix/sysv/linux/kernel-features.h
sysdeps/unix/sysv/linux/tst-setgetname.c

index 7386ce96dfd522d3f32cc9c39e345acc3acca7b3..49378f6609603c20bffaa162aa58cd68773d372b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2017-05-08  Joseph Myers  <joseph@codesourcery.com>
 
+       * sysdeps/unix/sysv/linux/kernel-features.h
+       (__ASSUME_PROC_PID_TASK_COMM): Remove macro.
+       * sysdeps/unix/sysv/linux/tst-setgetname.c: Do not include
+       <kernel-features.h>.
+       (do_test) [!__ASSUME_PROC_PID_TASK_COMM]: Remove conditional code.
+
        * sysdeps/unix/sysv/linux/x86_64/kernel-features.h
        (__ASSUME_GETCPU_SYSCALL): Remove macro.
 
index b981466f3445244be9a4037f5f309b5946449763..d837c221fb38c83c014295b9f45ba09aa904c21e 100644 (file)
 # define __ASSUME_RECVMMSG     1
 #endif
 
-/* Support for /proc/self/task/$tid/comm and /proc/$pid/task/$tid/comm was
-   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
index 5acd614117faccc0edb93560a6e5cd79fc87099e..0ab35e60f9b9a6502cfc2652010a3e12dc6031a9 100644 (file)
@@ -23,7 +23,6 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
-#include <kernel-features.h>
 
 /* New name of process.  */
 #define NEW_NAME "setname"
@@ -101,18 +100,6 @@ do_test (int argc, char **argv)
     {
       res = get_self_comm (gettid (), name_check, TASK_COMM_LEN);
 
-#ifndef __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)