Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751983AbdHHBhI (ORCPT ); Mon, 7 Aug 2017 21:37:08 -0400 Received: from mail-io0-f177.google.com ([209.85.223.177]:37681 "EHLO mail-io0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751891AbdHHBhG (ORCPT ); Mon, 7 Aug 2017 21:37:06 -0400 MIME-Version: 1.0 In-Reply-To: <2185ad3f-2a08-09b9-2df6-1fa5853506d7@canonical.com> References: <1501730353-46840-1-git-send-email-keescook@chromium.org> <1501730353-46840-5-git-send-email-keescook@chromium.org> <2185ad3f-2a08-09b9-2df6-1fa5853506d7@canonical.com> From: Kees Cook Date: Mon, 7 Aug 2017 18:37:04 -0700 X-Google-Sender-Auth: 1-Hl5W7SExV1sH6BpgndQCIsBpw Message-ID: Subject: Re: [PATCH 4/4] selftests/seccomp: Test thread vs process killing To: Tyler Hicks Cc: LKML , Fabricio Voznika , Andy Lutomirski , Will Drewry , Shuah Khan , "open list:KERNEL SELFTEST FRAMEWORK" , linux-security-module Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 707 Lines: 21 On Mon, Aug 7, 2017 at 6:29 PM, Tyler Hicks 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