Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1705948

Re: [PATCH 4/4] selftests/seccomp: Test thread vs process killing

From Kees Cook <keescook@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] selftests/seccomp: Test thread vs process killing
Date 2017-08-08 03:40 +0200
Message-ID <uc1F0-zY-9@gated-at.bofh.it> (permalink)
References <uaeQ1-2rm-3@gated-at.bofh.it> <uaeQ1-2rm-1@gated-at.bofh.it> <uc1F0-zY-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Aug 7, 2017 at 6:29 PM, Tyler Hicks <tyhicks@canonical.com> 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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4/4] selftests/seccomp: Test thread vs process killing Kees Cook <keescook@chromium.org> - 2017-08-03 05:20 +0200
  Re: [PATCH 4/4] selftests/seccomp: Test thread vs process killing Kees Cook <keescook@chromium.org> - 2017-08-08 03:40 +0200
  Re: [PATCH 4/4] selftests/seccomp: Test thread vs process killing Tyler Hicks <tyhicks@canonical.com> - 2017-08-08 03:40 +0200

csiph-web