Received: by 10.213.65.68 with SMTP id h4csp161095imn; Mon, 19 Mar 2018 23:32:15 -0700 (PDT) X-Google-Smtp-Source: AG47ELuCFB3XQFfT6StgDk4GiJI77vnllPzuFT9wxBTKE22x/6/Z407PSoluy4icELPfWnIPjoSC X-Received: by 2002:a17:902:85:: with SMTP id a5-v6mr10589553pla.99.1521527535885; Mon, 19 Mar 2018 23:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521527535; cv=none; d=google.com; s=arc-20160816; b=dNlbxcq6uzHfTmP14ya9+CDabzIsSzb7bRyqg4CgmLMB+nB5IfVukEsmkyVnoJn5bB 1qtDO4HwUO7ehhU63ydUeG3myhPdhzuJ/UkkWMCSm76CsXKwpdtISiLm+cVQAc20TUZP UHAawQGXcypSYp2IHgo2mLgLoHhcqaRm7d4NVF1BK/Wy7hEXaTIik8gV5VOUTYfGZvqx rB3zqsWK5VoUDML5sW/hHPLDByxNzEuvaNYtNWiGmEBYMUq0AZcmDTmJGVvmFdiV5Xel XToC7oMdGqyWxUUXoLSLHefOto54JxO/D++zC0CAxabn56bXsfUSuI7TqVYQyHSbOvc7 DSKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=LIpu71de3EigAl2qUbdvi+I9zzO3rPTtSJ16ENUoVI4=; b=mAyaTl45B6FY7Q7U8Ow3EUavOWJCD5vXHAYSszoYtJE4Sj/SuDuPMcRhIzK081aq3Z ennAX5uCgQxS5i0xeMBSGwruTV+W6fj8djpjmY19sanFh4rmLdN+JFBR92vMU6i/TsjY +fxFMwb+02hHD9n6tzN+A4h2imrGok6uQXWqfDOAA58+Tu3PPkoImi0ZqrRKBq/3G9DW llK25vmzoyqdgMEbfPEeB+0Q/DR64oFmqRv/lqfHIYxSuPyyaXHZQy8gAI2G29nyzU4f UhS4k+ylXnDN493UfCtQx3GCzbsbEVaBAiKM1VstWSos1XIGqjh/inglsuqWaSuFqzXv 4LgA== 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 a5-v6si892561pll.348.2018.03.19.23.32.01; Mon, 19 Mar 2018 23:32:15 -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 S1752146AbeCTGa7 (ORCPT + 99 others); Tue, 20 Mar 2018 02:30:59 -0400 Received: from terminus.zytor.com ([198.137.202.136]:50623 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751697AbeCTGa4 (ORCPT ); Tue, 20 Mar 2018 02:30:56 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w2K6Ul1a031367; Mon, 19 Mar 2018 23:30:47 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w2K6Ul5U031364; Mon, 19 Mar 2018 23:30:47 -0700 Date: Mon, 19 Mar 2018 23:30:47 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Sandipan Das Message-ID: Cc: acme@redhat.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, sandipan@linux.vnet.ibm.com, jolsa@kernel.org, naveen.n.rao@linux.vnet.ibm.com, hpa@zytor.com, mingo@kernel.org Reply-To: tglx@linutronix.de, acme@redhat.com, naveen.n.rao@linux.vnet.ibm.com, hpa@zytor.com, linux-kernel@vger.kernel.org, sandipan@linux.vnet.ibm.com, jolsa@kernel.org, mingo@kernel.org In-Reply-To: <20180312124450.30371-1-sandipan@linux.vnet.ibm.com> References: <20180312124450.30371-1-sandipan@linux.vnet.ibm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf test: Fix exit code for record+probe_libc_inet_pton.sh Git-Commit-ID: 10f354a36f9a9aa1b8bffe0abc1cd43822a85bcd X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 10f354a36f9a9aa1b8bffe0abc1cd43822a85bcd Gitweb: https://git.kernel.org/tip/10f354a36f9a9aa1b8bffe0abc1cd43822a85bcd Author: Sandipan Das AuthorDate: Mon, 12 Mar 2018 18:14:50 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 16 Mar 2018 13:56:31 -0300 perf test: Fix exit code for record+probe_libc_inet_pton.sh This fixes record+probe_libc_inet_pton.sh from always exiting with code 0 and making the test pass even if the perf script output does not match the expected pattern. The issue can be observed if this test is run with the verbose flags as shown below: 60: probe libc's inet_pton & backtrace it with ping : ... ping 19602 [006] 16988.413767: probe_libc:inet_pton: (7fff9a2c42e8) 1842e8 __GI___inet_pton (/usr/lib64/libc-2.26.so) 130db4 getaddrinfo (/usr/lib64/libc-2.26.so) FAIL: expected backtrace entry 3 ".*\(.*/bin/ping.*\)$" got "" test child finished with 0 ... probe libc's inet_pton & backtrace it with ping: Ok Signed-off-by: Sandipan Das Cc: Jiri Olsa Cc: Naveen N. Rao Fixes: e07d585e2454 ("perf tests: Switch trace+probe_libc_inet_pton to use record") Link: http://lkml.kernel.org/r/20180312124450.30371-1-sandipan@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh index 52c3ee701a89..1ecc1f0ff84a 100755 --- a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh +++ b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh @@ -47,7 +47,10 @@ trace_libc_inet_pton_backtrace() { [ -z "${expected[$idx]}" ] && break done - rm -f $file + # If any statements are executed from this point onwards, + # the exit code of the last among these will be reflected + # in err below. If the exit code is 0, the test will pass + # even if the perf script output does not match. } # Check for IPv6 interface existence