Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4234070rwb; Mon, 31 Jul 2023 03:57:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlEeVBGZTSs9fBIdRa9uFJpfvKZdnZJSIv4CKzlf5OTnEvkmKir9W5iWXGxw8E43XgSts7YL X-Received: by 2002:a05:6a20:296:b0:133:3682:3cdf with SMTP id 22-20020a056a20029600b0013336823cdfmr7178312pza.11.1690801039026; Mon, 31 Jul 2023 03:57:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690801039; cv=none; d=google.com; s=arc-20160816; b=CnMXHD25ejR+BIj8nWUuQo1YQz3KIAdNAgLyR4AQ4gKUkX4ViJHVW/2XugPmw+HEUX ZTxpStUobVdH0lXULMOKljHoVpzvdG0MDUqgBOnyqwkSJPRVgu0DchiYy5VkGAK1XR19 uule9eG+3oQbFIKvNqPTrmU8dmVbwaq0+CibGKtutSxRwuXSlBhAPW29ZGgs35gD1DR7 DVu5+8Wlq6cxsGRe/UULtGun49UF6z9ovl9f6CY+yVdjowsJLgzrTt9l5qV1G0G/OP9W ThGBja3O98jQVFVelwtcTUbiGHa//GQfHTnLYs8TBfscEEX9eDgEY4XRG3R+cGsB0Uzk drBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date:subject :cc:to:from:user-agent:references:dkim-signature; bh=iS9ynVL/SnopVJ2vw9YOzxEVqWQLoL/quqMJip/rlSE=; fh=1hupesZX16TJSHszQLht/O75etiaHkP+c/cJwhBvIGY=; b=aqvWgREfKvqllFgCHsmUMdlRID+QeoOrPatXTa/1SAS8v8WZcj+a8QLtbgd9tT9Ar1 7KMvl5RyQWPWQahLka1Wg/kBUR5CrYNRmMnWv+zRnELHJihopT7vnd8dyyLuTkT0Rs5n EyZFXOPxDutZ/Ump+BLNSDxQ34HwetyplDGl54Gjtv2T+qGteLvbrDwMBLzNrkZQq5Gb ZhStCba9ZuKrcb9TJdSRqmVLk/WVgtNU5Mzqbo3FDFqXe+BbA0pQHGjQM8jnbmbjVfSm lSzPK7XTS4c6zp8EAjVcUHx0phcZJ0ADSevayPubYFvxq7B55nt4nl2+EL7lMv0y0HO0 VYNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=TJGih8nC; 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=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a1709029b8c00b001b8a88cba84si6947987plp.129.2023.07.31.03.57.06; Mon, 31 Jul 2023 03:57:19 -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=@cloudflare.com header.s=google header.b=TJGih8nC; 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=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231651AbjGaJyX (ORCPT + 99 others); Mon, 31 Jul 2023 05:54:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231411AbjGaJyA (ORCPT ); Mon, 31 Jul 2023 05:54:00 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 242F010CA for ; Mon, 31 Jul 2023 02:52:55 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2b703a0453fso63244391fa.3 for ; Mon, 31 Jul 2023 02:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; t=1690797172; x=1691401972; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=iS9ynVL/SnopVJ2vw9YOzxEVqWQLoL/quqMJip/rlSE=; b=TJGih8nCWL5gxD2BWkapKv6qzLQgYlt7Dn6tUvA7zsBBkj0NosBGxU6y4wTEHIMu9b QNhfWKg5PLY3Lopd3sj6iaUhOmghM4XdsG0krJt7pnnvs8nkdNgFXco002qJe6S1WLjL 4D5feAhqvaQ0OrqYsnoNvfQpn+ks1/c6mkHzU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690797172; x=1691401972; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iS9ynVL/SnopVJ2vw9YOzxEVqWQLoL/quqMJip/rlSE=; b=i3YlQGe31QQ9S7c5j9n89QFHl8XmhMUhs/jZhWntTb7rAQns9wih3tkQPRKKqma2hJ SZHDGT5V0TV4gASmPfizH0tCG++nIoRqB/LO1ICQV4mB65qEUyU/6IijyuL0P4WVHz6W o79rb6VXcwz03/cKVEKjH6Avr5uKacgL2/G1FSDoTcDnb3fQ6/wulja6lkqgqqQgJ0hM uwvhXeLXn6HIxSNZivU2waGq6fzrk3unt//2BBOBRMb+KrfkzmN9N34FPTuAhmT3pIzq OUaAf318g90xC5kpvcNJ7KmP/16CuDG7zaCEPwlYEdfNDkW/MN1MPQ8b71owgvP3/DLM o+ag== X-Gm-Message-State: ABy/qLbB+lprVlqvbPm3vY1SrXFSWUxPJbGzNBXwT8XWVa5a3loBwLzB g4iQK9AzFqEk9yjdHs8Sx6xdPg== X-Received: by 2002:a2e:8557:0:b0:2b9:4821:22b6 with SMTP id u23-20020a2e8557000000b002b9482122b6mr6184560ljj.10.1690797172186; Mon, 31 Jul 2023 02:52:52 -0700 (PDT) Received: from cloudflare.com (79.184.136.135.ipv4.supernova.orange.pl. [79.184.136.135]) by smtp.gmail.com with ESMTPSA id q24-20020a17090622d800b0098d2f703408sm5858343eja.118.2023.07.31.02.52.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 02:52:51 -0700 (PDT) References: <9c4896b109a39c3fa088844addaa1737a84bbbb5.1690332693.git.yan@cloudflare.com> <791b919c-de82-6dc8-905a-520543f975cd@linux.dev> User-agent: mu4e 1.6.10; emacs 28.2 From: Jakub Sitnicki To: Martin KaFai Lau Cc: Yan Zhai , bpf@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Mykola Lysenko , Shuah Khan , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@cloudflare.com, Jordan Griege , Markus Elfring Subject: Re: [PATCH v4 bpf 2/2] bpf: selftests: add lwt redirect regression test cases Date: Mon, 31 Jul 2023 11:48:40 +0200 In-reply-to: <791b919c-de82-6dc8-905a-520543f975cd@linux.dev> Message-ID: <87edkoflvx.fsf@cloudflare.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 28, 2023 at 03:47 PM -07, Martin KaFai Lau wrote: > On 7/25/23 6:09 PM, Yan Zhai wrote: [...] >> diff --git a/tools/testing/selftests/bpf/test_lwt_redirect.sh >> b/tools/testing/selftests/bpf/test_lwt_redirect.sh >> new file mode 100755 >> index 000000000000..1b7b78b48174 >> --- /dev/null >> +++ b/tools/testing/selftests/bpf/test_lwt_redirect.sh > > This has to be written in the test_progs infrastructure in C. Only test_progs is > run by the BPF CI. Take a look at other tests in prog_tests/. For example, > tc_redirect.c and xdp_metadata.c which are having setup in netns/link/...etc. It > currently has helpers to add tc qdisc and filter but not adding route yet which > could be a useful addition. Can we help make the BPF CI better so that it also runs other tests in addition test_progs? We have bpf selftests written in shell and even Python. These are sometimes the right tools for the job and make adding tests easier, IMHO. Network setup from C is verbose and tedious. Not to mention, hard to read through. # ./run_kselftest.sh --list bpf:test_verifier bpf:test_tag bpf:test_maps bpf:test_lru_map bpf:test_lpm_map bpf:test_progs bpf:test_dev_cgroup bpf:test_sock bpf:test_sockmap bpf:get_cgroup_id_user bpf:test_cgroup_storage bpf:test_tcpnotify_user bpf:test_sysctl bpf:test_progs-no_alu32 bpf:test_kmod.sh bpf:test_xdp_redirect.sh bpf:test_xdp_redirect_multi.sh bpf:test_xdp_meta.sh bpf:test_xdp_veth.sh bpf:test_offload.py bpf:test_sock_addr.sh bpf:test_tunnel.sh bpf:test_lwt_seg6local.sh bpf:test_lirc_mode2.sh bpf:test_skb_cgroup_id.sh bpf:test_flow_dissector.sh bpf:test_xdp_vlan_mode_generic.sh bpf:test_xdp_vlan_mode_native.sh bpf:test_lwt_ip_encap.sh bpf:test_tcp_check_syncookie.sh bpf:test_tc_tunnel.sh bpf:test_tc_edt.sh bpf:test_xdping.sh bpf:test_bpftool_build.sh bpf:test_bpftool.sh bpf:test_bpftool_metadata.sh bpf:test_doc_build.sh bpf:test_xsk.sh bpf:test_xdp_features.sh