Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1105365imm; Fri, 29 Jun 2018 11:27:29 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKPa0O5ctJ5H5WhSoKEQ47vwinhaWrbntPWvsM1XFaKtM6dEbm6yA+UN63KyTQPPKZ7BNUE X-Received: by 2002:a17:902:46e:: with SMTP id 101-v6mr16238855ple.39.1530296849524; Fri, 29 Jun 2018 11:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530296849; cv=none; d=google.com; s=arc-20160816; b=R2Ky4f3hxye5pwkU7GdZ9yVExLJXUyaiHFB5beVFvQ5MXPnFmGej75+tDm5NCAa4E+ xhELU1tNDwowFlS/7GSv+H8wne9rCsEkxknvbJRM+q0SFVa9r+tOPUhhy37VXkceoReh Ix8/dhzXl1OM6sO9epio+dhPi0kCU2ez63JjI2vZUW2T/3/CNBYPkzgjDbSiDNXpFGyN Rn2qW+DCx47f2sjz4x0IijXTKyG8/FADwvr9HkCLzVEtG3iaNYi9ftOhIQy6crw7ssWJ mqn1zGcz7IrKkAC5MHwSOvgfOEU/98u8L+fP+ipCOt7m35HnYbqlD8L3pCJ9Rt6eQUH3 2DEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=iAt4umtAD68ksicyeV7CK0b/FQ6WU0xaosQVtCh5d5k=; b=xdyxz+4Q45z/Mzf9PA4kVAJ9pQHb21T/k4xuaUToSii6OYoafy1Lx9PmUqZ4ktWMo+ ktvoKNqRp9BaVDUX/JgTguLTKgt4jXiGgxcWK765YJXV++PZgT5ljptxFX+CpRWKh5Ah 4YUN2AKYdESnngxGXTTVE27HX+6n1tLVsARgG4WMJpZd6WLxenXSnB8EEilciqWDtwSc wJx+KcT361HMrP9+J6YjmzZSAoDJkI47Mz1kAgeZBqKp3GNr1vZ2qGYn61o1sVJS8Bps dtzouxoEabFPNszF7y8vCp5fy4nfopqHTu4cOPGFTfSsw2M/GlPg6bckgOCP1EsY4jag GbIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ILQx5rW1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1-v6si10953492pfk.166.2018.06.29.11.27.15; Fri, 29 Jun 2018 11:27:29 -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; dkim=pass header.i=@kernel.org header.s=default header.b=ILQx5rW1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755596AbeF2PRk (ORCPT + 99 others); Fri, 29 Jun 2018 11:17:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:47230 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbeF2PRj (ORCPT ); Fri, 29 Jun 2018 11:17:39 -0400 Received: from jouet.infradead.org (unknown [179.97.41.186]) (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 F1C3F27E8C; Fri, 29 Jun 2018 15:17:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1530285459; bh=PP0jiIMQKZk3z6o36X23OITjazyuAFSbyt+4yvU1Ass=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ILQx5rW13G7Qsz8TqONxu4g6tVBmc+9L1C3IDWliqVVFRqbobtzZX1d7MKPC7IOhE QdFfiRNKKi3jEa4XRdSSQ8Ak41rmgioAb4c6UDWnfTpwB7IkKnt+Dk+AAktS7YmwcB C5VGFUAQmZUNX/nCq3bLlu/urvaCyO3VMwV8unG4= Received: by jouet.infradead.org (Postfix, from userid 1000) id 1B87B1403D2; Fri, 29 Jun 2018 12:17:36 -0300 (-03) Date: Fri, 29 Jun 2018 12:17:36 -0300 From: Arnaldo Carvalho de Melo To: Li Zhijian Cc: peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, linux-kernel@vger.kernel.org, Sandipan Das , Thomas Richter Subject: Re: [PATCH] perf test record+probe_libc_inet_pton: expect [unknown] for ping as well Message-ID: <20180629151736.GA3593@kernel.org> References: <1530170160-4979-1-git-send-email-lizhijian@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1530170160-4979-1-git-send-email-lizhijian@cn.fujitsu.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jun 28, 2018 at 03:16:00PM +0800, Li Zhijian escreveu: > On system which has not installed debuginfo of iputils(ping) will fail like: > ~/lkp/linux/tools/perf$ sudo ./perf test ping -v I think that we should try to check if the required debuginfo package is installed and if so, expect the symbol resolution that takes place in that case. Other wise expect [unknown], this way we don't leave this test accepting almost anything in any case. - Arnaldo > 63: probe libc's inet_pton & backtrace it with ping : > --- start --- > test child forked, pid 4207 > ping 4224 [007] 3034121.295510: probe_libc:inet_pton: (7fedfccb2200) > 7fedfccb2200 __GI___inet_pton+0x0 (/lib/x86_64-linux-gnu/libc-2.23.so) > 7fedfcc7ad5e getaddrinfo+0xee (/lib/x86_64-linux-gnu/libc-2.23.so) > 55e3239a9f4d [unknown] (/bin/ping) > FAIL: expected backtrace entry 3 > ".*\+0x[[:xdigit:]]+[[:space:]]\(.*/bin/ping.*\)$" got "55e3239a9f4d [unknown] (/bin/ping)" > test child finished with -1 > ---- end ---- > probe libc's inet_pton & backtrace it with ping: FAILED! > > To be compatible with this system, expects [unknown] as well > > Fixes: 7903a7086723 ("perf script: Show symbol offsets by default") > CC: Sandipan Das > CC: Thomas Richter > Reported-by: kernel test robot > Signed-off-by: Li Zhijian > --- > tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 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 2630570..ebb6549 100755 > --- a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh > +++ b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh > @@ -22,12 +22,12 @@ trace_libc_inet_pton_backtrace() { > eventattr='call-graph=dwarf,max-stack=4' > 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.*\)$" > + expected[4]=".*(\+0x[[:xdigit:]]|\[unknown\])+[[:space:]]\(.*/bin/ping.*\)$" > ;; > *) > eventattr='max-stack=3' > expected[2]="getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\($libc\)$" > - expected[3]=".*\+0x[[:xdigit:]]+[[:space:]]\(.*/bin/ping.*\)$" > + expected[3]=".*(\+0x[[:xdigit:]]|\[unknown\])+[[:space:]]\(.*/bin/ping.*\)$" > ;; > esac > > -- > 2.7.4