Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp173255rdh; Thu, 23 Nov 2023 00:02:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGkQXLBWtoM8d0pfxwu0TWS6lWJo9QZepxHfalyrlVxwWTHRPwkN+iE/BRoSSYxA+3JCSIz X-Received: by 2002:a17:903:22cf:b0:1cf:696b:1a7f with SMTP id y15-20020a17090322cf00b001cf696b1a7fmr5293678plg.0.1700726523503; Thu, 23 Nov 2023 00:02:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700726523; cv=none; d=google.com; s=arc-20160816; b=YYOaRvfTZyNjsXnfSbdh2wYbB+SG71kborfLJd3Hzt9Q5C6UXw8ZI0lvfFskyKz/Mo 32Q9nL48Fs4l7PdGkQ04qSXwbckcCFfEVgvkeDwU5pmxjfPz100qk6Kai8Ph4/m8FNVM sUXKibA/aY7GNudlaKA6dm5kxKyTP3d+hudvuF2IfjGtebee9eB6zDEdQ46DyHLUB6kW LSjozhaKhFN1TJAksVWp2d0kSXlADuzQInH1OAl9QZk9hsOa8Yfrm6A2tV06K2vrU40K beEgYMeT/llURQ6a9JtgdkYO4ruHffBBbwd9jtb5EdVuGlE8TxbKArQ5Vc9nwWqE8P9T wqyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kem3D6pXNBFasgNu3bYfGuXi+aOlg98cmmkZLIjLT9Q=; fh=TPQr4nff5QO7OKSg4AL08iZb9B1RwOBx3bV3jWC0cDE=; b=DoImbqKAPafeMiIRNBBNzg7QkvgbGj7/BP4fHqAmRCM3yqMl84yZNmmjW1VhR+SCG0 rpaeETTYKsushUHqaM1hGSnEDnnLgclEYqxWOB2mzEpxqnirOrzV4W3HFpFzg9g9Xbt5 7T/y94R89rNqEtC6dheWjy35QX2mrgTg6ZZfn1o8g1qJneN8WNZBPDYixkowbdXhEPij eyApwjKO/mSsyFYbscMWU5nKGnDB0iJpnGdMhK34jF4fNLKpf8+1l01FTjeaPBcyGLQz XVRKoHNK9PqNrDvsIB9TmL1X1Ecs+b6V8O1xekOMM7hwCCQHpnMzapjtfNFbFptyc9jU dqEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=e+0xxbMr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id f7-20020a17090274c700b001cf639e5bbdsi638527plt.270.2023.11.23.00.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 00:02:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=e+0xxbMr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 14C578089A19; Thu, 23 Nov 2023 00:00:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344957AbjKWH7u (ORCPT + 99 others); Thu, 23 Nov 2023 02:59:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344901AbjKWH7Z (ORCPT ); Thu, 23 Nov 2023 02:59:25 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79C12D40; Wed, 22 Nov 2023 23:59:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700726372; x=1732262372; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6i1yfJdZ3uedWfOmXBTKC5wUpcQHqTQufb6AFjSj/ic=; b=e+0xxbMrv78teOAI1e5ReGpXPnq1x1NSlR0NLkjuzGWfCbYtHgDnPsgk Uu32rSxx/NFlHoIMBYcYEpM99GusyuCaOwaCC2woLH1+A4acZb4V8QJQg ybiI5h5qgIFe/7cQmo2dQmOUJl2YKHloOdxDkcnjki7QkGNAVy3IASNu/ s2106uh6TTqxLjyRIiBMe07w6xG2KgKQaPNBDKxF+EJdYHJ753JjGsf0o v/3LnROm3dPxTXl/3F3kvQ/XkMJO7PJ5Cj8PCPd5bJeBgxWa32g1szUeZ 59xTkCEe+Leo8kY7DFczvgHw7/qlizjHyXkNy3WlwafWcAdUSwCfCbfC1 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="396126439" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="396126439" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2023 23:59:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="8764993" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.41.107]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2023 23:59:25 -0800 From: Adrian Hunter To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Ian Rogers , James Clark , German Gomez , Leo Yan , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH 8/8] perf tests: Skip data symbol test if buf1 symbol is missing Date: Thu, 23 Nov 2023 09:58:48 +0200 Message-Id: <20231123075848.9652-9-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231123075848.9652-1-adrian.hunter@intel.com> References: <20231123075848.9652-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Thu, 23 Nov 2023 00:00:18 -0800 (PST) perf data symbol test depends on finding symbol buf1 in perf, and fails if perf has been stripped and no debug object is available. In that case, skip the test instead. Example: Before: $ strip tools/perf/perf $ tools/perf/perf buildid-cache -p `realpath tools/perf/perf` $ tools/perf/perf test -v 'data symbol' 113: Test data symbol : --- start --- test child forked, pid 125646 Recording workload... [ perf record: Woken up 3 times to write data ] [ perf record: Captured and wrote 0.577 MB /tmp/__perf_test.perf.data.Jhbdp (7794 samples) ] Cleaning up files... test child finished with -1 ---- end ---- Test data symbol: FAILED! After: $ tools/perf/perf test -v 'data symbol' 113: Test data symbol : --- start --- test child forked, pid 125747 perf does not have symbol 'buf1' perf is missing symbols - skipping test test child finished with -2 ---- end ---- Test data symbol: Skip Signed-off-by: Adrian Hunter --- tools/perf/tests/shell/test_data_symbol.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/perf/tests/shell/test_data_symbol.sh b/tools/perf/tests/shell/test_data_symbol.sh index e50e54e94f6f..3dfa91832aa8 100755 --- a/tools/perf/tests/shell/test_data_symbol.sh +++ b/tools/perf/tests/shell/test_data_symbol.sh @@ -8,6 +8,9 @@ shelldir=$(dirname "$0") # shellcheck source=lib/waiting.sh . "${shelldir}"/lib/waiting.sh +# shellcheck source=lib/perf_has_symbol.sh +. "${shelldir}"/lib/perf_has_symbol.sh + skip_if_no_mem_event() { perf mem record -e list 2>&1 | grep -E -q 'available' && return 0 return 2 @@ -15,6 +18,8 @@ skip_if_no_mem_event() { skip_if_no_mem_event || exit 2 +skip_test_missing_symbol buf1 + TEST_PROGRAM="perf test -w datasym" PERF_DATA=$(mktemp /tmp/__perf_test.perf.data.XXXXX) ERR_FILE=$(mktemp /tmp/__perf_test.stderr.XXXXX) -- 2.34.1