From 4437aff4a8f03ebd6cfe0319fd468338e7affe5e Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 6 Oct 2015 22:59:00 +0000 Subject: Tweak: use 'mainlwp' instead of 'mainpid' since this is a thread (LWP) identifier, not a pid. --- tests/sys/kern/ptrace_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/sys/kern/ptrace_test.c b/tests/sys/kern/ptrace_test.c index ee44575..f611221 100644 --- a/tests/sys/kern/ptrace_test.c +++ b/tests/sys/kern/ptrace_test.c @@ -1103,7 +1103,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_thread, tc) { struct ptrace_lwpinfo pl; pid_t fpid, wpid; - lwpid_t mainpid; + lwpid_t mainlwp; int status; ATF_REQUIRE((fpid = fork()) != -1); @@ -1126,7 +1126,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_thread, tc) ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); - mainpid = pl.pl_lwpid; + mainlwp = pl.pl_lwpid; /* * Continue the child ignoring the SIGSTOP and tracing all @@ -1151,7 +1151,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_thread, tc) sizeof(pl)) != -1); ATF_REQUIRE((pl.pl_flags & PL_FLAG_SCX) != 0); ATF_REQUIRE(pl.pl_syscall_code != 0); - if (pl.pl_lwpid != mainpid) + if (pl.pl_lwpid != mainlwp) /* New thread seen. */ break; -- cgit v1.1