Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2087006rwi; Tue, 11 Oct 2022 04:48:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5WOu4V1f0nATdr7CDgIedpD1529yR7L/vCmB/wTqhyYkwajCa6V9Zd/h8AQOctCI4bGT9P X-Received: by 2002:a05:6a00:3406:b0:55c:e661:6d31 with SMTP id cn6-20020a056a00340600b0055ce6616d31mr25221757pfb.42.1665488909349; Tue, 11 Oct 2022 04:48:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665488909; cv=none; d=google.com; s=arc-20160816; b=sz3Xh+KTTWrUf2rGOqlwQnmHKbhm/CWkHS7F/Hn2r5cO8QP/SQYfhX20Zj+3+EXmxd 3EcVMNzQfC1UXXUl436FX3z+bFSiJMFk36ukSpafOtx7d1wzdoqV49z9aFaZx0c9/adU 43B2GcZd1MlUGXHbtJbgjb11GzG0MHfVNL680aPPnul3ijUTWJHyJ//8YDu9X61as8kt z4szgn2ntGyqDzYGBUTHnlaemDHorgxi8k2tYnZqiC9rxIOERfh/wOWRON8sNgEU2b7i HJug7SJdMgk+cDwVPHB7R+a664BxlgDQhjyP5j6bOeV/3zeOu/zj+LLMDc27RdOi0Z2g 6xLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=hp0Kee30QKoimuRhOhSFUeGzWYobfnfs7w8Buv4Bw4o=; b=AagYPE5JYQ4g951ST15xIQ8A1HEJhyZ+PLvU78J09ZelQ8xzpvlLZS8f9q3xfK7qaM RrmMQLBSm1sae5Hy++b8VZV6HGMH6b0CAknbBm3EdnzHvbAIa4WE36IYvOeVtww0emS+ 2Y7IvlCyzFYD6W0l1y5ZsZaCDoQWA3M4bFbtyQ5FbKhDkOvwonJRQPEQz4i9FEtZA3XB PLOeFutOOWv76Xx3DQYs9e5izL9+WdG27+/pKh2yqnZrasnlgk7s59TmUH63v7HG50ic tuummQM0WdlLtxXGcpZW/MsumWmusziwB6b6hWyyimbv5J292O0Ew6iMcpNbNJo/iNcR vZhQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o12-20020a17090a5b0c00b00202be5416b1si19192819pji.109.2022.10.11.04.48.17; Tue, 11 Oct 2022 04:48:29 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229913AbiJKLnx (ORCPT + 99 others); Tue, 11 Oct 2022 07:43:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbiJKLnh (ORCPT ); Tue, 11 Oct 2022 07:43:37 -0400 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECE2F8F25D; Tue, 11 Oct 2022 04:43:34 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4Mmv4Z3YR4z6R4ld; Tue, 11 Oct 2022 19:41:18 +0800 (CST) Received: from k01.huawei.com (unknown [10.67.174.197]) by APP2 (Coremail) with SMTP id Syh0CgBX8NTXVkVj5HNpAA--.32480S7; Tue, 11 Oct 2022 19:43:33 +0800 (CST) From: Xu Kuohai To: bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, netdev@vger.kernel.org Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , 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 Subject: [PATCH bpf-next v4 5/6] selftests/bpf: Fix error failure of case test_xdp_adjust_tail_grow Date: Tue, 11 Oct 2022 08:01:07 -0400 Message-Id: <20221011120108.782373-6-xukuohai@huaweicloud.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221011120108.782373-1-xukuohai@huaweicloud.com> References: <20221011120108.782373-1-xukuohai@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: Syh0CgBX8NTXVkVj5HNpAA--.32480S7 X-Coremail-Antispam: 1UD129KBjvJXoW7uFy3ZFW5JFWkWr1fWr1fCrg_yoW8GFy7pa 4xJ3W7tFySqF12qF1DWFW29FW8Ga1kuF13Ca92qrW3Ar43JFn7tF4xKay5Was3KFWfXw1r Z34rKrn5Cws5JwUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUBSb4IE77IF4wAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUAV Cq3wA2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0 rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267 AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E 14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7 xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Y z7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lFIxGxcIEc7CjxVA2Y2ka0xkIwI1l42xK82IYc2 Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s02 6x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r4a6rW5MIIYrxkI7VAKI48JMIIF0x vE2Ix0cI8IcVAFwI0_JFI_Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1lIxAI cVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2js IEc7CjxVAFwI0_Gr1j6F4UJbIYCTnIWIevJa73UjIFyTuYvjxUFgAwUUUUU X-CM-SenderInfo: 50xn30hkdlqx5xdzvxpfor3voofrz/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_NONE autolearn=no 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 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); err = bpf_prog_test_run_opts(prog_fd, &topts); ASSERT_OK(err, "ipv6"); ASSERT_EQ(topts.retval, XDP_TX, "ipv6 retval"); -- 2.30.2