Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1916401rwd; Fri, 2 Jun 2023 01:56:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4XjAEQ2b9zi0Lx1voym4AKDu9i7CBFmzfvo8xwyX8dUrQaOfsPoTlr0c4cYo38V2nYFrSf X-Received: by 2002:ac8:57ce:0:b0:3ef:28dc:fdd0 with SMTP id w14-20020ac857ce000000b003ef28dcfdd0mr16124862qta.44.1685696188489; Fri, 02 Jun 2023 01:56:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685696188; cv=none; d=google.com; s=arc-20160816; b=Dah9I5ixZMJL/NOWFqOfceFVt5TkgWzz2rbwk5MoXqCyCztFnyaYwqRI7sAUf+uyMC Vil2W25G4jThr2cWAvcIteM/vFoi/cRSjhxo+K6XSQ6b5HG/m8eTTF8LG7CcvLOm5b3L o7LfZTig5EZjXomG1F1ycxYk5QC36zWImas/QW70ZYA6FsPf65TQxqwL++6lfJjLV+0L Zf4Rgi5Jl1qxXq+nmVJLZ3VLhZ4JfLjTZ2W8jYL9DpUF8QRr5Ch9g7qRTBnhRA3u4iSK vLAzodFJDCNUrh27O9PG8qZWm6UMrfFy5hrOoT/omZAoqDIcWgmSPiogeaMzw172O4A2 6itg== 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=eheHZP8cKp+sdwSIjhX5j/WsObGvLb/DF1UbUOwIt7I=; b=yXdPVWMFXM05N8weQDBuM2Dq7LFb3nzyxQMQCfITcA3uxiZiibqp39rkKBwsNkFAQ/ yfC9wZojWf9oTb5289515TV5DXTnVMdgXi6noJuO+PVIi2HCnBd7R7MhcB6IHGx3XS7Z 7H/PSApZkrT5bJ1PN8jI1jwY+gROpVxOuKKnzA4UdccbjcciFGcIrxcvcBRWacCTVp0N UMeYrrJq61jsQfHh14KFVf0rGJGWZY8FleMVThLro83nxKKiIZ3eAascKKDrxpyYJ/0G GXBJql9cP4MpQS+qrWft7OLjmngtTrW1XzgWb+PRWleH5mPIwOq4Qna5jME8bjtvHVI2 OYAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jOmsxqUo; 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 v29-20020a63b95d000000b005347fcb785bsi656082pgo.204.2023.06.02.01.56.15; Fri, 02 Jun 2023 01:56:28 -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=jOmsxqUo; 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 S234824AbjFBItM (ORCPT + 99 others); Fri, 2 Jun 2023 04:49:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233820AbjFBIs0 (ORCPT ); Fri, 2 Jun 2023 04:48:26 -0400 Received: from mail-yb1-xb44.google.com (mail-yb1-xb44.google.com [IPv6:2607:f8b0:4864:20::b44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93C29E46; Fri, 2 Jun 2023 01:48:06 -0700 (PDT) Received: by mail-yb1-xb44.google.com with SMTP id 3f1490d57ef6-bacf685150cso1947533276.3; Fri, 02 Jun 2023 01:48:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685695686; x=1688287686; 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=eheHZP8cKp+sdwSIjhX5j/WsObGvLb/DF1UbUOwIt7I=; b=jOmsxqUo2frjiadNp+Wq4gGj+0bwTjeG5B38UXc9OlNsCz+2Nhy31EABVLzGc0TbZ8 tkezj9qxu1Uy7z5NjqByZX4upmIJIwM5SVGyK/+MMa2bWUQCDUy9/FRFSxpt5tXS2wah DtDSMoVidwF1Pja7vO5yAtCvoaPj908lByJhyMd/op4/OJ2YqwkF+P2qkJhGGZu/s+5x ie2PT2qndP7C/l2XSmT/Y1T2tWVZQ5qS0iVW//Qj45Y08blaK9tzVuU6WI/KGgY0rTSI OCzsJ6eJfd0MePPs8HTHFY9wTVYyNZmQzZNPw766JB86tshr1Dz1wYkL27Q8aMonPptA UNmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685695686; x=1688287686; 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=eheHZP8cKp+sdwSIjhX5j/WsObGvLb/DF1UbUOwIt7I=; b=XzK3uYRgixAlcKDiPs3ch+HCKnC+v2xz8jHdFVltkN6UaS9b83ZWqmMf9pP8b5VA9l G6A8T5IwUMaAZYeZhL1R1TXQw6pkhznmkFEp3oKrAZVTH7FERoSAAcskh6tW5s0DgA3X jVG/wmwen2q8SfEGlalAqBxybcEUTIZMXcwG2v9BF+0i9bSLlKECxG1Ts4Q5o3xJnKPK COHY5BhTB0X63B5WMCFSxFBTN1KaLUXJOYnull6KTqeO2x+HiB2xZFP9kfYukdjTZyXq 4nqQCZ/dgzlp4xwIvBnuaDqBp0FSShsekB766F/3yWZygrhewwKc9Qr9AyNyAI+DJg1S +Njw== X-Gm-Message-State: AC+VfDw1JPRLoC+1P0tUj4Daz862Rp4Qo5/1BuGKz23H4/i/UUQhEASN OwalWTCWTPWDqFZnb4JIOzuxpbpRtdOmYmWcM4XzPr0nnM6m+A== X-Received: by 2002:a0d:ea05:0:b0:568:f2c:ee43 with SMTP id t5-20020a0dea05000000b005680f2cee43mr13449240ywe.2.1685695685750; Fri, 02 Jun 2023 01:48:05 -0700 (PDT) MIME-Version: 1.0 References: <20230602065958.2869555-1-imagedong@tencent.com> <20230602065958.2869555-6-imagedong@tencent.com> <69103b6f490309c381432cae5fdabf02d80a4397.camel@linux.ibm.com> In-Reply-To: <69103b6f490309c381432cae5fdabf02d80a4397.camel@linux.ibm.com> From: Menglong Dong Date: Fri, 2 Jun 2023 16:47:54 +0800 Message-ID: Subject: Re: [PATCH bpf-next v2 5/5] selftests/bpf: add testcase for FENTRY/FEXIT with 6+ arguments To: Ilya Leoshkevich Cc: olsajiri@gmail.com, davem@davemloft.net, dsahern@kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mykolal@fb.com, shuah@kernel.org, benbjiang@tencent.com, imagedong@tencent.com, xukuohai@huawei.com, chantr4@gmail.com, zwisler@google.com, eddyz87@gmail.com, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org 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_NONE,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 Fri, Jun 2, 2023 at 4:24=E2=80=AFPM Ilya Leoshkevich = wrote: > > On Fri, 2023-06-02 at 14:59 +0800, menglong8.dong@gmail.com wrote: > > From: Menglong Dong > > > > Add test7/test12/test14 in fexit_test.c and fentry_test.c to test the > > fentry and fexit whose target function have 7/12/14 arguments. > > > > And the testcases passed: > > > > ./test_progs -t fexit > > $71 fentry_fexit:OK > > $73/1 fexit_bpf2bpf/target_no_callees:OK > > $73/2 fexit_bpf2bpf/target_yes_callees:OK > > $73/3 fexit_bpf2bpf/func_replace:OK > > $73/4 fexit_bpf2bpf/func_replace_verify:OK > > $73/5 fexit_bpf2bpf/func_sockmap_update:OK > > $73/6 fexit_bpf2bpf/func_replace_return_code:OK > > $73/7 fexit_bpf2bpf/func_map_prog_compatibility:OK > > $73/8 fexit_bpf2bpf/func_replace_multi:OK > > $73/9 fexit_bpf2bpf/fmod_ret_freplace:OK > > $73/10 fexit_bpf2bpf/func_replace_global_func:OK > > $73/11 fexit_bpf2bpf/fentry_to_cgroup_bpf:OK > > $73/12 fexit_bpf2bpf/func_replace_progmap:OK > > $73 fexit_bpf2bpf:OK > > $74 fexit_sleep:OK > > $75 fexit_stress:OK > > $76 fexit_test:OK > > Summary: 5/12 PASSED, 0 SKIPPED, 0 FAILED > > > > ./test_progs -t fentry > > $71 fentry_fexit:OK > > $72 fentry_test:OK > > $140 module_fentry_shadow:OK > > Summary: 3/0 PASSED, 0 SKIPPED, 0 FAILED > > > > Reviewed-by: Jiang Biao > > Signed-off-by: Menglong Dong > > --- > > net/bpf/test_run.c | 30 +++++++++++++++- > > .../testing/selftests/bpf/progs/fentry_test.c | 34 > > ++++++++++++++++++ > > .../testing/selftests/bpf/progs/fexit_test.c | 35 > > +++++++++++++++++++ > > 3 files changed, 98 insertions(+), 1 deletion(-) > > Don't you also need > > --- a/tools/testing/selftests/bpf/prog_tests/fentry_fexit.c > +++ b/tools/testing/selftests/bpf/prog_tests/fentry_fexit.c > @@ -34,7 +34,7 @@ void test_fentry_fexit(void) > fentry_res =3D (__u64 *)fentry_skel->bss; > fexit_res =3D (__u64 *)fexit_skel->bss; > printf("%lld\n", fentry_skel->bss->test1_result); > - for (i =3D 0; i < 8; i++) { > + for (i =3D 0; i < 11; i++) { > ASSERT_EQ(fentry_res[i], 1, "fentry result"); > ASSERT_EQ(fexit_res[i], 1, "fexit result"); > } > > to verify the results of the new tests? Oops, I missed this part......Thank you for reminding, and I'll fix it in V3. Thanks! Menglong Dong