diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2014-02-07 21:04:10 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2014-02-07 21:04:10 +0000 |
commit | 85f4cc52a11508e42daa5625283410e0d6f3a993 (patch) | |
tree | deca25a1076f1a24479cbca3bd7d162123fae742 /libc/nptl/sysdeps/unix/sysv/linux/tst-setgetname.c | |
parent | a1055d384d75c28f09a47c2d8628bc330f892955 (diff) | |
download | eglibc2-master.tar.gz |
git-svn-id: svn://svn.eglibc.org/trunk@25237 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/nptl/sysdeps/unix/sysv/linux/tst-setgetname.c')
-rw-r--r-- | libc/nptl/sysdeps/unix/sysv/linux/tst-setgetname.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/tst-setgetname.c b/libc/nptl/sysdeps/unix/sysv/linux/tst-setgetname.c index 2aceba53b..f5693e26c 100644 --- a/libc/nptl/sysdeps/unix/sysv/linux/tst-setgetname.c +++ b/libc/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) |