Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp3074563ima; Sun, 3 Feb 2019 12:55:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN5sa39e2LZ32aCkpDAP0esnHnkBms++V9HTdJm9BvsATI8Cfs7llOyL66iRGcuQ9hX+KTui X-Received: by 2002:a62:399b:: with SMTP id u27mr50085651pfj.181.1549227349020; Sun, 03 Feb 2019 12:55:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549227348; cv=none; d=google.com; s=arc-20160816; b=GxuPXn76gxERRL5iVy5lqJ7jH1W48n2+WGvr/ti3WpHouvzjdkLtGYI90RQ1cPsZAt zfRsh+kNVy7UYhAuNnk36oMK/xtJcTnjy2gDOdyOXCF/IFWsOMUeizz82i9mmWtDFKeg t368ivt/5KRGPG4MG0nKr+HORRzp3Tv+HADPWaWRy538X3FnDOKCmeOI2b79ZB6/p9ZK j7pu6jHopHne5CSG1Y+8fKy/q2iUbr+enEEfxP4mzHoljJdajU5P6IdsMoD/aYE+4jnD S74uGQax9ukT3Aufl1SWRSjRnBjQR0Af2B3cR/2xIfACn2SeOoynHpGbuEfz7e1r+Bea uhIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date; bh=VlLmD/Z1v3GFME2PN2QKhuqs3IvMrKBqPAVFE9z7c5w=; b=DOVmcCzhyv/qNRLiNHYdw49zY5YaLbf5GzSyS17su2AiEn9f3oKkVKnHKdpDWCOmU5 03QWtXA2t+wMosRP4aeXzJschzKDvzke0FfYAaUsrp/zRzqema9VThtam6Kf2YmQ7tZG 0QIWbp5mgosiUIY6JTIfRTDlbWiz7A2GNXbXu1rS2RT58j4hl2SjB6XBlV2tkZhZSpRX 7KZHDD58PkGvakv/W8o/M/U/Ma1pw/+38NNJRh6ojBzDZHu2N+klEdySQ4AIP3gMmvHz RnWdBrXR2Fsd/TGenYkdNhMIEp4Fr+cWAfLsamek5INaTUjAc0Fx/0YAMVWQVDY2TOj8 bYjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si14181044pli.438.2019.02.03.12.55.20; Sun, 03 Feb 2019 12:55:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727215AbfBCUxA (ORCPT + 99 others); Sun, 3 Feb 2019 15:53:00 -0500 Received: from mx2.suse.de ([195.135.220.15]:55872 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726820AbfBCUw7 (ORCPT ); Sun, 3 Feb 2019 15:52:59 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 05310AE7F; Sun, 3 Feb 2019 20:52:58 +0000 (UTC) Date: Sun, 3 Feb 2019 21:52:52 +0100 From: Petr Vorel To: Mimi Zohar Cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, David Howells , Dave Young , Eric Biederman , Shuah Khan Subject: Re: [PATCH 1/3] selftest/ima: cleanup the kexec selftest Message-ID: <20190203205252.GA4022@x230> Reply-To: Petr Vorel References: <1548960936-7800-1-git-send-email-zohar@linux.ibm.com> <1548960936-7800-2-git-send-email-zohar@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1548960936-7800-2-git-send-email-zohar@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mimi, > Remove the few bashisms in the script and use the complete option name > for clarity. > Signed-off-by: Mimi Zohar Reviewed-by: Petr Vorel > --- > tools/testing/selftests/ima/test_kexec_load.sh | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > diff --git a/tools/testing/selftests/ima/test_kexec_load.sh b/tools/testing/selftests/ima/test_kexec_load.sh > index 1c10093fb526..74423c4229e2 100755 > --- a/tools/testing/selftests/ima/test_kexec_load.sh > +++ b/tools/testing/selftests/ima/test_kexec_load.sh > @@ -1,7 +1,7 @@ > #!/bin/sh > # SPDX-License-Identifier: GPL-2.0+ # SPDX-License-Identifier: GPL-2.0-or-later According to [1] GPL-2.0+ has been deprecated (but who cares). ... > - if [ "$secureboot" == "1" ]; then > +kexec --load $KERNEL_IMAGE 2>&1 /dev/null kexec --load $KERNEL_IMAGE 2>&1 >/dev/null missing redirection. > +if [ $? -eq 0 ]; then > + kexec --unload > + if [ $secureboot -eq 1 ]; then > echo "$TEST: kexec_load succeeded [FAIL]" > rc=1 > else > echo "$TEST: kexec_load succeeded [PASS]" > fi It'd be nice, if selftest has some main library with helpers (like LTP has [2]), to have unified output and reduce duplicity. Kind regards, Petr [1] https://spdx.org/licenses/ [2] https://github.com/linux-test-project/ltp/blob/master/testcases/lib/tst_test.sh