Received: by 10.213.65.68 with SMTP id h4csp1716813imn; Thu, 5 Apr 2018 02:31:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+t+uz1/nashGa5PBDzR7QQudKCYd6vnWkRdjnofOOoj/9yY12wb4vSQYMIKMgmwE5Bx+YJ X-Received: by 2002:a17:902:3181:: with SMTP id x1-v6mr22041835plb.269.1522920697100; Thu, 05 Apr 2018 02:31:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522920697; cv=none; d=google.com; s=arc-20160816; b=td0B+/LIb0PUs70dEbEFM/BSMl6RmcW0u8ZD33D5TmxwPDBQqQlk4VheGpeE5pMsNF 4ScCF/cGLDmTxwZFG7D8b9/QeOoZDMdhluHJP1m9h8MYq7sxCO2Jrz9KLVO1uprcxKkg AL/OJH0MwhUSYwPYqaXSyDUr4b6xC4WQ4b3IACZc6QCYbnHU8OOoxTXT7PScrdaZizkF gb5hWG43sv9qpQI7Adoi3qvp8gCXT4sAo1K0zPMrTMVA8Ap+Bmw7p1wT6inD/i0AiT9L 0Nn1YuoHl4e9eA0LEdy/RyFYNMjUjJI5mpvSLbwUBMEeSmwth1mbjozkUsQgdxBykse/ e/Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dmarc-filter:arc-authentication-results; bh=6mySXXxoktuku14fLovtrdLeZpUgVnhlkIh//BgPI+U=; b=S2KRI3MUfQhiOug6VomKZ2Q9wcY33+IHZRP1s5DBJFr7MwXV2Gw4f1SM/vlm7safmN BzyDu5ShLe2C655FpcKdHLXgoJ2WDOWOSkOC9IpuLOhnnfhbXi0+6V4rT6YmCnGAz1b/ Tf48ZlVGp+ZXShDgpRQ6Sl/DR2lnIj9/LGJovsyLICahn91cKSUxYZ3k11uQf+vYWnLC n/tI/Xv/+gq9G0ByVaeGSnyLoPur1DDuqNTGZRI4guC0TWowoITTH4Vc9Dmvqc4qzP9p wjDI3boNFMBjLSBPUpLjwA4DoKPsyW8imDXviqbvk4aSRh9rH/lc3hJ4ZWaiU11AEzB2 /H9Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w19-v6si5298251plq.250.2018.04.05.02.31.23; Thu, 05 Apr 2018 02:31:37 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751534AbeDEJ3I (ORCPT + 99 others); Thu, 5 Apr 2018 05:29:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:49428 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751275AbeDEJ3H (ORCPT ); Thu, 5 Apr 2018 05:29:07 -0400 Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B31BC217CE; Thu, 5 Apr 2018 09:29:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B31BC217CE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org From: Masami Hiramatsu To: Steven Rostedt Cc: Masami Hiramatsu , Tom Zanussi , tglx@linutronix.de, namhyung@kernel.org, vedang.patel@intel.com, bigeasy@linutronix.de, joel.opensrc@gmail.com, joelaf@google.com, mathieu.desnoyers@efficios.com, baohong.liu@intel.com, rajvi.jingar@intel.com, julia@ni.com, fengguang.wu@intel.com, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org Subject: [PATCH 1/2] selftests: ftrace: Fix trigger extended error testcase Date: Thu, 5 Apr 2018 18:28:42 +0900 Message-Id: <152292052250.15769.12565292689264162435.stgit@devbox> X-Mailer: git-send-email 2.13.6 In-Reply-To: <152292049091.15769.13306554953968999494.stgit@devbox> References: <152292049091.15769.13306554953968999494.stgit@devbox> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Previous testcase redirects echo-out into /dev/null using "&>" as below echo "trigger-command" >> trigger &> /dev/null But this means redirecting both stdout and stderr into /dev/null because it is same as below echo "trigger-command" >> trigger > /dev/null 2>&1 So ">> trigger" redirects stdout to trigger file, but next "> /dev/null" redirects stdout to /dev/null again and the last "2>/&1" redirects stderr to stdout (/dev/null) This fixes it by "2> /dev/null". And also, since it must fail, add "!" to echo command. Fixes: f06eec4d0f2c ("selftests: ftrace: Add inter-event hist triggers testcases") Signed-off-by: Masami Hiramatsu --- .../inter-event/trigger-extended-error-support.tc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-extended-error-support.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-extended-error-support.tc index 786dce7e48be..2aabab363cfb 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-extended-error-support.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-extended-error-support.tc @@ -29,7 +29,7 @@ do_reset echo "Test extended error support" echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="ping"' > events/sched/sched_wakeup/trigger -echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="ping"' >> events/sched/sched_wakeup/trigger &>/dev/null +! echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="ping"' >> events/sched/sched_wakeup/trigger 2> /dev/null if ! grep -q "ERROR:" events/sched/sched_wakeup/hist; then fail "Failed to generate extended error in histogram" fi