Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp101285iog; Thu, 23 Jun 2022 23:37:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vU0oOkZSlZbNiPVU3EgN+T+qoGXhzlKCGCgtgwO3OMJeD/gCzOb11Xypxcnhw7Vv1duz7/ X-Received: by 2002:a05:6402:170b:b0:435:5d22:7cd7 with SMTP id y11-20020a056402170b00b004355d227cd7mr15629631edu.383.1656052658389; Thu, 23 Jun 2022 23:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656052658; cv=none; d=google.com; s=arc-20160816; b=ZTiKFNNaCkNJ6IdKJ3Tj5mhEcJLimAfWhGMQazyDZck8Vsr/oSCamc5yLpudK9klDP bUbQ8EHL9f6V9Lg80v4Zye2rEOaHDlq9YtCX4Ih1z13Rbs16Ku/IlLuJmp0+pLQ+9fRW 1+/L9JURO5559unZfYumsVqvq2utHjSCHEPUvkJj4GYzjA+lEGKTKsMQ9JX13kR7pTHA jb8gcQEzQG6z5ceJVjV4tFHgDfrX61MrkzkEkYBMiljLqX6jOlnzdyBnt1CE80xbf0Yn JKLix3jxFOrBjKmNIQvP/VG3fO3G2pBLu8a6Lvy6ZY3VUlKv78/+rNIYogH6g1MTc2SU CxBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=6WqrrWpRKB9V65oOhp3pDcTBLm+Dhfv43HWfieeklu4=; b=czTFFFz6Z2ugvPp5IqR16+HiQQO3HKnh44Lu2lrKOtpmgUhkDSlveAlB3z+beHON7e Y1eOZ/uolMVXjBt+eOsVe2zA26X50XsL2ehxt5sTedsHv6vxqBwzkcGFA2dHahQPnE4H 71l5QHsHL8PgYxfUWWpvsQWiftxXBqrXqbhlrCzBKsbXicqQYCUfNexK6RPN+d67xZk5 sHrPsIkU5AAtTGzE0B7kyJjMmr+MH/GLoKV8V6vDFp07sIQWMxoKua+yQzBrdYBiCgiK cdJOZqzlXDh7WIC8hsdr3kZSmAnUOlotnfIofpeY9b7KPhuH6t1yhrx6oSXKDrBsQBdD HZDw== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp37-20020a1709071b2500b00711d89b831esi1768044ejc.721.2022.06.23.23.37.13; Thu, 23 Jun 2022 23:37:38 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229821AbiFXGWj convert rfc822-to-8bit (ORCPT + 99 others); Fri, 24 Jun 2022 02:22:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229734AbiFXGWb (ORCPT ); Fri, 24 Jun 2022 02:22:31 -0400 Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC87429806; Thu, 23 Jun 2022 23:22:28 -0700 (PDT) Received: by mail-oi1-f181.google.com with SMTP id y77so2445467oia.3; Thu, 23 Jun 2022 23:22:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hSpectRvYq6DsCmRNXGz7AExKucd6LMcxFZxCsIXSBw=; b=d3VRDdf0tz5mufyW21DCkPvAyotsis8BuFh/syhtN3EKJTb7Oh9TWs3SQRUZlpQvfO orI0Fo2ZyLAzPhaXaVOa43/ICsAv+hT9WXs7e+4KudQzngOkJCwTA+ZqxvPVmT29Gb41 d+0mOrMZw3U5GHQouvWj4zgBF7ypdcvDJveWS+wd1rtZfu/zIcpoZH6NgDVOMmsBxWbK aD0qUdXjmNbydSDoYJTdcRigkfdgQFUCz3/HSjnWo8VW6pBxts/x+wEKUgO3Iv0dlVog kXh/ekJaEi+xX+rPLbHmSBBHxXbPDTctV4UYddLOiZF2BJId1lutG3pvsuD0gBhM0LHy rotw== X-Gm-Message-State: AJIora8pzEtVJYmfk2uGRgeQaucmvZvEMXz7Oc6qNqO/YBcgxolAtJG5 gCOoUcFnByCtjKjxw2k7XdY/8GWbr/UrPsgcaM8= X-Received: by 2002:a05:6808:1385:b0:32f:729e:4869 with SMTP id c5-20020a056808138500b0032f729e4869mr1030252oiw.5.1656051747907; Thu, 23 Jun 2022 23:22:27 -0700 (PDT) MIME-Version: 1.0 References: <20220616230546.1390813-1-namhyung@kernel.org> <20220617073840.GA45710@leoy-ThinkPad-X240s> <20220617074517.GB45710@leoy-ThinkPad-X240s> In-Reply-To: <20220617074517.GB45710@leoy-ThinkPad-X240s> From: Namhyung Kim Date: Thu, 23 Jun 2022 23:22:16 -0700 Message-ID: Subject: Re: [PATCH v2] perf test: Add ARM SPE system wide test To: Leo Yan Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Peter Zijlstra , LKML , Ian Rogers , linux-perf-users , John Garry , Will Deacon , James Clark , Mike Leach , German Gomez Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Leo, On Fri, Jun 17, 2022 at 12:45 AM Leo Yan wrote: > > 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 ${perfdata} -B -N --no-bpf-event -e dummy:u -a true 2>&1 >/dev/null > > 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 Ok, will add the change. Thanks, Namhyung