Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp512317rdb; Tue, 5 Dec 2023 11:22:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxYM+GuJpOm7CKb0mqV0CX7b5ljmOHqN2M3n0OYUf+TzQGsavi/EqM5spou+YJSmqgvdnv X-Received: by 2002:a17:903:11c4:b0:1cf:f3a0:3c8e with SMTP id q4-20020a17090311c400b001cff3a03c8emr6742484plh.28.1701804173027; Tue, 05 Dec 2023 11:22:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701804173; cv=none; d=google.com; s=arc-20160816; b=MsUePLIRRnxgRYxLxZr02VsfHF+tYA147JNZIVP8L6hRmUzInLnPbgN4PDIvA7UKDY brhXySe1f6nvrYfsi+BCfZ94ysyrb3jgGf6+sivO7loZk0qEUihfVmuU6+jXlM5MfuhB qEivMf4bl3MPxQ7Z0UxRKJFGVke48NzuDlzFhi+3keIRKaoR/tc0kxAUdMVRBC6uyDmJ aKruYFJAaiRQRfuEFf5MLsnHevgpOpLCFpzy0YgmTrKZgw/GSetkKh0Z3cwgGvckUqM/ yPkRE1DbB9+UeA/+dWN2HPDLDijw2+ubWH0ylagg+7WP0lyajGPDLlkST7iepUCg2vjy J+wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=en3DlNnai46xh2bzAT8aIB78LFMsx6mQZaroqhxpUf4=; fh=GwvtQzA2Oy67sjAj3KkDmmeRTQc7moKq7PHJ1BKOz9g=; b=ph0kGZ/iG3yFUL4LW9X3FW/kaiX8lKl/sqLiLfDD9j7awzdRi5A+sepPtBPIeJ+NVU cYnoZmiCvRMyYNWajy4rp2vJ2w7lNds6Cg+z23iVFfgseEv18Dg0svpy3GhV1YXZ16oC kwLullJMIzU1mKtd/fQ/jMvSqJNS4NYeVPCbbqNF9wz0Kpj10RtcfLJJsb/qubhvS9xH xi+tSECr2+kYnpj+OBMOlOqQC5gFL7Lmw3UoOHbzWX6MsQRxihBaZZWJu5jUIn7xlQ+B emlOh+5gzQL2Brbn6hGhXBCAo8xtTnMDpveYruaUS6W8+enzWTriIbumB3tzQx+q5UEn XY3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fsd1KBlS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id i18-20020a170902c95200b001cfec9dcd7fsi2357187pla.408.2023.12.05.11.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 11:22:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fsd1KBlS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1BC6A80657CD; Tue, 5 Dec 2023 11:22:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345549AbjLETWa (ORCPT + 99 others); Tue, 5 Dec 2023 14:22:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235005AbjLETW0 (ORCPT ); Tue, 5 Dec 2023 14:22:26 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BDE2D4D; Tue, 5 Dec 2023 11:22:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701804149; x=1733340149; h=message-id:date:mime-version:subject:to:references:from: in-reply-to:content-transfer-encoding; bh=pzyZMQAeOzsTgEO8GOSM7n0lSMGXAXy5xmTZZbwfqRs=; b=fsd1KBlSKTG8fyyQJP9IiQHu8A7ngFSWF5XdEKQ/bAxnEoRHdwf+pKhV Cm7Dci6PiugGqyzK/XhHbDvj2Q/bumRkBmDFZGTpMBwEFraDGGOWTJb1w SlzU+7t/Umranimnk3ntovIacSpaVJz1jXboJX5qwm3LeEiGh70koQlHd ejeV00OirzwcRHY3t9BL0GPResyl8Wfo4kzICiJmQmnrz5QM7oZfQQyrL NTiRMsvt0+vEq4WdqcNcVaWOCWVBjGhMWZ3aOiWnkC/hmD4qxVQHaQWly 3fitKm4s86cVJPNmg9L3nTF/Buqljs25IldyXaMEWIYhWdI7wNRe6gKUh g==; X-IronPort-AV: E=McAfee;i="6600,9927,10915"; a="785701" X-IronPort-AV: E=Sophos;i="6.04,253,1695711600"; d="scan'208";a="785701" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2023 11:22:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10915"; a="805382148" X-IronPort-AV: E=Sophos;i="6.04,253,1695711600"; d="scan'208";a="805382148" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.252.46.77]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2023 11:22:19 -0800 Message-ID: Date: Tue, 5 Dec 2023 21:22:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] perf test: Skip diff test if test_loop is missing Content-Language: en-US To: Ian Rogers , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231205164924.835682-1-irogers@google.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki In-Reply-To: <20231205164924.835682-1-irogers@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 05 Dec 2023 11:22:51 -0800 (PST) On 5/12/23 18:49, Ian Rogers wrote: > The diff test depends on finding the symbol test_loop in perf and will > fail if perf has been stripped and no debug object is available. In > that case, skip the test instead. > > Signed-off-by: Ian Rogers > --- > tools/perf/tests/shell/diff.sh | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/tools/perf/tests/shell/diff.sh b/tools/perf/tests/shell/diff.sh > index 213185763688..14b87af88703 100755 > --- a/tools/perf/tests/shell/diff.sh > +++ b/tools/perf/tests/shell/diff.sh > @@ -9,8 +9,15 @@ perfdata1=$(mktemp /tmp/__perf_test.perf.data.XXXXX) > perfdata2=$(mktemp /tmp/__perf_test.perf.data.XXXXX) > perfdata3=$(mktemp /tmp/__perf_test.perf.data.XXXXX) > testprog="perf test -w thloop" > + > +shelldir=$(dirname "$0") > +# shellcheck source=lib/perf_has_symbol.sh > +. "${shelldir}"/lib/perf_has_symbol.sh > + > testsym="test_loop" > > +skip_test_missing_symbol ${testsym} > + > cleanup() { > rm -rf "${perfdata1}" > rm -rf "${perfdata1}".old The verbose output in the error case could also be tweaked. Before patch: $ strip tools/perf/perf $ tools/perf/perf buildid-cache -p $(realpath tools/perf/perf) $ tools/perf/perf test -v 'diff test' 85: perf diff tests : --- start --- test child forked, pid 8621 Basic two file diff test ./tools/perf/tests/shell/diff.sh: 51: [: Workload: unexpected operator ./tools/perf/tests/shell/diff.sh: 56: [: Workload: unexpected operator Basic two file diff test [Failed diff] Basic three file diff test ./tools/perf/tests/shell/diff.sh: 73: [: Workload: unexpected operator ./tools/perf/tests/shell/diff.sh: 78: [: Workload: unexpected operator ./tools/perf/tests/shell/diff.sh: 83: [: Workload: unexpected operator Basic three file diff test [Failed diff] test child finished with -1 ---- end ---- perf diff tests: FAILED! After patch: $ tools/perf/perf test -v 'diff test' 85: perf diff tests : --- start --- test child forked, pid 8853 perf does not have symbol 'test_loop' perf is missing symbols - skipping test test child finished with -2 ---- end ---- perf diff tests: Skip and with symbols: $ tools/perf/perf test -v 'diff test' 85: perf diff tests : --- start --- test child forked, pid 10122 103e20-103e60 g test_loop perf does have symbol 'test_loop' Basic two file diff test Basic two file diff test [Success] Basic three file diff test Basic three file diff test [Success] test child finished with 0 ---- end ---- perf diff tests: Ok Tested-by: Adrian Hunter