From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932288AbdK2KUy (ORCPT ); Wed, 29 Nov 2017 05:20:54 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:56030 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753289AbdK2KUx (ORCPT ); Wed, 29 Nov 2017 05:20:53 -0500 Date: Wed, 29 Nov 2017 11:20:55 +0100 From: Greg KH To: "Luis R. Rodriguez" Cc: akpm@linux-foundation.org, keescook@chromium.org, mfuzzey@parkeon.com, zohar@linux.vnet.ibm.com, dhowells@redhat.com, pali.rohar@gmail.com, tiwai@suse.de, arend.vanspriel@broadcom.com, zajec5@gmail.com, nbroeking@me.com, markivx@codeaurora.org, stephen.boyd@linaro.org, broonie@kernel.org, dmitry.torokhov@gmail.com, dwmw2@infradead.org, torvalds@linux-foundation.org, Abhay_Salunke@dell.com, bjorn.andersson@linaro.org, jewalt@lgsinnovations.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v2 16/23] test_firmware: enable custom fallback testing on limited kernel configs Message-ID: <20171129102055.GA11522@kroah.com> References: <20171120182409.27348-1-mcgrof@kernel.org> <20171120182409.27348-17-mcgrof@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171120182409.27348-17-mcgrof@kernel.org> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 20, 2017 at 10:24:02AM -0800, Luis R. Rodriguez wrote: > When a kernel is not built with: > > CONFIG_HAS_FW_LOADER_USER_HELPER_FALLBACK=y > > We don't currently enable testing fw_fallback.sh. For kernels that > still enable the fallback mechanism, its possible to use the async > request firmware API call request_firmware_nowait() using the custom > interface to use the fallback mechanism, so we should be able to test > this but we currently cannot. > > We can enable testing without CONFIG_HAS_FW_LOADER_USER_HELPER_FALLBACK=y > by relying on /proc/config.gz (CONFIG_IKCONFIG_PROC), if present. If you > don't have this we'll have no option but to rely on old heuristics for now. > > Signed-off-by: Luis R. Rodriguez > --- > tools/testing/selftests/firmware/config | 4 +++ > tools/testing/selftests/firmware/fw_fallback.sh | 45 ++++++++++++++++++++++++- > 2 files changed, 48 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/firmware/config b/tools/testing/selftests/firmware/config > index c8137f70e291..bf634dda0720 100644 > --- a/tools/testing/selftests/firmware/config > +++ b/tools/testing/selftests/firmware/config > @@ -1 +1,5 @@ > CONFIG_TEST_FIRMWARE=y > +CONFIG_FW_LOADER=y > +CONFIG_FW_LOADER_USER_HELPER=y > +CONFIG_IKCONFIG=y > +CONFIG_IKCONFIG_PROC=y > diff --git a/tools/testing/selftests/firmware/fw_fallback.sh b/tools/testing/selftests/firmware/fw_fallback.sh > index 722cad91df74..a42e437363d9 100755 > --- a/tools/testing/selftests/firmware/fw_fallback.sh > +++ b/tools/testing/selftests/firmware/fw_fallback.sh > @@ -6,7 +6,46 @@ > # won't find so that we can do the load ourself manually. > set -e > > +PROC_CONFIG="/proc/config.gz" How does this work when you are running the test on a target that does not have this kernel build option? thanks, greg k-h