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=-14.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 36EDBC43461 for ; Wed, 9 Sep 2020 21:35:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F0BC221D6C for ; Wed, 9 Sep 2020 21:35:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599687306; bh=qQ4j62UktuH/7t4l5vtoYLNABqvpTIRWslJPdpiGaF8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-ID:From; b=PGZXCvIldHkgLzQDPj4TmVXWPatcQ1GiFXAMkXXPI9I54ZIygCdlkunosRw1Xu2wa /fExudRrsDX6Nb0RdOpkM8b/eMnnHDwE+rrLdGUV5Fb01IVtvf62nipneuPM29TB8Y VKXiA7es6ip9li+iPiikaprG/cVUaBZ2ccuBunBY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728442AbgIIVfE (ORCPT ); Wed, 9 Sep 2020 17:35:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726426AbgIIVfD (ORCPT ); Wed, 9 Sep 2020 17:35:03 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 939CAC061573 for ; Wed, 9 Sep 2020 14:35:02 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id b6so4822931iof.6 for ; Wed, 09 Sep 2020 14:35:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=iFwcM5UOt2dpyB2PsU5iJo0w889YT6WLHO2nVi3J24g=; b=J0LLvpo1cupuJbGq53hbp03wzOvwvtjlXRh2BNTpOPik1+TAzMNARHV+0u9Dsqkw2Q UVOWKAKJ0/pJuo+XPq06078vVF/QefyQepMqhy76QGGMwWtFW1nE8/N1lWk/4aXezzt9 0QJebhL8Lhz8LjxzL/CNjj3l1uEIXaLl2IL44= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=iFwcM5UOt2dpyB2PsU5iJo0w889YT6WLHO2nVi3J24g=; b=M9cabu2pktgjEe3jnWKsIeYgRzGHwD35J0y+aCM9qsRIrwgEvDIBVfVsHoni7kSGA2 /5bIEvKsGwfka4shCbcaQ40PxHQrupdyQ/06zIwQSMjFRWdRf9j0iwKcPctm1MYMgeWl RJKFL+fenctmJcFjdH6wsdB9Rfti3ECiYn7zZWyEf2tC3amHVgIIx6FfU224DiSK+EFb IV3hyanjtGTvYH2/5WarA19p1H8UPIzKG/Hy86+5DZShbbcqZjw7AY01+5aco1erzLLo HH2xNJg7s+ELp0o4duUdyFmOX0KePVCYttf0S/T1S0pVpLWqyx+5dCUtO0yld3WA+THj EjrA== X-Gm-Message-State: AOAM530UE2v47HHNvWy0WUtP5KI8LdNawqUtBYDQk5h09dinYGQ+/rjL CmtL6UZUmtGbwNqmWeiTgSIx2A== X-Google-Smtp-Source: ABdhPJw0ea5MrnRi+Y4QQcTgIBMEGCPv9JcBQ/7/MH5C82chfmjUlsoEHZA7di9RgOwbJPC4KJqDSg== X-Received: by 2002:a05:6602:22cf:: with SMTP id e15mr4928006ioe.114.1599687301932; Wed, 09 Sep 2020 14:35:01 -0700 (PDT) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id m12sm1939383ilg.55.2020.09.09.14.35.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Sep 2020 14:35:01 -0700 (PDT) Subject: Re: [PATCH v2] selftests/lkdtm: Use "comm" instead of "diff" for dmesg To: Kees Cook , Shuah Khan , Greg Kroah-Hartman Cc: Naresh Kamboju , linux-kselftest@vger.kernel.org, Joe Lawrence , Petr Mladek , Michael Ellerman , linux-kernel@vger.kernel.org, skhan@linuxfoundation.org References: <20200909211700.2399399-1-keescook@chromium.org> From: Shuah Khan Message-ID: Date: Wed, 9 Sep 2020 15:35:00 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200909211700.2399399-1-keescook@chromium.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org 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, -- Shuah