Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp391209pxa; Thu, 27 Aug 2020 05:26:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKM2ZAVxlyqH/Sttln40sM2mHCbCqqM+UIPl51E0j9LBZ8AT9rha+Om00hZWterMfPmV5v X-Received: by 2002:a50:f14e:: with SMTP id z14mr9938701edl.63.1598531217266; Thu, 27 Aug 2020 05:26:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598531217; cv=none; d=google.com; s=arc-20160816; b=lXXoc1I2zDIlxQ3jg2vOEwUorVmOg9W1UpXQS6zNtjzCDu7+XN+SNyeqAazgUcD6TL 5XJUJwb5zuGGt6qwpjLYsVevmt8qhqRh4gOQaAptMZSIxqgt1pTl6dW5GLBQGTfNX62m mWIqvhktC65/YwhYDTKk0MZpjiZmAQORMDTQrj7vnGdqM1rY8r36SycpwUOkKUNV5QBZ W8nVh/vjWFj3Mp+4cRD8mSTEJ7fXZO3ugrpsOrEsaIKIHtGmRLItlERIlfIQcxvgbYbi kVr/R8Oush7HLmgc3OElqwSX5IFtxT6ZJ/6poJGl4awPZK5LVbw6VyDLugOGFfuA0fka t+MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=SdqJ5CoXU2A7nf8uLxGzYF3YQ/rpc7/0YOy4E54iAmM=; b=VXoiBaovITNEbVknm5P0267Bd6DyJTrWJ2eqBMWarxN2XfXw9evG9FI9NiRID9gv35 x+z39id+fUBir12EgczRKk+9mAjLhVmvvizuisv9v//74lfuV76hE8CStgIg7v+wDBSA KIFaLE5oXXS9xiLKafp+bLm+/d68YEvtnoqcNV71OTbwK4NnMWa8HSHP4pPiIE0xr2Vw ql4WNmdcVagMw8HHnI+iAthkQKWWTQpmuJ8L1CuSHk0nPmz9FakwKAIzPeuHyJQQ3TkD Emec6c0DhGitC0E4ytqe1oZ4ozahRxlH9pb56Ras5YRlMyZncxgCWlwImacLXrAftByn oJgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fi12si1219109ejb.185.2020.08.27.05.26.34; Thu, 27 Aug 2020 05:26:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728830AbgH0MPJ (ORCPT + 99 others); Thu, 27 Aug 2020 08:15:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:59598 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728820AbgH0Lxp (ORCPT ); Thu, 27 Aug 2020 07:53:45 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 1F147AC50; Thu, 27 Aug 2020 11:07:43 +0000 (UTC) From: Miroslav Benes To: jpoimboe@redhat.com, jikos@kernel.org, pmladek@suse.com, joe.lawrence@redhat.com, shuah@kernel.org Cc: live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Miroslav Benes Subject: [PATCH] selftests/livepatch: Do not check order when using "comm" for dmesg checking Date: Thu, 27 Aug 2020 13:07:09 +0200 Message-Id: <20200827110709.26824-1-mbenes@suse.cz> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org check_result() uses "comm" to check expected results of selftests output in dmesg. Everything works fine if timestamps in dmesg are unique. If not, like in this example [ 86.844422] test_klp_callbacks_demo: pre_unpatch_callback: test_klp_callbacks_mod -> [MODULE_STATE_LIVE] Normal state [ 86.844422] livepatch: 'test_klp_callbacks_demo': starting unpatching transition , "comm" fails with "comm: file 2 is not in sorted order". Suppress the order checking with --nocheck-order option. Signed-off-by: Miroslav Benes --- The strange thing is, I can reproduce the issue easily and reliably on older codestreams (4.12) but not on current upstream in my testing environment. I think the change makes sense regardless though. tools/testing/selftests/livepatch/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh index 1aba83c87ad3..846c7ed71556 100644 --- a/tools/testing/selftests/livepatch/functions.sh +++ b/tools/testing/selftests/livepatch/functions.sh @@ -278,7 +278,7 @@ function check_result { # help differentiate repeated testing runs. Remove them with a # post-comparison sed filter. - result=$(dmesg | comm -13 "$SAVED_DMESG" - | \ + result=$(dmesg | comm --nocheck-order -13 "$SAVED_DMESG" - | \ grep -e 'livepatch:' -e 'test_klp' | \ grep -v '\(tainting\|taints\) kernel' | \ sed 's/^\[[ 0-9.]*\] //') -- 2.28.0