Received: by 10.213.65.68 with SMTP id h4csp29173imn; Mon, 12 Mar 2018 05:46:43 -0700 (PDT) X-Google-Smtp-Source: AG47ELu1YWdNR752s/9GA2HFNzLrk8/Neh9gWDSbb6dIP1ed8h3Qs6KSovuIcPnXvolAxjXwMBWD X-Received: by 10.99.116.67 with SMTP id e3mr6437903pgn.265.1520858803043; Mon, 12 Mar 2018 05:46:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520858803; cv=none; d=google.com; s=arc-20160816; b=rglg09lOuLrgGobUoG/4zLfaGo2mbxDSnvibaNUuWUtuul6739GURMO+4X4+SQaNWH PsZD29/ZMVm6oBw7zVRW/b9IGTkwO8HXdSZYoOu6Gz5tbizaBscvx2FVENj6vJZIcl/U GrxkHRlqQqiQqAIYMqhApw60qAG1B0PFnrayn19CDGvQu/E33L8L1qqz3qiSvQWn9JaN HBPKNXF5lH5/tfAqEfRLf+7qdT0DjABzoHYSxXEnl7htPhC3mPJwg7/aj25B9S08ZgoC UzHVyVBS67KhaOYIrhN9LP4NOlw6OP94rT9Q7BCoTHLHjIlZuZhuPNG4WBBkXN7A7nlE 6EDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=rpD+DsjFdJ1KznVLJvaVSv4g4sGBH4owLuIQyNIjUvA=; b=snfxsnSlMs0/Z29j/mCODRRmW4evKkCFqQbiJnEXd6hYJemJ60MsmPmfAMq0uzS2QX lFr6EKrqTdOL3W6nkDEPeIz6l7uZRCWdf5D3rrpci/V3ZILvB7jFNqPNDdTD960X1M+F O5rSK8x6tVibwy1HNba8Y4wssYBANHyPGPag4CKEkOvHbFNMfGI5Gs4AuXht9+9AnlXI kI8XH4L8uf+FhgVlMxcw8hKu8Oha5H1ttThd3jf2YSiRgce1iRSYJIJAo+Vi5ZKiEPSX UELQs5QEPa+ePGuP7go2yasadDgSfth/hHfFWaMNvzhFewcDLjkf5ZQ/fHU0PG7xJHhy BHmA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a13si4884346pgt.572.2018.03.12.05.46.28; Mon, 12 Mar 2018 05:46:43 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751377AbeCLMo7 (ORCPT + 99 others); Mon, 12 Mar 2018 08:44:59 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41422 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751232AbeCLMo6 (ORCPT ); Mon, 12 Mar 2018 08:44:58 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2CCiAl6107347 for ; Mon, 12 Mar 2018 08:44:58 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gnpr4g09c-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Mon, 12 Mar 2018 08:44:57 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 12 Mar 2018 12:44:55 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 12 Mar 2018 12:44:52 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2CCiq6W46792810; Mon, 12 Mar 2018 12:44:52 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 848D611C05B; Mon, 12 Mar 2018 12:37:32 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CA0CF11C050; Mon, 12 Mar 2018 12:37:31 +0000 (GMT) Received: from localhost.localdomain (unknown [9.40.193.84]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 12 Mar 2018 12:37:31 +0000 (GMT) From: Sandipan Das To: acme@kernel.org, jolsa@kernel.org Cc: linux-kernel@vger.kernel.org, naveen.n.rao@linux.vnet.ibm.com Subject: [PATCH] perf test: Fix exit code for record+probe_libc_inet_pton.sh Date: Mon, 12 Mar 2018 18:14:50 +0530 X-Mailer: git-send-email 2.14.3 X-TM-AS-GCONF: 00 x-cbid: 18031212-0016-0000-0000-000005307073 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031212-0017-0000-0000-0000286D9D98 Message-Id: <20180312124450.30371-1-sandipan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-12_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803120146 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Fixes: e07d585e2454 ("perf tests: Switch trace+probe_libc_inet_pton to use record") Signed-off-by: Sandipan Das --- 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 -- 2.14.3