Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp207398rdb; Tue, 5 Dec 2023 03:17:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2ZyFV9kPnC2kcYNJQcQgAFv/PIyndChNAZlmQAwDdrh+rOvqkrxgXLrdXs/dSXOVvISdO X-Received: by 2002:a05:6a20:2214:b0:181:15:5755 with SMTP id u20-20020a056a20221400b0018100155755mr5229870pzb.56.1701775075632; Tue, 05 Dec 2023 03:17:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701775075; cv=none; d=google.com; s=arc-20160816; b=lDlGyjIdTBhHm7h4bKl6MiR/BPUaNQOMioOMC4hZ3a5ma+sJTSYEXJW77OWR1vVEvN 0E/GoLCKTvrITejgRUllzwqafhoykjVgYd+NBx2/F3Y7rCHXkjJBgnGrDv/KrOHvJTCg +KRM9l/PM8vlI7MkufqlqBV2F8JPMbhB00zaBwxSW1mm2FvlnJNNl/3/HxPSEzKPYPzA 5RDnYTYE6ygfHzQm5V/MPZyNPOtlSqB1yLA2+L8zizzh/ypgTNr6gtLkgZA+uzAK6HPZ pRm6h2TFAwbLNHYnxcxmWIoJG9gV6/PAF4Cy8g0Ipq/0xzxj1rebHRyEkg2bst8V8irf NKjg== 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-disposition:mime-version :references:message-id:subject:cc:to:date:from:dkim-signature; bh=iI7MNYltXP/pFO87Lkqjtj0O5CyAgLwLAo0fkrJE6Hk=; fh=NxRi4peelQJqxynXsBs51J6IXbfmBZP2hl/cmjfPP50=; b=jHYLTA2lLg8E/ge8USzB5GtkDF6wnzPXs3NTuTpwbVRDiH6rhd/dGqvUz1azugEwrn tU/icvV9h70F7VlQxLqAfw8BpObtgQqmLMCkeWd3uNjKelJlAQ1Zc+YAATsU1c0r3Wtp 7ixB5oObVQw2AFdXaXTAhshKXaREKr0SLJQdUNJrmkOUFnt2t4NFev0OyiREEVho154E c6URTHDXSOprCcNihTJEbM8Ot24Oll5LbBK3w5N/stf0d25Oz3pNH482fLePb+ke1RnY 1BkubeoFRYRXiBMMwctZUXamas901b1N/1zW9f81ca/ZnyzgoDxx7isP8X6NG6aZ7xBd gTtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dP4HIHup; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id i34-20020a635422000000b005c2030dd612si4978327pgb.870.2023.12.05.03.17.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 03:17:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dP4HIHup; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 739F980EFC6C; Tue, 5 Dec 2023 03:17:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442045AbjLELRj (ORCPT + 99 others); Tue, 5 Dec 2023 06:17:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442059AbjLELRh (ORCPT ); Tue, 5 Dec 2023 06:17:37 -0500 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58962184; Tue, 5 Dec 2023 03:17:43 -0800 (PST) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-50bfa5a6cffso2337583e87.0; Tue, 05 Dec 2023 03:17:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701775061; x=1702379861; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=iI7MNYltXP/pFO87Lkqjtj0O5CyAgLwLAo0fkrJE6Hk=; b=dP4HIHupoDaUrRdXC6/3nhxStEoAGkfozR7nMkZtdng+eB+A5PgdBy9gzD5A1b3FSF EmVCp7aRzQbnCN20lKjaz9IAOT9eB6i7JbFLJyEvl8Fo3a2Hz+tv9dr6lwuCubVv0fVp vObs1xqCl3urp4Ea5jrK+/VKR8rLCOvGDee2wF781mjNA1hy4fuLqKwPJj70ituzoDgu +iUuqZQGl59e4EuRrXP0RfcMVZ/kmZmMr+jsIom3Y14mxQu2Xx94eKWJWQk2CFRRhkZD VYI+OJtKAVo3qhRj3m09fTRXYHN1wXBy32jRq50qWTWidBczklwITM++GDpi2awQ9Clk 9JEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701775061; x=1702379861; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iI7MNYltXP/pFO87Lkqjtj0O5CyAgLwLAo0fkrJE6Hk=; b=msAt2mlxO2Yfv9RjAx3Je1dnUYGhr7RR2xzVaC1RpYS++5a8jmnUhjQgWFkkDJcdDa /3Wnk3bSD67Urbn+Vp8Ztc1ri1G4Mux4ainJEYch0R8cTrHH6v36cohFdj62aKr4Onso S35HIaHtJ4496ipGH7Ov1KoCJfZPmk7tH4xHmrcqKORFOpyykT1qfnvVgLDrGD++wpnt vxLLiL9ZZXCj+w0uzjfUdM+cX8zXpG0qe46B4Ene2PhROGNqGPOFl2YghAOs/X5KVW/g OtZhEojAAetcguuZWV3vm1PWDOGOCXTARhqF1rsmweYEkm0Fkw0Ug/Me5GR1Cs3f6Hv3 HN/w== X-Gm-Message-State: AOJu0Yz+0N8fjhUDDQ0Bnn09UBHgDGeA/IwFSJqycxv70e7drF+nj/Nb G1/wjoEZAn/AlIf35Gm4jRc= X-Received: by 2002:a19:c507:0:b0:50b:feb2:dac9 with SMTP id w7-20020a19c507000000b0050bfeb2dac9mr873236lfe.2.1701775061066; Tue, 05 Dec 2023 03:17:41 -0800 (PST) Received: from krava (2001-1ae9-1c2-4c00-726e-c10f-8833-ff22.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:726e:c10f:8833:ff22]) by smtp.gmail.com with ESMTPSA id a15-20020aa7cf0f000000b0054ca7afdf35sm936627edy.86.2023.12.05.03.17.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 03:17:40 -0800 (PST) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Tue, 5 Dec 2023 12:17:38 +0100 To: Kyle Huey Cc: Kyle Huey , linux-kernel@vger.kernel.org, Robert O'Callahan , Andrii Nakryiko , Mykola Lysenko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Shuah Khan , bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH 2/2] selftest/bpf: Test returning zero from a perf bpf program suppresses SIGIO. Message-ID: References: <20231204201406.341074-1-khuey@kylehuey.com> <20231204201406.341074-3-khuey@kylehuey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231204201406.341074-3-khuey@kylehuey.com> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 morse.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 (morse.vger.email [0.0.0.0]); Tue, 05 Dec 2023 03:17:53 -0800 (PST) On Mon, Dec 04, 2023 at 12:14:06PM -0800, Kyle Huey wrote: > The test sets a hardware breakpoint and uses a bpf program to suppress the > I/O availability signal if the ip matches the expected value. > > Signed-off-by: Kyle Huey > --- > .../selftests/bpf/prog_tests/perf_skip.c | 95 +++++++++++++++++++ > .../selftests/bpf/progs/test_perf_skip.c | 23 +++++ > 2 files changed, 118 insertions(+) > create mode 100644 tools/testing/selftests/bpf/prog_tests/perf_skip.c > create mode 100644 tools/testing/selftests/bpf/progs/test_perf_skip.c > > diff --git a/tools/testing/selftests/bpf/prog_tests/perf_skip.c b/tools/testing/selftests/bpf/prog_tests/perf_skip.c > new file mode 100644 > index 000000000000..b269a31669b7 > --- /dev/null > +++ b/tools/testing/selftests/bpf/prog_tests/perf_skip.c > @@ -0,0 +1,95 @@ > +// SPDX-License-Identifier: GPL-2.0 > +#define _GNU_SOURCE > +#include > +#include "test_perf_skip.skel.h" > +#include > +#include > + > +#define BPF_OBJECT "test_perf_skip.bpf.o" > + > +static void handle_sig(int) > +{ > + ASSERT_OK(1, "perf event not skipped"); > +} > + > +static noinline int test_function(void) > +{ > + return 0; > +} > + > +void serial_test_perf_skip(void) does it need to be serial? jirka