From patchwork Mon Mar 13 14:02:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 95236 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1110932obz; Mon, 13 Mar 2017 07:02:31 -0700 (PDT) X-Received: by 10.200.38.163 with SMTP id 32mr32159732qto.218.1489413751292; Mon, 13 Mar 2017 07:02:31 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id t188si468808qkh.308.2017.03.13.07.02.31; Mon, 13 Mar 2017 07:02:31 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D82B6634E3; Mon, 13 Mar 2017 14:02:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 182F66340F; Mon, 13 Mar 2017 14:02:27 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 03D77634BD; Mon, 13 Mar 2017 14:02:24 +0000 (UTC) Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by lists.linaro.org (Postfix) with ESMTPS id C53D66300A for ; Mon, 13 Mar 2017 14:02:20 +0000 (UTC) Received: by mail-oi0-f49.google.com with SMTP id m124so77963968oig.1 for ; Mon, 13 Mar 2017 07:02:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BYDc3SdFVGKP2WVT5XjBOl8ft3DbnuxLhKjybquAQ0w=; b=DtyRGzJ9yydcLFVDW8QVRe/eww731SmL4v5z5UERCAUBY1CP3+2uHLljht2XOwfhWA RrLVWkh3Dq+oPqEa9PjeDuOkOi9NvJJ8c1l2xJQCPqN7ufVY/HwNR4EnSeuJPn791VRf HLru2fKT+Co+LyqAe5udygnJA8Cbq1OOalZAq0fEOeE9fakPwYLWMomPT5gH5E85S7n1 XuvtVlXiqdAduLIxgmPq5/zEZQ1ta42Vd9XOnsib6EeQGfKvtRZbTQcXGNPkTESxNn6L hZozxvViRpvVnKU3kb0Rc6Fv/7ll5X3gjaqO9juYuPAvxiGHVYnim9z3fTn/umbUryyg yzhA== X-Gm-Message-State: AMke39k1QrwSD/o/1CCU7FHVDkrBU7bsWTVWp/80cD42WpxUXusBln1z5lySwqt9Z7XwuhAI+bk= X-Received: by 10.202.57.4 with SMTP id g4mr18388495oia.185.1489413740146; Mon, 13 Mar 2017 07:02:20 -0700 (PDT) Received: from localhost.localdomain (cpe-70-121-83-241.austin.res.rr.com. [70.121.83.241]) by smtp.gmail.com with ESMTPSA id r131sm8050129oib.25.2017.03.13.07.02.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Mar 2017 07:02:19 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 13 Mar 2017 09:02:15 -0500 Message-Id: <20170313140215.26841-1-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.12.0.rc1 Subject: [lng-odp] [PATCH] validation: packet: do not require a max packet length X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Address bug https://bugs.linaro.org/show_bug.cgi?id=2908 by checking the pool capability max packet length and modifying the test in test_extend_ref() to account for implementations that do not limit packet lengths. Signed-off-by: Bill Fischofer --- test/common_plat/validation/api/packet/packet.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- 2.12.0.rc1 Reviewed-by: Balasubramanian Manoharan > diff --git a/test/common_plat/validation/api/packet/packet.c b/test/common_plat/validation/api/packet/packet.c index 900c4263..5544c237 100644 --- a/test/common_plat/validation/api/packet/packet.c +++ b/test/common_plat/validation/api/packet/packet.c @@ -1847,6 +1847,9 @@ void packet_test_extend_ref(void) { odp_packet_t max_pkt, ref; uint32_t hr, tr, max_len; + odp_pool_capability_t capa; + + CU_ASSERT_FATAL(odp_pool_capability(&capa) == 0); max_pkt = odp_packet_copy(segmented_test_packet, odp_packet_pool(segmented_test_packet)); @@ -1860,8 +1863,10 @@ void packet_test_extend_ref(void) odp_packet_push_tail(max_pkt, tr); /* Max packet should not be extendable at either end */ - CU_ASSERT(odp_packet_extend_tail(&max_pkt, 1, NULL, NULL) < 0); - CU_ASSERT(odp_packet_extend_head(&max_pkt, 1, NULL, NULL) < 0); + if (max_len == capa.pkt.max_len) { + CU_ASSERT(odp_packet_extend_tail(&max_pkt, 1, NULL, NULL) < 0); + CU_ASSERT(odp_packet_extend_head(&max_pkt, 1, NULL, NULL) < 0); + } /* See if we can trunc and extend anyway */ CU_ASSERT(odp_packet_trunc_tail(&max_pkt, hr + tr + 1,