From patchwork Tue Oct 27 13:48:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 310948 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=-12.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, USER_AGENT_GIT 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 41D79C388F9 for ; Tue, 27 Oct 2020 15:29:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F242B22275 for ; Tue, 27 Oct 2020 15:29:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603812562; bh=vT6TQiAhfCEnptE16SMHV42f9bp7lBiVGUO/RjqiwFg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=uiYn2wuSzV0w9lHZPVd8hU83ohAJSUGKUwFY2lA7R0/lbBysHicQcD6s60pLZDJmj NHWeEJd/wfvW0wkPyHXRVf28zDOlU5b1sbCar4Bi3WRvnEkOqG5yTZmY5PdiH83NtQ xmT4NFYUhZ5aphUP82IwVGA15mIrfEiH1cT1IkG0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1798624AbgJ0P3S (ORCPT ); Tue, 27 Oct 2020 11:29:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:45576 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1798617AbgJ0P3Q (ORCPT ); Tue, 27 Oct 2020 11:29:16 -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 412462225E; Tue, 27 Oct 2020 15:29:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603812554; bh=vT6TQiAhfCEnptE16SMHV42f9bp7lBiVGUO/RjqiwFg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e+9aEIqwiR/tRtP9gru36SFKo0icLdNVXUOSyeeGq4AUHoG+dQRjTwyEt08w38WDZ +aqGPs11pq+7Ruwig/ancFMUe0NR8SfUmARl4cFBqP1nF8VBg4c8fu9d2V2jD0biMj 7QJtWbHS9MgxcgidjBTTiY9fPkTcFPPsFaCaWNyI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Naresh Kamboju , linux-kselftest@vger.kernel.org, Kees Cook , Shuah Khan , Sasha Levin Subject: [PATCH 5.9 251/757] selftests/lkdtm: Use "comm" instead of "diff" for dmesg Date: Tue, 27 Oct 2020 14:48:21 +0100 Message-Id: <20201027135502.347605691@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135450.497324313@linuxfoundation.org> References: <20201027135450.497324313@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: Kees Cook [ Upstream commit d00451c8118f8f7ab8e057bc6ee2f8b7d70b6a1c ] Instead of full GNU diff (which smaller boot environments may not have), use "comm" which is more available. Reported-by: Naresh Kamboju Cc: linux-kselftest@vger.kernel.org Fixes: f131d9edc29d ("selftests/lkdtm: Don't clear dmesg when running tests") Signed-off-by: Kees Cook Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20200909211700.2399399-1-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- 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 8383eb89d88a9..bb7a1775307b8 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