aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/pidfd/pidfd_test.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-02-10 15:42:48 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2022-02-10 15:42:48 -0800
commit16f7432c884bb7882f0534cb8b9c38cdbccc37bc (patch)
tree667b9336b7a5c2e695da69bcf29f47afce51cd0b /tools/testing/selftests/pidfd/pidfd_test.c
parentff00854812b216e06e92191f036eb0bd1596b2d4 (diff)
parent183f80fd72db42c9cc483aa7a5e8e881355d0b03 (diff)
Merge tag 'linux-kselftest-fixes-5.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull Kselftest fixes from Shuah Khan: "Build and run-time fixes to pidfd, clone3, and ir tests" * tag 'linux-kselftest-fixes-5.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/ir: fix build with ancient kernel headers selftests: fixup build warnings in pidfd / clone3 tests pidfd: fix test failure due to stack overflow on some arches
Diffstat (limited to 'tools/testing/selftests/pidfd/pidfd_test.c')
-rw-r--r--tools/testing/selftests/pidfd/pidfd_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/pidfd/pidfd_test.c b/tools/testing/selftests/pidfd/pidfd_test.c
index 529eb700ac26..9a2d64901d59 100644
--- a/tools/testing/selftests/pidfd/pidfd_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_test.c
@@ -441,7 +441,6 @@ static void test_pidfd_poll_exec(int use_waitpid)
{
int pid, pidfd = 0;
int status, ret;
- pthread_t t1;
time_t prog_start = time(NULL);
const char *test_name = "pidfd_poll check for premature notification on child thread exec";
@@ -500,13 +499,14 @@ static int child_poll_leader_exit_test(void *args)
*/
*child_exit_secs = time(NULL);
syscall(SYS_exit, 0);
+ /* Never reached, but appeases compiler thinking we should return. */
+ exit(0);
}
static void test_pidfd_poll_leader_exit(int use_waitpid)
{
int pid, pidfd = 0;
- int status, ret;
- time_t prog_start = time(NULL);
+ int status, ret = 0;
const char *test_name = "pidfd_poll check for premature notification on non-empty"
"group leader exit";