Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5308244rwb; Wed, 7 Sep 2022 00:12:09 -0700 (PDT) X-Google-Smtp-Source: AA6agR7z0rW3IWIMwooIkqYSQ3TNPS6DB4WFbi9/gCDV2n79gzLjw3pit7NTVNaJ2ZU3jQYn7LnH X-Received: by 2002:a17:902:e945:b0:16a:1c41:f66 with SMTP id b5-20020a170902e94500b0016a1c410f66mr2458782pll.129.1662534729087; Wed, 07 Sep 2022 00:12:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662534729; cv=none; d=google.com; s=arc-20160816; b=Ze8PY798KqaIfOPHjNdLA250/9ty03LI8pN/yNuN4o0TlRpxH05Y6RVZ5JViOofaeH vG9uyBIx4qQng5ZYd/RWzT/cD3lprXy6pY8hOrraMBj1Xe5FoT/1tqHIGL1Mptsw6/Zd DITrCftSm4AndzHrXzhc5M+8DjqFD07SCRkfo7syXwIGbc9QPCCSf2Tu4o+ai1M5XZxK vxrhSQt4hNqfkdZV1mVNoXqd2D6r49mPoLCIDLKikP9bKb5xAF7sB9VVR9WX0sxbU3XO IHV58OiYUbjCCbtUL7+8gBWm70Y7E43YByCxXmLvCO/G2Qq8CwSkWCqkdATI3RoCqeaw KmBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=d2GxsBffUoX3eM3Z9JvRT1gNftYOiyqMQZCPJIetS/o=; b=cESPwUPWaqqac/3PxmF3NZbN8JpTWVUvSeTiSoPNvjJOxZYLuzNLvPtHscLmTYTPki zRwizV7B88vQhtNHiY9fksBgNVrGIAJ4wlEO/gfx0hxILcGdzSmcf2MudhOGi6KwTCJr WTRlEQbJdvwxAQVRAHMIwMFpdgMeYR6PPNNPUxfQeNCKI+BEwzCj8juvkxzMgr/ccUKt 8xanYTHEtt/Z5g7Gh2JbuaDpZpWuR+tCZgMFYZ0350cpyp+9FqBD2V5zbQZ9bVm/QwRo SVSyGWmCG5CFBDrJuoEoMJwhbOCo9DHTRGVlP1QcZCOqfSEGyMK0t2srPrJqEg2W5gsG NN4Q== 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 f4-20020a17090a4a8400b001fbbd1a3b6asi6858209pjh.84.2022.09.07.00.11.57; Wed, 07 Sep 2022 00:12:09 -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 S229974AbiIGG6Y (ORCPT + 99 others); Wed, 7 Sep 2022 02:58:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbiIGG6W (ORCPT ); Wed, 7 Sep 2022 02:58:22 -0400 Received: from mail-oa1-f46.google.com (mail-oa1-f46.google.com [209.85.160.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B82C48FD52; Tue, 6 Sep 2022 23:58:21 -0700 (PDT) Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-1278a61bd57so15293821fac.7; Tue, 06 Sep 2022 23:58:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=d2GxsBffUoX3eM3Z9JvRT1gNftYOiyqMQZCPJIetS/o=; b=397koPNSKD4670SYO4FRp68vrXpBO5cEGeGBxcNN+jr9smvMTa+X1KS1PWbw6sDPGN 9x7+G4TnWpnkFxqonTPY/H1DII+57+USRZi21DuQoNbARLcMv4GJeKO2+vbVuers9xBP KMckgp38yzWJbpFnfCZi3JkqqsG9f0rQaVMEX7IY35sf+ddpbaV48SX8li/PVcI1mTIU +oRIAgQrvpdWZzKXUSkzz5J8zqiu0P+EUZHyy7xsN7QekAaZ/FUmZ/Bdp9c35kWwBoUs MJol3fXMSdNqmiMrKWi/p69/Zj+9S1gMWbfaa0IA0UDywZshq22w+c5Jnqaq9xFTIxFn 2omw== X-Gm-Message-State: ACgBeo1LroH0okj1Tpnoiq78sg6HSyMs88OFhmBTaFXllEZqMuAGVP+W E6W/dpGS9i8SMP6jxiHjkCv33b9BaU8g2qSWYwwzlzw0 X-Received: by 2002:a05:6808:d46:b0:345:7b42:f987 with SMTP id w6-20020a0568080d4600b003457b42f987mr910550oik.92.1662533901033; Tue, 06 Sep 2022 23:58:21 -0700 (PDT) MIME-Version: 1.0 References: <20220907050407.2711513-1-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Tue, 6 Sep 2022 23:58:10 -0700 Message-ID: Subject: Re: [PATCH v2] perf test: Skip sigtrap test on old kernels To: Song Liu Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Peter Zijlstra , LKML , Ian Rogers , linux-perf-users , bpf , Marco Elver , Song Liu Content-Type: text/plain; charset="UTF-8" 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_H3,RCVD_IN_MSPIKE_WL,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 Song, On Tue, Sep 6, 2022 at 10:58 PM Song Liu wrote: > > On Tue, Sep 6, 2022 at 10:04 PM Namhyung Kim wrote: > > > > If it runs on an old kernel, perf_event_open would fail because of the > > new fields sigtrap and sig_data. Just skipping the test could miss an > > actual bug in the kernel. > > > > Let's check BTF if it has the perf_event_attr.sigtrap field. > > > > Cc: Marco Elver > > Cc: Song Liu > > Signed-off-by: Namhyung Kim > > --- > > tools/perf/tests/sigtrap.c | 46 +++++++++++++++++++++++++++++++++++++- > > 1 file changed, 45 insertions(+), 1 deletion(-) > > > > diff --git a/tools/perf/tests/sigtrap.c b/tools/perf/tests/sigtrap.c > > index e32ece90e164..32f08ce0f2b0 100644 > > --- a/tools/perf/tests/sigtrap.c > > +++ b/tools/perf/tests/sigtrap.c > > @@ -16,6 +16,8 @@ > > #include > > #include > > > > +#include > > + > > Do we need "#ifdef HAVE_BPF_SKEL" for the include part? Right, it'd be better to move it under the #ifdef. Will change. > > Other than this, looks good to me. > > Acked-by: Song Liu Thanks for the review! Namhyung