Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2446247rwb; Mon, 3 Oct 2022 00:13:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6eL+WorbQFDp+voQ+abPiTCx4BgTlGpJrtSH1J4z3wUficNY6GyLCKTCBQ+zI0UrKZoGG1 X-Received: by 2002:a05:6402:22a7:b0:458:889:1063 with SMTP id cx7-20020a05640222a700b0045808891063mr17457704edb.64.1664781196346; Mon, 03 Oct 2022 00:13:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664781196; cv=none; d=google.com; s=arc-20160816; b=JLdyseLIBCcnUQOjL8GqLRDLgnRQU6D/+OyTywHzEDEWk8W0etPrR3JbKhhljJYp46 yb3Th7TgxusbI3Wx3M/74rsXaKeeuBh0d1DtOpRmeabs0PSS5aqSenJnLdG12FEYLKBB GlTMVTR5PwaENkX9F5524yzOgGMobfjBeNst1FieNRvcqKkLCf9GaigQ++4OtG/nVxqs zHLJFEkh1mucseCqK7vaE5yudVBSgaUQaGsinKLxo3Xtrekgol8R4tU7dpixVX00bpjO GaxYj3ir83l2DgV3F5xDfyiRHTrC71r9IpObLFCWraTvs0HAHd1h/Pd6oL2BVv4Vqvld s48g== 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:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=8ZBicwUKsvtaRkaZY3oUqaPDULjldiOgTy47Jjj1bT4=; b=xL1Kes9TEAX2mRpGdF7OpGBNqO9KLYaJQfkv0OcJK+QZivvNjPPu0WeZEyX2K2Uo+T vTLP32+FeAyNaCSxkGhu3kmr5JE1b/cMtxetWrVQgEJwuaJ5GMprhgJzmucukCRHRYKn ookMAVYQtxajqh5HtCmIezPDd6+TXlwDjhMG3Uyr3NraZnpid7XA+4qJtdYN4wLmdWoH 32VD82fkkPKRVKDANG2fULgvAbAkoAAZSgtC+mkmlhhL5zfUGJ/kwvlxWLHXQfohyxEi h/oBhu+B9QOV5ILdyoAbCLgiGAq4UV7hS4hL7Y4fzaRAcgbScVHeEUacrO6TYLjbFfX9 lagA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RObIm19S; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g22-20020a056402321600b00458c1fb34e6si4626177eda.76.2022.10.03.00.12.51; Mon, 03 Oct 2022 00:13:16 -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=@redhat.com header.s=mimecast20190719 header.b=RObIm19S; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229627AbiJCG4j (ORCPT + 99 others); Mon, 3 Oct 2022 02:56:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbiJCG4e (ORCPT ); Mon, 3 Oct 2022 02:56:34 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44E806578 for ; Sun, 2 Oct 2022 23:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664780190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8ZBicwUKsvtaRkaZY3oUqaPDULjldiOgTy47Jjj1bT4=; b=RObIm19SY/cYBNgrS28as/iZO1tEfvVdTte7u7Y0Pn7MxVOllcxkbEAfoQqGmGEgL70gF9 RcaYbtXWkn6zWQgp3OOzSku46hmgSneWvgoUP3BkdVoUU08DAznHhf2b5K9nIdLvMvukOT LNlvs0DiNjpFvCmz8LhMhuBLRlksKME= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-554-7Gjv7yeBOTuEh7uYyEfOEg-1; Mon, 03 Oct 2022 02:56:27 -0400 X-MC-Unique: 7Gjv7yeBOTuEh7uYyEfOEg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2404F3C025C3; Mon, 3 Oct 2022 06:56:27 +0000 (UTC) Received: from samus.usersys.redhat.com (unknown [10.43.17.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DBB452166B26; Mon, 3 Oct 2022 06:56:25 +0000 (UTC) Date: Mon, 3 Oct 2022 08:56:24 +0200 From: Artem Savkov To: Andrii Nakryiko Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , bpf@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jbenc@redhat.com Subject: Re: [PATCH bpf-next] selftests/bpf: make libbpf_probe_prog_types testcase aware of kernel configuration Message-ID: Mail-Followup-To: Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , bpf@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jbenc@redhat.com References: <20220930110900.75492-1-asavkov@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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, Sep 30, 2022 at 04:06:41PM -0700, Andrii Nakryiko wrote: > On Fri, Sep 30, 2022 at 4:09 AM Artem Savkov wrote: > > > > At the moment libbpf_probe_prog_types test iterates over all available > > BPF_PROG_TYPE regardless of kernel configuration which can exclude some > > of those. Unfortunately there is no direct way to tell which types are > > available, but we can look at struct bpf_ctx_onvert to tell which ones > > are available. > > > > Signed-off-by: Artem Savkov > > --- > > Many selftests assume correct kernel configuration which is encoded in > config and config. files. So it seems fair to assume that all > defined program types are available on kernel-under-test. Ok. Wasn't sure if this is the assumption being made. > If someone is running selftests under custom more minimal kernel they > can use denylist to ignore specific prog type subtests? Thanks for the suggestion. Denylist is a bit too broad in this case as it means we'll be disabling the whole libbpf_probe_prog_types test while only a single type is a problem. Looks like we'll have to live with a downstream-only patch in this case. -- Artem