diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2018-08-22 00:54:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-22 13:52:45 -0400 |
commit | 2cd36fb329487e9525db3ccdbac1e92053b646fa (patch) | |
tree | d1c65365896e5c0448352e00a4ef77c9e872bc57 /tools/testing/selftests/proc/proc.h | |
parent | 61d47c4e71c1f080e7412315c8685bc682a8e53a (diff) |
proc: test /proc/thread-self symlink
Same story: I have WIP patch to make it faster, so better have a test
as well.
Link: http://lkml.kernel.org/r/20180627195209.GC18113@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/testing/selftests/proc/proc.h')
-rw-r--r-- | tools/testing/selftests/proc/proc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/proc/proc.h b/tools/testing/selftests/proc/proc.h index 31ca4b0c007f..b7d57ea40237 100644 --- a/tools/testing/selftests/proc/proc.h +++ b/tools/testing/selftests/proc/proc.h | |||
@@ -14,6 +14,11 @@ static inline pid_t sys_getpid(void) | |||
14 | return syscall(SYS_getpid); | 14 | return syscall(SYS_getpid); |
15 | } | 15 | } |
16 | 16 | ||
17 | static inline pid_t sys_gettid(void) | ||
18 | { | ||
19 | return syscall(SYS_gettid); | ||
20 | } | ||
21 | |||
17 | static inline bool streq(const char *s1, const char *s2) | 22 | static inline bool streq(const char *s1, const char *s2) |
18 | { | 23 | { |
19 | return strcmp(s1, s2) == 0; | 24 | return strcmp(s1, s2) == 0; |