Re: [PATCH 4/4] selftests/seccomp: Test thread vs process killing
From: Kees Cook
Date: Mon Aug 07 2017 - 21:37:12 EST
On Mon, Aug 7, 2017 at 6:29 PM, Tyler Hicks <tyhicks@xxxxxxxxxxxxx> wrote:
>> + /* Only the thread died. Let parent know this thread didn't die. */
>
> This read a little odd to me. How about, "Only the created thread died.
> Let parent know the this creating thread didn't die."?
Sounds good. I've updated this to be more descriptive.
>> + ASSERT_EQ(1, WIFEXITED(status));
>
> This is probably nitpicky but, after reading the wait(2) man page, I
> feel like this should be ASSERT_TRUE(WIFEXITED(status)) instead of
> comparing to 1. There's no documented guarantee that 1 will be returned.
That's a fair point. I've updated this and WIFSIGNALED now, thanks!
-Kees
--
Kees Cook
Pixel Security