Received: by 10.213.65.68 with SMTP id h4csp164193imn; Mon, 12 Mar 2018 09:55:12 -0700 (PDT) X-Google-Smtp-Source: AG47ELsOREKAN2UMVvA2nOuH7gHXsW4CNnSJNMkVwduLEcFKpIhKU7MuJdjENFlwf878cNmAAPqK X-Received: by 2002:a17:902:a9c3:: with SMTP id b3-v6mr8670959plr.190.1520873712545; Mon, 12 Mar 2018 09:55:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520873712; cv=none; d=google.com; s=arc-20160816; b=AKtQ/2j1hcb0hTiBs61h8NRvz9efkDDANHPqmPUJPXEVaqQCsqqpHQ8KHsPiwT2aDp QtmZJNm+x2pTgCicR1sKlmiEyvTFDsm+Hy7z+wEdMR8HSR6CvSroGUfI1sKtKDXElKUl eNKf5MX5UhwO4PyZ9SZCZ6XAoPJlHRBVx4bIi2ZJwbCsJkv2ygFNIfcSumSsBsQfAMbc /9f/QC8lQTbc4tOXPU6Oc1ijuXWW7tVH5s2YkeGDSVpSqEzVf1zyOY7EE8eGWFRNkny2 9yV5g3mVTVIwt5bAc+ijjTQNxPWCwEcoQOLBmuyIK7QmF2n3HxrIVcWFT+JDuvqYCmaC I3Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject:arc-authentication-results; bh=W/n3QGhyP4lgg4iJxFA9PWrLRK2Bx6AUSZQrsdHH3l0=; b=BQ29fykxPVwTQ1ba2P+axQxV0opnPpCLaS/0jUH6H1DGkyFwcw96T3Lddxc6YPfTAN FZWlaz0jvoohtzHGt9x9pGl0AtmyvY23nleh8qoV/jxduzpCYUvEmgL3Q8unfAbTpSg3 LrU/rL5FU/2rnLCBGs1yZsO+sKHGhCxMZ5/6jYNl9FbswaXy0+e9pLzmP1JJuzy12Vg3 YyLD/DDV7GhKhZRXLXcXKR680wECupPrQNksJXNU0W7psJm7Bnp13wZeVTCl6sCpl7+A uDEH17BpM6zMb786QZT+5NYuIKSFYH9+BfLDof7awpWmxyRDRzdhrC4ONx3DWBSGvPzn KQfg== 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 w1-v6si1922478plz.710.2018.03.12.09.54.57; Mon, 12 Mar 2018 09:55:12 -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 S932495AbeCLQxh (ORCPT + 99 others); Mon, 12 Mar 2018 12:53:37 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37448 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751723AbeCLQxf (ORCPT ); Mon, 12 Mar 2018 12:53:35 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2CGoEQd110008 for ; Mon, 12 Mar 2018 12:53:35 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gnuh05uvg-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Mon, 12 Mar 2018 12:53:34 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 12 Mar 2018 16:53:32 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 12 Mar 2018 16:53:30 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2CGrTU4655670; Mon, 12 Mar 2018 16:53:29 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0449A11C04C; Mon, 12 Mar 2018 16:46:10 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2C35711C050; Mon, 12 Mar 2018 16:46:08 +0000 (GMT) Received: from [9.79.186.1] (unknown [9.79.186.1]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 12 Mar 2018 16:46:07 +0000 (GMT) Subject: Re: [PATCH] perf test: Fix exit code for record+probe_libc_inet_pton.sh To: Jiri Olsa Cc: acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, naveen.n.rao@linux.vnet.ibm.com References: <20180312124450.30371-1-sandipan@linux.vnet.ibm.com> <20180312130547.GD23111@krava> From: Sandipan Das Date: Mon, 12 Mar 2018 22:23:26 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180312130547.GD23111@krava> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18031216-0008-0000-0000-000004DB896E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031216-0009-0000-0000-00001E6EB871 Message-Id: <6cc6c692-2e54-d05f-5cd7-7301cfe6eebb@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-12_09:,, 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=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803120191 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/12/2018 06:35 PM, Jiri Olsa wrote: > On Mon, Mar 12, 2018 at 06:14:50PM +0530, Sandipan Das wrote: >> 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. > > right :-\ but we still need to delete that $file.. I assume it will > get delete by the 'rm -f ${file}' in the script main body? > > thanks, > jirka > > Yes, that deletes $file. -- With Regards, Sandipan