Received: by 10.223.164.202 with SMTP id h10csp42477wrb; Wed, 8 Nov 2017 11:43:19 -0800 (PST) X-Google-Smtp-Source: ABhQp+Ryy5kjNH2s6N+GlncuCfAoRoqvffgaq39pcUWtOfQN4LR5kWeVXafdp7sMgNg4SrOq+RVj X-Received: by 10.84.129.132 with SMTP id b4mr1394320plb.412.1510170199710; Wed, 08 Nov 2017 11:43:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510170199; cv=none; d=google.com; s=arc-20160816; b=k04YPlsAT/I/uKY1PLmZysxrSglj7CwcPRAQiVAevCBSN1BdmgMB5bfh9VeVh08B56 6IwexoZyubj7wBzOCUzvokWVnyJuT8dT+Xr6Z2IrvosS3kJIPDOkAZv6svmNV00v+HGw rtswBut4gToru9kfb2AsyEkUSQNHWySg5o8u9Duno4gocspfnGRqJgwLk6b2Lj/K9+ph KAV+EzUB3MW5US6B1LZzr28i1vFBoUkge4o3Tzwd2wOrrM/ECQq4gT61H4o0UinlfCph 8li9sN0XA81Gh3Q99aHyvCt/63XbZHcL0WCQ1PXAmmwFU7tqgJhhF4GgyjoEFP3mqMqo Pk1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:author:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=1FTYM0KxnnPX+70IAA1DUtmOvj9KoHnYWx5DW2Sn3II=; b=qfvX2rawmMCTD5keznnybkDwn9xU2JOL8S5WXEzISnHntdkYCGpdqiBMP1xMmrovsf 19iLbR0DyggrH8YBrq8jn40fYxiCD4M9e4Inlfa1daRhtDu8ojQKVYYgzejMfORJlgRM 8IWbsMQdqhhvrtWFzRfLPSJmvgq1zauA+GkO6f8Eh+vaNw1KuJRK+qP882sXpW0YFEvb BmY1A4Tj4Cwsd2ff6qbpDi92K0Ic5uL9xT0ctJQWqGIWseGCP7Dw4ri1z3yCHQV7YiXs i1+xxuq+MsBej/Mti1/UwCNSNd3EWUxEU660dAgK3Fncq2smguTkpCbwku0FUrqkMCJq MXzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Les4jr4S; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si4416576pld.604.2017.11.08.11.43.07; Wed, 08 Nov 2017 11:43:19 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Les4jr4S; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752535AbdKHTkt (ORCPT + 84 others); Wed, 8 Nov 2017 14:40:49 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:46922 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752496AbdKHTkq (ORCPT ); Wed, 8 Nov 2017 14:40:46 -0500 Received: by mail-pf0-f193.google.com with SMTP id p87so2468444pfj.3 for ; Wed, 08 Nov 2017 11:40:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references:author; bh=1FTYM0KxnnPX+70IAA1DUtmOvj9KoHnYWx5DW2Sn3II=; b=Les4jr4SAR2AlKzYXrW979D0C5/notCB6edBP8L0useb8ksnJtEGs60nO3VaPWEOCL uGK8iaAtbe+RhB22SMMKshbo7ga8JZ72ZWsuwlVCsTdJsJSWjw6UbGMKIXAJ+syvbbRv uIgz72j7dexVebxZ5itLjHGYM1q2k74vhW2dU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:author; bh=1FTYM0KxnnPX+70IAA1DUtmOvj9KoHnYWx5DW2Sn3II=; b=Y4lzW8PCAndjrdB0Efvq2kkza7dR+M4a6CwkFvzypfsE73HcfIS9o6mHqNIkHtW46W Z0uGe//bYWiWHNxZrFJV3Rs7XzDsxVvQhQAuu/ZdEjmTcqHerDL/76gELfBdh5Ozu6rh rSW1Ky+RAf2cgW+zFGHj9YOlRNo4a1rxKRxpewg8KgPYX2eCfJ2pgRfZ6/fZXE33K3dI R+JKunV0GeN8b20ARgYOD4dV2IVeLouLcKRetuockNixQGc7IuP+W9ub6SfUm1FXFpyk y1pUQuNxTj61gRZ8vUJaGp112RvZMsXWKFKhC0z+aA9GvL6T/mk340oQZIPiLAZTTcKb qz6w== X-Gm-Message-State: AJaThX4r2v6It0E+36wSdr6Sv470RuLCDCEG3R/DyuzLEdFQNLSQQ/JI H30bjYkrEPB6xy+41KJNVxCsvg== X-Received: by 10.99.117.7 with SMTP id q7mr1469827pgc.382.1510170045763; Wed, 08 Nov 2017 11:40:45 -0800 (PST) Received: from localhost.localdomain ([106.51.18.232]) by smtp.gmail.com with ESMTPSA id j6sm8658143pgn.68.2017.11.08.11.40.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Nov 2017 11:40:44 -0800 (PST) From: Amit Pundir To: kselftest , lkml Cc: Shuah Khan , Greg Kroah-Hartman , "Luis R . Rodriguez" , Masami Hiramatsu , Sumit Semwal Subject: [PATCH v2 1/2] selftests: firmware: skip unsupported async loading tests Date: Thu, 9 Nov 2017 01:10:34 +0530 Message-Id: <1510170035-31384-2-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510170035-31384-1-git-send-email-amit.pundir@linaro.org> References: <1510170035-31384-1-git-send-email-amit.pundir@linaro.org> Author: Amit Pundir Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ignore async firmware loading tests on older kernel releases, which do not support this feature. Fixes: 1b1fe542b6f0 ("selftests: firmware: add empty string and async tests") Reviewed-by: Sumit Semwal Acked-by: Luis R. Rodriguez Acked-by: Greg Kroah-Hartman Signed-off-by: Amit Pundir --- v2: Changed the display message to make it consistent across all the firmware test scripts. Added Fixes tag. tools/testing/selftests/firmware/fw_filesystem.sh | 34 ++++++++++++++--------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/tools/testing/selftests/firmware/fw_filesystem.sh b/tools/testing/selftests/firmware/fw_filesystem.sh index 62f2d6f54929..b1f20fef36c7 100755 --- a/tools/testing/selftests/firmware/fw_filesystem.sh +++ b/tools/testing/selftests/firmware/fw_filesystem.sh @@ -70,9 +70,13 @@ if printf '\000' >"$DIR"/trigger_request 2> /dev/null; then exit 1 fi -if printf '\000' >"$DIR"/trigger_async_request 2> /dev/null; then - echo "$0: empty filename should not succeed (async)" >&2 - exit 1 +if [ ! -e "$DIR"/trigger_async_request ]; then + echo "$0: empty filename: async trigger not present, ignoring test" >&2 +else + if printf '\000' >"$DIR"/trigger_async_request 2> /dev/null; then + echo "$0: empty filename should not succeed (async)" >&2 + exit 1 + fi fi # Request a firmware that doesn't exist, it should fail. @@ -105,17 +109,21 @@ else fi # Try the asynchronous version too -if ! echo -n "$NAME" >"$DIR"/trigger_async_request ; then - echo "$0: could not trigger async request" >&2 - exit 1 -fi - -# Verify the contents are what we expect. -if ! diff -q "$FW" /dev/test_firmware >/dev/null ; then - echo "$0: firmware was not loaded (async)" >&2 - exit 1 +if [ ! -e "$DIR"/trigger_async_request ]; then + echo "$0: firmware loading: async trigger not present, ignoring test" >&2 else - echo "$0: async filesystem loading works" + if ! echo -n "$NAME" >"$DIR"/trigger_async_request ; then + echo "$0: could not trigger async request" >&2 + exit 1 + fi + + # Verify the contents are what we expect. + if ! diff -q "$FW" /dev/test_firmware >/dev/null ; then + echo "$0: firmware was not loaded (async)" >&2 + exit 1 + else + echo "$0: async filesystem loading works" + fi fi ### Batched requests tests -- 2.7.4 From 1583529009955309357@xxx Wed Nov 08 19:55:46 +0000 2017 X-GM-THRID: 1583514887991701392 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread