Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4840984rwb; Mon, 31 Jul 2023 13:10:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlETOa+2d8MrdQZrRY9oMiagb+TeQMFb3E/4ik6m1vRbnsiMUEbC1SWs7/bbhhT+U4Le3Y8k X-Received: by 2002:a17:90a:aa95:b0:267:909f:3719 with SMTP id l21-20020a17090aaa9500b00267909f3719mr10165984pjq.19.1690834214939; Mon, 31 Jul 2023 13:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690834214; cv=none; d=google.com; s=arc-20160816; b=DkwqLrAmCWZ5hzK8kanyiXztM6Ev7NJSd9MAnhHI4dKfivyVy0JUcZn2Yn9tC++qhz O+x1vVFhtWG7Bppe5n0DmvrND7OnIsAzz4ZdewbyVgTbEseaxVRu2IvlktajndmBdfoL pwh1vwPmOnyUZsT8KEnfEv+0aS0Qd2D2Ms/qiJsaW4XxfT4WGZyWw6Tng1HIeW2V92bT 8lv4rfRHWKB3bl2sJyK0+BpphgHW+OXYqbKIv/mU/ToPm+KXtE6R0DPDygkIDT8I6CH1 H1Rw4X24vi/tjDMFsHzUAy9arOk5DsyYu6AJLaInNwDbDMICj8AI96c2ATCk5zqzIoJn nzcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=nsDP4OSKk4fj8rnGVRvHaWke258uZTHgXHn3HYO48cQ=; fh=FE0X5bMM6WwZ220H4/9fAns6bBKOxUE/gRyOdFLXJxI=; b=Qm+1pkZPkuFejAfOfmsWpLEGRCxXpvuu4uNyqy+cMc9UlUuyeGd1h/BnTf6e65ZPya +oIkAnaVFHzamWIm2q2E3Jzg6yKYPoityUY9ZvyNoYK5KHEfJMLJPtDcIwrwhQIEhgqO LLlZvdSBbH9gTrerYwaQ7Jq6tzZ1qu75qKmwtkyF++5tc0O9ly3HD8IF625rpIGzboOe 8inC8qMH0flKEbwredJ2/ifa5yV4zebnuTR0UP/wTbV32LA396g0kJxUzJNzNcG/8sF9 l+keBg2F4I2todDwxUIMyESbcu1noCkC3Plrec+mPp2MPPP7BSCSUISsgzhET4sDxTHz 0zhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=qRSadawJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gj9-20020a17090b108900b00262ef440ed4si9259138pjb.27.2023.07.31.13.10.03; Mon, 31 Jul 2023 13:10:14 -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=@gmail.com header.s=20221208 header.b=qRSadawJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229828AbjGaSrM (ORCPT + 99 others); Mon, 31 Jul 2023 14:47:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjGaSrL (ORCPT ); Mon, 31 Jul 2023 14:47:11 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07F9518F; Mon, 31 Jul 2023 11:47:10 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2b962c226ceso71015121fa.3; Mon, 31 Jul 2023 11:47:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690829228; x=1691434028; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nsDP4OSKk4fj8rnGVRvHaWke258uZTHgXHn3HYO48cQ=; b=qRSadawJ6qlYS+8IeUlJ0Y+LCFExh7JSRCJ2Xx//mWnuxSLyFc1LqbweloptxXpnWf vlInfCiRDHygNa6Hi7A1wHqoEK1tpvB8nUAnXoYBIL94/lFhMPqQZdY+FZmd9U81fNTi wG1ej1YFOo4/zlZIwxnK3sNafE4sDe69UbXa1gPgyuJqYkxTpzApNum3Xw34s3zAVg+C 4PgPojAtL4jmX3pc9cnD1guqmqo/WMJxUlMDL4134gueoulDBoT5Ji3DB5eTCyxmz23M uvohAoSq4Edn+Xb8PVVP119q9ld6lOwyM0+0xJmn219UVjKWHgLnu0reZR0k3jdkE3iD HDEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690829228; x=1691434028; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nsDP4OSKk4fj8rnGVRvHaWke258uZTHgXHn3HYO48cQ=; b=I+JtUWjjf8qmkdKF0IP6wHuc9TkEMgD6DS61QH2cXFxkhVNNli9A7b8kLrj5M1uS3E yQnNBJ1FouV92YD+Cd1WZttZkGaTqX+sKbh8l2ZwJSgK54LcKkLULOKAFGOV9HNem/3o j2U3IMUXU2JvN24jj3Sntt5IsUncOP50wi+FkebHlRTiirHr9tSV4a1mtxkKJO5/3lRS M57FkMtAM2juqyA7VptPgw5GSlOohHmdrj+uC7Y4B2VMAeH182XuOiLqzrmgJ5mhs6gC jcNWPvI3M5E3Y/e5n/S7nzv5M5+fidtyi9GDe4lKOJMT4vEag88SQBt5HzbKlzFGB1DN HK1A== X-Gm-Message-State: ABy/qLaTHQ8CrYTC4NqAWKyo8BXNKhJfeYYjf0bKK06U4ZeATFRww2Pt PJdSurCvs5EvxD6702r3zzBc9ww46bxjZ3YA05U= X-Received: by 2002:a2e:b16f:0:b0:2b7:a72:103b with SMTP id a15-20020a2eb16f000000b002b70a72103bmr528373ljm.53.1690829227967; Mon, 31 Jul 2023 11:47:07 -0700 (PDT) MIME-Version: 1.0 References: <9c4896b109a39c3fa088844addaa1737a84bbbb5.1690332693.git.yan@cloudflare.com> <791b919c-de82-6dc8-905a-520543f975cd@linux.dev> <87edkoflvx.fsf@cloudflare.com> In-Reply-To: <87edkoflvx.fsf@cloudflare.com> From: Alexei Starovoitov Date: Mon, 31 Jul 2023 11:46:56 -0700 Message-ID: Subject: Re: [PATCH v4 bpf 2/2] bpf: selftests: add lwt redirect regression test cases To: Jakub Sitnicki Cc: Martin KaFai Lau , Yan Zhai , bpf , 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 , LKML , Network Development , "open list:KERNEL SELFTEST FRAMEWORK" , kernel-team , Jordan Griege , Markus Elfring Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Mon, Jul 31, 2023 at 2:52=E2=80=AFAM Jakub Sitnicki wrote: > > 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 examp= le, > > 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 y= et 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? Not really. CI is not just running the test. It needs to understand the output, pass it to UI, run in parallel, etc. All the shell scripts are not suitable for long term CI exposure. So I completely agree with Martin. No new shell scripts. All selftests must be in 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. For comparison take a look at BPF CI code base and what it takes to run the tests and process the output. There is plenty of work for CI ahead.