From patchwork Wed Nov 8 19:54:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 118334 Delivered-To: patch@linaro.org Received: by 10.80.225.132 with SMTP id k4csp55077edl; Wed, 8 Nov 2017 11:54:34 -0800 (PST) X-Google-Smtp-Source: ABhQp+RApOuihn0rDl9aEMNovAtOqzz5uf7ECoBa8q6VFqPW1c7L2fGbTHcRzNHgnSxOXdKs5CZ7 X-Received: by 10.98.3.7 with SMTP id 7mr1608910pfd.160.1510170873879; Wed, 08 Nov 2017 11:54:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510170873; cv=none; d=google.com; s=arc-20160816; b=HO9ZJTP1eb/g9Il22S5hq3Q5Y2KBXcO/Inw37Ceu4gOYopoGxn4F+b9Z4PLiZsSKBs El8Pzo114JGmWheeo9GgkK01fMo3ItAAtU0/U0EW1/q5Ved5OBd+V6x0EmWP1iAAiyb7 5uwzqdNGUdh0YwZETT/+m74XQHQ3HovMxCFbCogRDrPl8i2cAaMWs1Ul9ktk0+v9j0zc s3qhhQNlpcX3Form5+NDf2ItRJLr5EdE/UqNVb3j3loXGM8VjDHg5njbKu/coyodxDqA lpKeaBhszlEwjL250T84yFPANcKgLttbLMdS1rhiVlH3QwTG+SV7PgFeJVWfkw2zwq9n LRKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=7HR8fZkuhOQjyEN0XiRUOtLQVGkqsFXw2NVkBEcxcaE=; b=dkCC7/v4KlRPOLUqPc21pESZpC/X/hDorXuOy2RQD/3nq2w7IlHMkRPZdCSMhqVdh5 kZU9IQS556HRW2kTkRi39rP1cZdB5Zzv8F+qIxJ93dxKL8jZzJ9w9wdcRk831w0B50Rp Uj6ue3q9Eri/ZVvKlOoSRpC4TfELDJlH7hg27BAGaLGawC77FgR/yx9w0FA/tdNJ9fxu YsEoKcYplBlL0DXw/qLSPQLDBRW3ATSjRaLxNYJahlJCOqFJejW4AYN+Cn/NIfzT4OV8 RPFY3wUkxPnBfg8Pi1BxzeBNfMCSFoBkTcYPI58OElYmy9yzMIUz99KJUW4n6MLbq+UT 8KpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AtZLdJ8H; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 f5si4413061plo.19.2017.11.08.11.54.33; Wed, 08 Nov 2017 11:54:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=AtZLdJ8H; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S1752709AbdKHTyc (ORCPT + 9 others); Wed, 8 Nov 2017 14:54:32 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:56664 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752633AbdKHTyb (ORCPT ); Wed, 8 Nov 2017 14:54:31 -0500 Received: by mail-pf0-f196.google.com with SMTP id b85so2473294pfj.13 for ; Wed, 08 Nov 2017 11:54:30 -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; bh=7HR8fZkuhOQjyEN0XiRUOtLQVGkqsFXw2NVkBEcxcaE=; b=AtZLdJ8H7QayUOAeqxc+186SY7TpgoCLE5Jlz9HuMmdvyEvzJWaV0ZouD5EhVhxiAg Ofj5Rgst9B2qZc5kyoU2PtZAfY6wBQPVtjTvVKLHBcogMBeJ9hFU0N7JnZeg0/9mb1L4 IBUIIbeReT2zMXnc85LfJH9UJJ3QNpFYvzqz8= 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; bh=7HR8fZkuhOQjyEN0XiRUOtLQVGkqsFXw2NVkBEcxcaE=; b=APwAKfWJF02zocTWBGAs+pTY7GnK0hW13Rsf9QZgE9pxZjeZ+JO1UWuMqLEwrQsrlT wO2mEWIFOIm8yptRn6UkHjgLlBgL/WiQ8BYTa+zMCdyvd7w099I835/NqWXvbhqR0yC4 6hbYkP5DD8v0E2nkOM5w9JU1mKywU8hK6czUIaxcVsVZydgdIjRViEnVEZZx0hmyUi2H AOWyInpQkIm+NTcFUmGI7OPWDOLvK0/TBnep70O+8oNioKnJ/DA9oj//tUkx43syRMsv YpohdE4IXBUTXlIgSTJexhbcIw7fpgUBQ9gCfggdUUg21zLVq6kTNAwO9CqNttD5U3wL u0yw== X-Gm-Message-State: AJaThX76mhEJ2hW25KMhZdjNnoRzkeBjH8Tq+ujIJwQjWGrrsCWgru54 OQ8FwsCqlJJImkKSeELD7ailkw== X-Received: by 10.98.245.152 with SMTP id b24mr1641426pfm.56.1510170870499; Wed, 08 Nov 2017 11:54:30 -0800 (PST) Received: from localhost.localdomain ([106.51.18.232]) by smtp.gmail.com with ESMTPSA id p83sm10021226pfd.61.2017.11.08.11.54.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Nov 2017 11:54:29 -0800 (PST) From: Amit Pundir To: Greg KH Cc: Stable , Fengguang Wu , Shuah Khan , "Luis R . Rodriguez" , Brian Norris , Sumit Semwal Subject: [PATCH for-4.4.y 3/4] selftests: firmware: send expected errors to /dev/null Date: Thu, 9 Nov 2017 01:24:11 +0530 Message-Id: <1510170852-32052-4-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510170852-32052-1-git-send-email-amit.pundir@linaro.org> References: <1510170852-32052-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: "Luis R. Rodriguez" commit 880444e214cfd293a2e8cc4bd3505f7ffa6ce33a upstream. Error that we expect should not be spilled to stdout. Without this we get: ./fw_filesystem.sh: line 58: printf: write error: Invalid argument ./fw_filesystem.sh: line 63: printf: write error: No such device ./fw_filesystem.sh: line 69: echo: write error: No such file or directory ./fw_filesystem.sh: filesystem loading works ./fw_filesystem.sh: async filesystem loading works With it: ./fw_filesystem.sh: filesystem loading works ./fw_filesystem.sh: async filesystem loading works Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman [AmitP: Dropped the async trigger testing parts from original commit] Signed-off-by: Amit Pundir --- tools/testing/selftests/firmware/fw_filesystem.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/tools/testing/selftests/firmware/fw_filesystem.sh b/tools/testing/selftests/firmware/fw_filesystem.sh index e9f563fd200a..856a1f327b3f 100755 --- a/tools/testing/selftests/firmware/fw_filesystem.sh +++ b/tools/testing/selftests/firmware/fw_filesystem.sh @@ -48,13 +48,13 @@ echo "ABCD0123" >"$FW" NAME=$(basename "$FW") -if printf '\000' >"$DIR"/trigger_request; then +if printf '\000' >"$DIR"/trigger_request 2> /dev/null; then echo "$0: empty filename should not succeed" >&2 exit 1 fi # Request a firmware that doesn't exist, it should fail. -if echo -n "nope-$NAME" >"$DIR"/trigger_request; then +if echo -n "nope-$NAME" >"$DIR"/trigger_request 2> /dev/null; then echo "$0: firmware shouldn't have loaded" >&2 exit 1 fi