summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/tst-setgetname.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/tst-setgetname.c')
-rw-r--r--sysdeps/unix/sysv/linux/tst-setgetname.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/sysdeps/unix/sysv/linux/tst-setgetname.c b/sysdeps/unix/sysv/linux/tst-setgetname.c
index f490d8354c..b80ff59074 100644
--- a/sysdeps/unix/sysv/linux/tst-setgetname.c
+++ b/sysdeps/unix/sysv/linux/tst-setgetname.c
@@ -1,5 +1,5 @@
/* Test pthread_setname_np and pthread_getname_np.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -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"
@@ -56,7 +55,7 @@ get_self_comm (long tid, char *buf, size_t len)
{
int res = 0;
#define FMT "/proc/self/task/%lu/comm"
- char fname[sizeof (FMT) + 8];
+ char fname[sizeof (FMT) + 32];
sprintf (fname, FMT, (unsigned long) tid);
int fd = open (fname, O_RDONLY);
@@ -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)