From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7062C4332F for ; Wed, 12 Oct 2022 23:18:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229527AbiJLXSB (ORCPT ); Wed, 12 Oct 2022 19:18:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbiJLXSA (ORCPT ); Wed, 12 Oct 2022 19:18:00 -0400 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70BEE12C896; Wed, 12 Oct 2022 16:17:58 -0700 (PDT) Message-ID: <611e9bed-df6a-0da9-fbf9-4046f4211a7d@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1665616676; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XOuJ7J4AXKe3c2xjfQLYvSiF4wv25bV1J+/a3durzkE=; b=ss3SZKmv5qqRSFdRJIkW6XkbNiHsncJBhMMqUUPKhF/GsqJ4FxMhfCZt4iC/U1y5AiIoVD PqslwXqf9d7tcBZ1fJgav1ZAh+KlPm/LP3w2pm6O803ahiVBUyqbm+OAKmNeKLn4hUx//l 0D2MBZ4NtN/Zr6ZlnnhluC0qO1uJlDk= Date: Wed, 12 Oct 2022 16:17:51 -0700 MIME-Version: 1.0 Subject: Re: [PATCH bpf-next v4 5/6] selftests/bpf: Fix error failure of case test_xdp_adjust_tail_grow Content-Language: en-US To: Xu Kuohai Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , "David S . Miller" , Jakub Kicinski , Jesper Dangaard Brouer , Kumar Kartikeya Dwivedi , Alan Maguire , Delyan Kratunov , Lorenzo Bianconi , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, netdev@vger.kernel.org References: <20221011120108.782373-1-xukuohai@huaweicloud.com> <20221011120108.782373-6-xukuohai@huaweicloud.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau In-Reply-To: <20221011120108.782373-6-xukuohai@huaweicloud.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On 10/11/22 5:01 AM, Xu Kuohai wrote: > From: Xu Kuohai > > test_xdp_adjust_tail_grow failed with ipv6: > test_xdp_adjust_tail_grow:FAIL:ipv6 unexpected error: -28 (errno 28) > > The reason is that this test case tests ipv4 before ipv6, and when ipv4 > test finished, topts.data_size_out was set to 54, which is smaller than the > ipv6 output data size 114, so ipv6 test fails with NOSPC error. > > Fix it by reset topts.data_size_out to sizeof(buf) before testing ipv6. > > Fixes: 04fcb5f9a104 ("selftests/bpf: Migrate from bpf_prog_test_run") > Signed-off-by: Xu Kuohai > --- > tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c b/tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c > index 9b9cf8458adf..009ee37607df 100644 > --- a/tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c > +++ b/tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c > @@ -63,6 +63,7 @@ static void test_xdp_adjust_tail_grow(void) > expect_sz = sizeof(pkt_v6) + 40; /* Test grow with 40 bytes */ > topts.data_in = &pkt_v6; > topts.data_size_in = sizeof(pkt_v6); > + topts.data_size_out = sizeof(buf); lgtm but how was it working before... weird. > err = bpf_prog_test_run_opts(prog_fd, &topts); > ASSERT_OK(err, "ipv6"); > ASSERT_EQ(topts.retval, XDP_TX, "ipv6 retval");