Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4187950imm; Fri, 18 May 2018 00:25:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrLoOHPiL7HlH7lVAC1J+Hw3MtEEux+xoeZotC2s6K7G94kWvo1+/U9Y7Gz8mNnj5QR5P9g X-Received: by 2002:a17:902:7283:: with SMTP id d3-v6mr8527736pll.192.1526628301742; Fri, 18 May 2018 00:25:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526628301; cv=none; d=google.com; s=arc-20160816; b=P7i/qn4jIpxln/HxafGOCFC0Ou8J+48YEbwURmyuKymKFQqwhPCaLI1PnzhU+0b8FO w6vhgF9cDeohmwpE7xkoGG+K2ctiOsyfz67t7Q7dsd4igSpubK48LldbWEzbgbDO94DR H2RE/GhbWUUYon2xx0nQV7TtgE9FBZnIMl1wUN9OlRL1r2y9mOWnt9vmplAcYySxfEcA 41BGGbopEQKQt1jyd2efnyjVaH3uDa5KaAw2LrSccTDekqJSkl7FLJ1ZAKmNZ/fu883H cgmqYXZUcpRXa/B8lTaNybAm3GxG2dglwLUhOhhbGvR/qHY+dVIHqrkaqOCCSme/Jfhd LKhQ== 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=rXrsrx4T8m/KC6uyaajs3S0hm1UNGAU4nb5Ls5MBGEQ=; b=J4w4Gp+0uceLCHYhxizeIlAwwnVb7tADB67aX88e7N8t1KbXua0nJDeDx2P+Bx7Dww uuLdEusPRFrIZ8L2S2ZZ2H2800zmVL2ix4m1nSMco6DXTps08zUpb41phoSTAsAQWDF4 Ecq89IwjcW29v0Ju0CyZFwH4NHmGlhoOwsTRoPJ0BnLbIwcxuvYwabN67BiRcegRHr/g or3E1bT8rgcma180ZarCVeJnQXEKpxDJrHFUyq4yRnzngDOAvpQRYA7Pog9Xw7zWJ8y2 uSN9HF0CqG+KN+oE6T4L3s5Z6sL1Ji0Txbj8q1z2ty7P+2xNhl7PljV2yQn41vD426jM 0btw== 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 d8-v6si5640340pgt.630.2018.05.18.00.24.47; Fri, 18 May 2018 00:25:01 -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 S1752199AbeERHY2 (ORCPT + 99 others); Fri, 18 May 2018 03:24:28 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:47712 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751320AbeERHY0 (ORCPT ); Fri, 18 May 2018 03:24:26 -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 w4I7OEj3104025 for ; Fri, 18 May 2018 03:24:26 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2j1p4rrvwa-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 18 May 2018 03:24:26 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 18 May 2018 08:24:23 +0100 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; Fri, 18 May 2018 08:24:21 +0100 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4I7OKej393556; Fri, 18 May 2018 07:24:20 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ABEFE42049; Fri, 18 May 2018 08:15:09 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2A0C142052; Fri, 18 May 2018 08:15:08 +0100 (BST) Received: from tpad450.in.ibm.com (unknown [9.79.214.34]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 18 May 2018 08:15:07 +0100 (BST) From: Sandipan Das To: acme@kernel.org, jolsa@redhat.com Cc: linux-kernel@vger.kernel.org, ravi.bangoria@linux.ibm.com, naveen.n.rao@linux.vnet.ibm.com, tmricht@linux.ibm.com Subject: [PATCH] perf tests: Fix regex for record+probe_libc_inet_pton.sh Date: Fri, 18 May 2018 12:54:17 +0530 X-Mailer: git-send-email 2.13.6 X-TM-AS-GCONF: 00 x-cbid: 18051807-0008-0000-0000-000004F7CDB6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051807-0009-0000-0000-00001E8C47A6 Message-Id: <20180518072417.1498-1-sandipan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-18_04:,, 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-1805180081 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This test currently fails because the regular expressions for matching the output of perf script do not consider the symbol offsets to be part of the output. The symbol offsets are seen because of the default behaviour introduced by commit 4140d2ea74b3 ("perf script: Show symbol offsets by default"). Before applying this patch: # perf test -v "probe libc's inet_pton & backtrace it with ping" 62: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 30389 ping 30406 [002] 307144.280983: probe_libc:inet_pton: (7f4117adf220) 7f4117adf220 __GI___inet_pton+0x0 (/usr/lib64/libc-2.25.so) FAIL: expected backtrace entry 1 ".*inet_pton[[:space:]]\(/usr/lib64/libc-2.25.so|inlined\)$" got "7f4117adf220 __GI___inet_pton+0x0 (/usr/lib64/libc-2.25.so)" test child finished with -1 ---- end ---- probe libc's inet_pton & backtrace it with ping: FAILED! After applying this patch: # perf test -v "probe libc's inet_pton & backtrace it with ping" 62: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 30539 ping 30556 [003] 307254.313217: probe_libc:inet_pton: (7fe19ab10220) 7fe19ab10220 __GI___inet_pton+0x0 (/usr/lib64/libc-2.25.so) 7fe19aad5ebd getaddrinfo+0x11d (/usr/lib64/libc-2.25.so) 56351e3c1c71 main+0x891 (/usr/bin/ping) test child finished with 0 ---- end ---- probe libc's inet_pton & backtrace it with ping: Ok Signed-off-by: Sandipan Das --- tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 ee86473643be..650b208f700f 100755 --- a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh +++ b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh @@ -16,18 +16,18 @@ nm -g $libc 2>/dev/null | fgrep -q inet_pton || exit 254 trace_libc_inet_pton_backtrace() { idx=0 expected[0]="ping[][0-9 \.:]+probe_libc:inet_pton: \([[:xdigit:]]+\)" - expected[1]=".*inet_pton[[:space:]]\($libc|inlined\)$" + expected[1]=".*inet_pton\+0x[[:xdigit:]]+[[:space:]]\($libc|inlined\)$" case "$(uname -m)" in s390x) eventattr='call-graph=dwarf,max-stack=4' - expected[2]="gaih_inet.*[[:space:]]\($libc|inlined\)$" - expected[3]="(__GI_)?getaddrinfo[[:space:]]\($libc|inlined\)$" - expected[4]="main[[:space:]]\(.*/bin/ping.*\)$" + expected[2]="gaih_inet.*\+0x[[:xdigit:]]+[[:space:]]\($libc|inlined\)$" + expected[3]="(__GI_)?getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\($libc|inlined\)$" + expected[4]="main\+0x[[:xdigit:]]+[[:space:]]\(.*/bin/ping.*\)$" ;; *) eventattr='max-stack=3' - expected[2]="getaddrinfo[[:space:]]\($libc\)$" - expected[3]=".*\(.*/bin/ping.*\)$" + expected[2]="getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\($libc\)$" + expected[3]=".*\+0x[[:xdigit:]]+[[:space:]]\(.*/bin/ping.*\)$" ;; esac -- 2.13.6