Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp177506iog; Fri, 17 Jun 2022 01:12:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t5ricWiVHWCV5CThM2yU0kVGKoIQnEH5fTXRTfzMz8i39/11NXRLyvXDR3pnmEfCVAGL6C X-Received: by 2002:a17:902:d502:b0:168:faa0:50a0 with SMTP id b2-20020a170902d50200b00168faa050a0mr8442523plg.142.1655453571593; Fri, 17 Jun 2022 01:12:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655453571; cv=none; d=google.com; s=arc-20160816; b=CPZ7c9qADusiT09vJPj3A/8dvEtHcJv6CHDeBycSOlUScdVYoQNkjO1dmf5e73rRLH 6hK1DkD2En1NY2w6FbDS6H20q1ZwDq/hVvGGjRU7Wao/593NwylfWx5VOEcIuSy2e7uZ 82Rd2/PftBN7+mYXcjG2l4/H6Amfylvuf4pSrD5xlBZ1YYLA8poexwB98HTPEmUjks7N KMEr4RzpGf5tEIH3ocVsfFIKrhTrJvBTRKib/haf7iOP4501Q00h/tzUeR6pVqIs/cjv k2yyTR10AFHOMVgtrWwnCqcibpSwe1Jnq7uqP+IQ6hc7MqkxH1VuauPuTX6hh5nBJ4e6 LIug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=UN5wKNbB+gVz0MX2GTcg6Rw1lsEc1tgfAUNNFpXQz3Y=; b=Ux5tUU4dB1nIr3JbYgF2nL/J+eyhTIi2s03Vyu6hM35xwui1MscUkNrwlQ9pQyyv2f VmAdFnalBxFLFxX5wEFUBrC1JwFXccPeVh+OQ9eOVnyBDclmif1vIrCnscCQIRtdxEQL CaV7Qn13732BTXjPWn6VJ44kaWX822l5wBAyefRbqruT1fwBZtNvoHgKJYx5bJJrJ0Aa tqBpHoDtq+VXbgu1Nw0DEOEI1n3HAxpERDWnlXtRnjRLi39bFrn1PRTPVgja4PbhzcwU W/e2hpftXp13FabnO7BOT6P37bBBTiO/wqRVO02EtjVyNUOLxYzVT8TjOaXQr5HuzL8b o+Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mswm1WvM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i196-20020a639dcd000000b004089d1b3912si5528310pgd.204.2022.06.17.01.12.37; Fri, 17 Jun 2022 01:12:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mswm1WvM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380660AbiFQHpZ (ORCPT + 99 others); Fri, 17 Jun 2022 03:45:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231145AbiFQHpY (ORCPT ); Fri, 17 Jun 2022 03:45:24 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B05C674F5 for ; Fri, 17 Jun 2022 00:45:23 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id q140so3399347pgq.6 for ; Fri, 17 Jun 2022 00:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=UN5wKNbB+gVz0MX2GTcg6Rw1lsEc1tgfAUNNFpXQz3Y=; b=Mswm1WvMrZVDLXyE4nWVJOH7IqmhFUOXGqh300G317e18kZuX1t4wJKQ2gBsonvfRB YwdilqV6fdJSxYgeH95yKrzKmZ+p8GxvKPDteJH6dT01eS4vNcYW5SAvLZo7qyUzCRFQ rZd2R40wgGsWGAcL5uCDewtjtGs5nwyODjBC138U6EF1DHtXb/Wq0m4XsdRV8LZ1QiP8 s8r3oXWvMtj2bQmNu8OmrvHIIf2XrLv8ImrkQTtPArxqHg+iRSoIFlQZFbP2CJKEovR3 cvzVH57cSbZinlmY8RX79059QZAiM7gflroH52frgUDpVctvoseuMzXnvuEEPNUY/5Ng IPkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=UN5wKNbB+gVz0MX2GTcg6Rw1lsEc1tgfAUNNFpXQz3Y=; b=zxoY7b2T2F0BwVgMV6CU2yNJ7IV5lLHHoL3q5hJRul+oYmA/tRdjAMqcC8k6K0z7UJ Z3bV4z3cMGJMujrp8iv8ZW2rOvJfBQsHcbBTylShFy7lxJBCnSa34ZhW0ZMwb1VOZhJc 3+7FYlrImFQmmGTxl6wp033bRGyt9ObakcqaAw24odprCJwBAfdUo/ZTmgq2XZGQQrCT fNX9X48HUIx30gSgwJZDrXWYqWAOdasaUyjJ35o0EnYQYCRsZD0oosP2GmwU+cBwbWCe gXy9WfXN9x/42nPXLcVpMI6z1Hq0Vrs3nNAigLf3aoRqlmEo9cbNCpqoavTikW3QV5Q+ 7/cg== X-Gm-Message-State: AJIora/XxswRCy1caZenM4A6mvstNKWwOQdnFNnO4UkrGEhGm+D7foNQ LR/CjBZ6xBo9AEZCkaj8QPcLbvf09Va4Gdm0 X-Received: by 2002:a05:6a00:218c:b0:51c:c64:3f6a with SMTP id h12-20020a056a00218c00b0051c0c643f6amr8524810pfi.50.1655451922717; Fri, 17 Jun 2022 00:45:22 -0700 (PDT) Received: from leoy-ThinkPad-X240s (n058152077154.netvigator.com. [58.152.77.154]) by smtp.gmail.com with ESMTPSA id c5-20020a17090ab28500b001e88c4bb3dcsm4945443pjr.25.2022.06.17.00.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jun 2022 00:45:22 -0700 (PDT) Date: Fri, 17 Jun 2022 15:45:17 +0800 From: Leo Yan To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Peter Zijlstra , LKML , Ian Rogers , linux-perf-users@vger.kernel.org, John Garry , Will Deacon , James Clark , Mike Leach , German Gomez Subject: Re: [PATCH v2] perf test: Add ARM SPE system wide test Message-ID: <20220617074517.GB45710@leoy-ThinkPad-X240s> References: <20220616230546.1390813-1-namhyung@kernel.org> <20220617073840.GA45710@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220617073840.GA45710@leoy-ThinkPad-X240s> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 On Fri, Jun 17, 2022 at 03:38:40PM +0800, Leo Yan wrote: > Hi Namhyung, > > On Thu, Jun 16, 2022 at 04:05:46PM -0700, Namhyung Kim wrote: > > [...] > > > +arm_spe_system_wide_test() { > > + echo "Recording trace with system-wide mode $perfdata" > > + perf record -o ${perfdata} -e arm_spe// -a \ > > + -- dd if=/dev/zero of=/dev/null count=100000 > /dev/null 2>&1 > > + > > + if [ $? != 0 ]; then > > + arm_spe_report "SPE system-wide testing" 2 > > + return > > + fi > > I am awared the root permission issue after I saw German's suggestion. > > If the snapshot test is passed, no matter the system wide test is passed > or not, we will always return 0 for 'passed' result. But we might miss > to capture the system-wide testing failure. > > How about use 'dummy' event to verіfy the root permission? > (actually I referred to intel-pt test): > > perf record -o ${tmpfile} -B -N --no-bpf-event -e dummy:u -a true 2>&1 >/dev/null Sorry for typo, s/tmpfile/perfdata/ > if [ $? != 0 ]; then > arm_spe_report "SPE system-wide testing" 2 > return > fi > > perf record -o ${perfdata} -e arm_spe// -a \ > -- dd if=/dev/zero of=/dev/null count=100000 > /dev/null 2>&1