Received: by 10.223.164.202 with SMTP id h10csp1399760wrb; Wed, 8 Nov 2017 03:48:52 -0800 (PST) X-Google-Smtp-Source: ABhQp+RYAXYmQi0fK9rrCzSxZaHeUwXv7R833XoY5WDiDI1HlctvJHnP0M4R81mMxJ78xe6vpRnZ X-Received: by 10.159.253.71 with SMTP id b7mr204901plx.169.1510141732303; Wed, 08 Nov 2017 03:48:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510141732; cv=none; d=google.com; s=arc-20160816; b=VwQEZeIsmI5W+SaUoDG9HcmtdMx3WxgZXAjkw+aeLNhCJCPYBf8hOfIp2I6Gw0hXr6 ZOLOhXWk40m/T6jfGMMqSYQ9V+V4IqieDCM03RcFvASPttFU+JLQZFMkNBuaJqbIope7 9FnnA+NFtlipj4tFzaqyzhgKa2kbwHCYU3h0IhhCUVq6XNn+IqRE4salFIr5TnZJv3+a H1ik2+qoQWq504gfPecNise7UVqevPpWwkMqWsbny+O2KIMDc/LId8985Vl0noXqhOfR QwetBeZuKYsD14b4UuDnuuNhgLHUwo30yEfMgNIhejFSmdW+6C3fJUi3OIkeaPYBiHvG NqUQ== 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=0LH/LCWXhwhfX7/gwTJAcs3BtVRBH6AvYKxdxU8nRR4=; b=FBZ4doEut8UCpRCXhp7M8RcRhMyrSeMbe952HaJHyUukJm2vZDv835ZTUilQKwE2wd HGXRpihMosthgHiNU3HRXWQOnyzW5Ute1n3rS9rfXryWhqyFg5GxxwILq63a4JMcKrzo KJhx1q9uUXKYz6TcyUdKPIYe0RIVUoTGoHla5QwzqJqnj3fKx2Lvho7AL53STbrThnkr BthfNyxHVrO0UoEkHpzyxL1ut+ROID13KPMmUKnfgQPAQhU+HDl2U77u2CSJEiRHZtJd sD2ctuVoqIAo5bCS8GcLuuAoF966RP6D0jBNh4wzsfd7bKlAqg2krrM3EBqfwYGKkv4d fDKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FehUQ13C; 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 q15si3569833pgc.579.2017.11.08.03.48.37; Wed, 08 Nov 2017 03:48:52 -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=FehUQ13C; 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 S1752205AbdKHLr6 (ORCPT + 81 others); Wed, 8 Nov 2017 06:47:58 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:50696 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751826AbdKHLrx (ORCPT ); Wed, 8 Nov 2017 06:47:53 -0500 Received: by mail-pg0-f66.google.com with SMTP id y5so1635115pgq.7 for ; Wed, 08 Nov 2017 03:47:53 -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=0LH/LCWXhwhfX7/gwTJAcs3BtVRBH6AvYKxdxU8nRR4=; b=FehUQ13CNAOyyRiSaR3HgadBqjBZTMrcnktByGrTo2srmB1tnLze+i2oAtzRo04pfJ ViXC0pzCP4xERY/TKh+BPODZrcAj+/f6GDhc0l9g4Do8iGYRX90Ghlhwl74H5bM7b10k Br/TXTlpZv7fSime8C+NAo5Ea7yq6p6jrobJ0= 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=0LH/LCWXhwhfX7/gwTJAcs3BtVRBH6AvYKxdxU8nRR4=; b=oFle89gKLTxMq0sge9sFNMDALSxhgr4yNV+gplYxFdZQ9RtuA/f3KsIE1Laxq9VDlO o1m0X6WaubqrHil6lP5anGtvsu5dBtT7msT3ZrHx8gbSAdVsXyYpyuxGN5Mg+MYj7Xuw 04SqxjxOpsjcNUBdvtrwI9VcFndnXTyGdbqyTqYV/zl9Ps7Su/QhisCgEF7gD7zjav// wRyo6O90u5Lqmnyx9OJvR28jxfWOV0wYbLoyoI6Hr5dE9lEe7VmD1SAws1Ls6+kacm/L pMJtI8EIpfO/5npBMdwN6UBUMIK4Xafr68mqbYK2rRW2JWXgMRyOXuWEYk6L/8V5HLMx g/5w== X-Gm-Message-State: AJaThX69JU6I3fymGBR0Kjxzwoi5f/Fgs1j6MVpifcD0FycOLfyR9rXH wonuqtWCTuBgQXcwGbHKYp/0v6a0Pm4= X-Received: by 10.98.217.78 with SMTP id s75mr265312pfg.40.1510141672522; Wed, 08 Nov 2017 03:47:52 -0800 (PST) Received: from localhost.localdomain ([106.51.18.232]) by smtp.gmail.com with ESMTPSA id m74sm8742203pfi.2.2017.11.08.03.47.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Nov 2017 03:47:51 -0800 (PST) From: Amit Pundir To: kselftest , lkml Cc: Shuah Khan , Greg Kroah-Hartman , "Luis R . Rodriguez" , Masami Hiramatsu , Sumit Semwal Subject: [PATCH 1/2] selftests: firmware: skip unsupported async loading tests Date: Wed, 8 Nov 2017 17:17:39 +0530 Message-Id: <1510141660-31612-2-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510141660-31612-1-git-send-email-amit.pundir@linaro.org> References: <1510141660-31612-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. Signed-off-by: Amit Pundir --- 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 supported" >&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 supported" >&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 1583505094228304666@xxx Wed Nov 08 13:35:38 +0000 2017 X-GM-THRID: 1583467172077126357 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread