From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06D62C43461 for ; Thu, 10 Sep 2020 17:08:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9BBB7208E4 for ; Thu, 10 Sep 2020 17:08:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599757704; bh=jQ0ZRylENGKXOzmgkK2AlOHvIv1X+hciX8EofZovJZM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=qhc/pxi/+KoAWxvxdmO/taVJQWJIKwpd6ibmAloxjWG9v/wBXf8LgfXfZG9Ve3nol eNEknXT3zCzGkCjq+2xvc9C99f2MAERfVWIeuGMVYokumGzgtdXxzSFlwPSu10eBHu ynqDinhug9LOT+2tFAXOmpmBMEVx4Thk7F0kp/j0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726942AbgIJRIW (ORCPT ); Thu, 10 Sep 2020 13:08:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:50588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726780AbgIJQy3 (ORCPT ); Thu, 10 Sep 2020 12:54:29 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BC423207EA; Thu, 10 Sep 2020 16:53:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599756831; bh=jQ0ZRylENGKXOzmgkK2AlOHvIv1X+hciX8EofZovJZM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=F2PChalw8ifQxX2QZUgkdtCnaPQO6Xu0oG0GYrww7Ml5suypUU78GW8lB7dpAbt4f FlYuPb45rk8Us6voZlv2GdlgU+xQwWlNRkDdktHKa/xWUlL6y/fMNzxeEF/kIUc78F /VB6XGRdW2LiEur3TlCluYx1ayzvZj0GT7h14JXE= Date: Thu, 10 Sep 2020 18:53:58 +0200 From: Greg Kroah-Hartman To: Shuah Khan Cc: Kees Cook , Shuah Khan , Naresh Kamboju , linux-kselftest@vger.kernel.org, Joe Lawrence , Petr Mladek , Michael Ellerman , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] selftests/lkdtm: Use "comm" instead of "diff" for dmesg Message-ID: <20200910165358.GD1458062@kroah.com> References: <20200909211700.2399399-1-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 09, 2020 at 03:35:00PM -0600, Shuah Khan wrote: > On 9/9/20 3:17 PM, Kees Cook wrote: > > Instead of full GNU diff (which smaller boot environments may not have), > > use "comm" which is more available. > > > > Reported-by: Naresh Kamboju > > Cc: Shuah Khan > > Cc: linux-kselftest@vger.kernel.org > > Fixes: f131d9edc29d ("selftests/lkdtm: Don't clear dmesg when running tests") > > Signed-off-by: Kees Cook > > --- > > v2: add --nocheck-order, thanks to Joe Lawrence > > v1: https://lore.kernel.org/lkml/202006261358.3E8AA623A9@keescook/ > > --- > > tools/testing/selftests/lkdtm/run.sh | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/testing/selftests/lkdtm/run.sh b/tools/testing/selftests/lkdtm/run.sh > > index 8383eb89d88a..bb7a1775307b 100755 > > --- a/tools/testing/selftests/lkdtm/run.sh > > +++ b/tools/testing/selftests/lkdtm/run.sh > > @@ -82,7 +82,7 @@ dmesg > "$DMESG" > > ($SHELL -c 'cat <(echo '"$test"') >'"$TRIGGER" 2>/dev/null) || true > > # Record and dump the results > > -dmesg | diff --changed-group-format='%>' --unchanged-group-format='' "$DMESG" - > "$LOG" || true > > +dmesg | comm --nocheck-order -13 "$DMESG" - > "$LOG" || true > > cat "$LOG" > > # Check for expected output > > > > Greg, > > Would you like me to take this through kselftest tree? > > If you want to take it through lkdtm tree, here is my Ack: > > Acked-by: Shuah Khan Thanks, I'll take it. greg k-h