Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3990263pxk; Tue, 29 Sep 2020 11:10:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJvOy4LO2MDMZnpJHMKWhRfqiNPOnumoI/vlKXc9HqAkqMjeKoS3MPvE+1zUkoG5x+ih+w X-Received: by 2002:a17:906:724b:: with SMTP id n11mr5091189ejk.136.1601403044862; Tue, 29 Sep 2020 11:10:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601403044; cv=none; d=google.com; s=arc-20160816; b=pR50Gw1O8rBLZQR7aOtf+KNuJddldwUvCtX9VDUxgFkjaRrTDfXyc8KmzHVYIJJRi6 pYB1ts/3LvlHEVPZyNxjgT61eOdjMgrbIFxjxIedkWeSek3yHdhBcC5WUTDoNKowaqp1 IOXhsEQjwGlMy1Eb+7+aK9CmmzUOih85LAi9WNqpcsK1qyeRua3RmsdqQNIH8ujjIdri hlTut1BKXyTWrHTcsJkVm9v7/nuZBiKxbX6K1WW9n2rfaUwxYrczupLKm2EogF4nfvo9 hVdBfbe+tmlUWxRHLIslyeGKTXGlIWX/pPoAQ2Pzs+DL5j8sGyQFSBQq6jolZp/LCB+p Fjxw== 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:dkim-signature; bh=r/5FPvYhuqZfk0XDpMFDxw6A2OzBlYL9CLRDtRf2rhA=; b=tuibd20eS02WCxO/9LzmFV47FSPbJnLILLS4jj1tTsE5eC6fHOR/Tjf5pF/Q5sGLol OyEuVtRQT5hUrxX3Hoo4rVs1UBvfpj4wvVlPYi4Need/9sy8tP0Fn88ox1OYWY9Tw4VD Kce02tzw2CC3IdE6SLJtLtucXg/LMZwhDifDzMmh2QAIf/QK7jC+5p65FKZ7/jPSeAgu Z3CET55vTwViE5gPvH8rNoEXfqydsnt3dfIiY0yupJFHlNZqEIxLvu3l/TdX2sZXllFT Pk1d3Q4M6e2XgAP4CzLR3zDSfHLD+q+fewOg551qggaLtNsV7iw2N8Xf4MLbHKz9qbsQ g8iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rQt81c37; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j26si994421edq.316.2020.09.29.11.10.21; Tue, 29 Sep 2020 11:10:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rQt81c37; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728178AbgI2SI5 (ORCPT + 99 others); Tue, 29 Sep 2020 14:08:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727360AbgI2SI4 (ORCPT ); Tue, 29 Sep 2020 14:08:56 -0400 Received: from mail-yb1-xb42.google.com (mail-yb1-xb42.google.com [IPv6:2607:f8b0:4864:20::b42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A172BC061755; Tue, 29 Sep 2020 11:08:56 -0700 (PDT) Received: by mail-yb1-xb42.google.com with SMTP id f70so4289364ybg.13; Tue, 29 Sep 2020 11:08:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=r/5FPvYhuqZfk0XDpMFDxw6A2OzBlYL9CLRDtRf2rhA=; b=rQt81c37keZPYHPBj0XiuhFgBpT/oSKiHgjr27BUzSAAsBGLYz8FCNFvmGT+NesLNK EuBJWXFBdEqCFj3/LT2ucgtNyTJOB5xYr2jrkBMPT+y1Tyg795YrmWHnGijDo6LqX4E3 7ocId4WZG/ItlxhnPaldTGwhQLh9oNCTKyQ3Ns3tDxGk2BA+DwM08ZJMsn4+I2SgDWSm pZKp7wBHYzW1kPqvqqTeOFn/0BC2MC+VFmaAqAG2wBmTQzBx+S/vobuD3h1XjOeVglfM 9prYNoLXrs0Wo782JU4Np3qVFrjmwGs8iy/IqwG+8XTqAAG7Pg3ipH6+Sn2fGSiMLStQ ScNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=r/5FPvYhuqZfk0XDpMFDxw6A2OzBlYL9CLRDtRf2rhA=; b=GZK1GxJz4uTjVAOjvRePI4025AwxFh3/hILLdj07F9h3gW/TVKDGKCjbGtSsgJFRH9 vOSlwImCVxGGM5Rp1rOVjgiDSWpQ5UgWYq6XcS/Y4/v9soVx4izgZzNDqv+E1dqvInn5 0IJH48DAX4wBY6h7Xq4inRZdLErBDHvlNSfHHLvzDDWABnUzsu/bI8ttd1QpSZUAdgQ9 aCVOCbXoMsT2ASz+M80iUXO1KyHaKV8h2DVtT8i72Ud9JoORNsajoZ+jlK7Hbd5zpXoO nmCc+TteV2i9yOGB8CcKqBO5DZGjzT0hJyetXRNSTcqH0VP0adKEvdIhKlEOzL1ky/Q+ CHXw== X-Gm-Message-State: AOAM532EtfQD6RYyVnxe/FJ5t+ApYdjMs/G8Dp/js6tSH3+KrOEZr4/x zjHcSZTHlNvMl9vFEymJFHjhtDbKJan7HorqRW8= X-Received: by 2002:a25:2d41:: with SMTP id s1mr7585585ybe.459.1601402935930; Tue, 29 Sep 2020 11:08:55 -0700 (PDT) MIME-Version: 1.0 References: <1601379151-21449-1-git-send-email-alan.maguire@oracle.com> <1601379151-21449-3-git-send-email-alan.maguire@oracle.com> In-Reply-To: <1601379151-21449-3-git-send-email-alan.maguire@oracle.com> From: Andrii Nakryiko Date: Tue, 29 Sep 2020 11:08:45 -0700 Message-ID: Subject: Re: [PATCH bpf-next 2/2] selftests/bpf: ensure snprintf_btf/bpf_iter tests compatibility with old vmlinux.h To: Alan Maguire Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin Lau , Song Liu , Yonghong Song , john fastabend , KP Singh , open list , Networking , bpf Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 29, 2020 at 5:26 AM Alan Maguire wrote: > > Andrii reports that bpf selftests relying on "struct btf_ptr" and BTF_F_* > values will not build as vmlinux.h for older kernels will not include > "struct btf_ptr" or the BTF_F_* enum values. Undefine and redefine > them to work around this. > > Fixes: b72091bd4ee4 ("selftests/bpf: Add test for bpf_seq_printf_btf helper") > Fixes: 076a95f5aff2 ("selftests/bpf: Add bpf_snprintf_btf helper tests") > Reported-by: Andrii Nakryiko > Signed-off-by: Alan Maguire > --- That works, thanks! Acked-by: Andrii Nakryiko > tools/testing/selftests/bpf/progs/bpf_iter.h | 23 ++++++++++++++++++ > tools/testing/selftests/bpf/progs/btf_ptr.h | 27 ++++++++++++++++++++++ > .../selftests/bpf/progs/netif_receive_skb.c | 2 +- > 3 files changed, 51 insertions(+), 1 deletion(-) > create mode 100644 tools/testing/selftests/bpf/progs/btf_ptr.h > [...]