Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3232239imu; Thu, 29 Nov 2018 18:33:01 -0800 (PST) X-Google-Smtp-Source: AFSGD/WmvSCU9+N9qP9r3ge9raS5SRT/7S24WhqfmFdy57/7uFRWEQzOdz20/AxYA8dVwrinoQK4 X-Received: by 2002:a17:902:5601:: with SMTP id h1mr4011151pli.160.1543545180840; Thu, 29 Nov 2018 18:33:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543545180; cv=none; d=google.com; s=arc-20160816; b=UpZ2okLqBVBqSNU9s0Zx3rtzUBrcZ9cirQ1bN+RdO5OK3XYbP/PttzAs0UAmJ6nicJ G1FJvfgEDf80oB51WqGG9vYujgo42RpjY4noGD252rjoW0j9KcssCpC3iA6O7as9vq6d 2eb08jgVdqIJF9HUgT4e6EpzpzfhbWeSY0A6gDIajI0pLOocssrDRmALy8Lvz6KQTiLn cozBv+EMG+lSrCwqIjVR7PkWyBeCs4GUl1USEeiu36A/VNzywN8EuYZmur2DHvLDh3yE exZTTSh63Lr7byY2QJkDrur+Z59OXbk+/rrSO9HKtPiCbYTk86FoA2yw3JAEofuO/2CW tGvA== 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:message-id:subject:cc :to:from:date; bh=qjqVkSEVhRY/EgI2bYPITqdHL/5CmZWka4mRMMCeiRw=; b=siIl9yAXMmkMHSdurniyb9HwsMquUjsPgKYkrcHlowH4ziqAljQ3qb2VbYtTLnQft+ BzEvxoxjTpqPC4IX+0ddWPzL8NVznvbrqVPh0kkKUazXa30mAIbD2yViYEzl+QH/WBGp 3ur+DPBmYbB9Xr0SFE6GvFgO+FzsNrL5EGUTm6tv/pj6Vn0h99tcvz6c4R/7hzQIQeeq JxlGnC1O6syEFLD3wkpsSCM70feH1aQLOhEdEEESHpaQzYoS0/5kI5J9nxiBrhzxHy72 VDwBVXhQ5Iwo/0Yw6YLB9PC3OB5/dfmZxgCS0URHYR+/Eq6wl+r1HwTuQJmvWyOuxEBK w5bw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12si3478422pgf.454.2018.11.29.18.32.45; Thu, 29 Nov 2018 18:33:00 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727321AbeK3NjA (ORCPT + 99 others); Fri, 30 Nov 2018 08:39:00 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:37376 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726728AbeK3NjA (ORCPT ); Fri, 30 Nov 2018 08:39:00 -0500 Received: by mail-pl1-f195.google.com with SMTP id b5so2019679plr.4; Thu, 29 Nov 2018 18:31:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qjqVkSEVhRY/EgI2bYPITqdHL/5CmZWka4mRMMCeiRw=; b=UBqy9jjVtvu2UhCvU5IDJUtMsAAAQ0e7pLXbM7F+oFMS7EAKrfzd5Rb94V8bBMus4B I7HxhxTRI0I6tb9FTodcKZLFwng8NYELUwwzW0bSYd3qzMK7J58FpZBPVVBFU+04DyH1 0JEPQSuY+2vADX378PPUMjBduquZawAOz8fILw/N38DK4jnyshO/lVVWP0yZP/o6fy/K pD7qorL4clKPZkgX8EzuiNCqy3Ater60aCT7Ik6mMGTGEJ6fodc5VeEZCUU0fIfZDwgs NI1+pvS1Oxa5OyJUz/4lFtM+zlXv0qlNu8cRV9g/dP9NbOYwrgKrfXnEyfeNq5hDV4C1 D0xA== X-Gm-Message-State: AA+aEWZynyPRsagCI/lA3L74U60zAxzrVqNWZKSjW67nYZqyF97maozN o8YqVPbaXeuzmZf79SJbYVk= X-Received: by 2002:a17:902:34a:: with SMTP id 68mr4014150pld.268.1543545079384; Thu, 29 Nov 2018 18:31:19 -0800 (PST) Received: from garbanzo.do-not-panic.com (c-73-71-40-85.hsd1.ca.comcast.net. [73.71.40.85]) by smtp.gmail.com with ESMTPSA id 78sm4394395pft.184.2018.11.29.18.31.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Nov 2018 18:31:17 -0800 (PST) Received: by garbanzo.do-not-panic.com (sSMTP sendmail emulation); Thu, 29 Nov 2018 18:31:15 -0800 Date: Thu, 29 Nov 2018 18:31:15 -0800 From: Luis Chamberlain To: Dan Rue , Shuah Khan Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kees Cook , linux-kselftest@vger.kernel.org, Brendan Higgins Subject: Re: [PATCH 2/2] selftests: firmware: add CONFIG_FW_LOADER_USER_HELPER_FALLBACK to config Message-ID: <20181130023115.GN4922@garbanzo.do-not-panic.com> References: <20181127031218.24419-1-dan.rue@linaro.org> <20181127031218.24419-3-dan.rue@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181127031218.24419-3-dan.rue@linaro.org> 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 On Mon, Nov 26, 2018 at 09:12:16PM -0600, Dan Rue wrote: > CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y is required for fw_fallback.sh. > Without it, fw_fallback.sh fails with 'usermode helper disabled so > ignoring test'. Enable the config in selftest so that it gets built by > default. > > Signed-off-by: Dan Rue > --- > tools/testing/selftests/firmware/config | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/testing/selftests/firmware/config b/tools/testing/selftests/firmware/config > index bf634dda0720..913a25a4a32b 100644 > --- a/tools/testing/selftests/firmware/config > +++ b/tools/testing/selftests/firmware/config > @@ -1,5 +1,6 @@ > CONFIG_TEST_FIRMWARE=y > CONFIG_FW_LOADER=y > CONFIG_FW_LOADER_USER_HELPER=y > +CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y > CONFIG_IKCONFIG=y > CONFIG_IKCONFIG_PROC=y NACK -- the point of the changes was to *allow* us to mimic such configuration through a proc sysctl knob. You aren forcing CONFIG_FW_LOADER_USER_HELPER_FALLBACK but just having CONFIG_FW_LOADER_USER_HELPER suffices to emulate the_FALLBACK functionality. The issue here seems to be that *all* tests fail once a configuration is found which is not suitable a tests. With the shiny new proc sysctls we can test all 3 kernel configurations in one shot. Since we test 3 different kernel configurations naturally some of these won't have the features needed, so that failure should be treated as non-fatal to allow the chain of other tests to continue. This issue was a regression due to commit a6a9be9270c87 ("selftests: firmware: return Kselftest Skip code for skipped tests") by Shuah for the verify_reqs(). We need to treat this as a non-fatal / don't skip return value. The following would fix this chaining issue: diff --git a/tools/testing/selftests/firmware/fw_lib.sh b/tools/testing/selftests/firmware/fw_lib.sh index 6c5f1b2ffb74..1cbb12e284a6 100755 --- a/tools/testing/selftests/firmware/fw_lib.sh +++ b/tools/testing/selftests/firmware/fw_lib.sh @@ -91,7 +91,7 @@ verify_reqs() if [ "$TEST_REQS_FW_SYSFS_FALLBACK" = "yes" ]; then if [ ! "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then echo "usermode helper disabled so ignoring test" - exit $ksft_skip + exit 0 fi fi } However its not clear to me if instead we want some new special return value for selftests so that the framework can detect an that an error is non-fatal, and can continue. This is a tricky situation given the script, existing upstream kernel module, are aware of such emulation hacks via sysctl, but knowledge of this is not obvious to selftests. Shuah, how do you suggest we handle this corner case? If you are OK with the above hunk for now I can send a fix for it. In either case this commit was added on v4.18, so the fix would be a stable fix. Luis