From patchwork Thu May 12 15:50:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 67684 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp827054qge; Thu, 12 May 2016 08:50:56 -0700 (PDT) X-Received: by 10.140.23.37 with SMTP id 34mr10492795qgo.14.1463068256137; Thu, 12 May 2016 08:50:56 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 65si4316429qkx.158.2016.05.12.08.50.55; Thu, 12 May 2016 08:50:55 -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 dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 65FA761649; Thu, 12 May 2016 15:50:55 +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=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, 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 9FAF561605; Thu, 12 May 2016 15:50:53 +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 DB0FE61647; Thu, 12 May 2016 15:50:51 +0000 (UTC) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by lists.linaro.org (Postfix) with ESMTPS id BA63D615E3 for ; Thu, 12 May 2016 15:50:47 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id h1so13008247lbj.3 for ; Thu, 12 May 2016 08:50:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Sxh6WTkQicPcNIdcxtBGaVj7KPCLnu1NsVCw1V2g2Hs=; b=ftpK0CF3n2FsOguKE8Sflp4/eB+g935sb+LU5m5iufQlTl9H+VUz38M1seyZK+Edsi Yf2ty6E52fL4+re0mKwnt0rxIgwhsc/J5O2TDmo0L2/s0DJNKPgaN979NRV5Bdy/JsTk NpeMzrdJFFwYsyZab4dyLCLyV8aQ9Enq8in0tCIKN0zuaFacMCpPcD+9BXRLey+ldLXG o6BTEwYRgmMNaJbuRVV/lBHDr2ksWK6nSBvlkDjg9oFOUSrBoWfXZsDb6zkHpAiHa8A2 W3nR2pODlICMi5YB40JoOtSbuxx3+reGEXSbPVZjKEHVQH8DnRN/7oZ05E56n/8iZF6L JjXA== X-Gm-Message-State: AOPr4FUW+8NlCfPrpvY126/NH22O/GhSxUoq+7xXESptwmkMoBj33imrdAxLn3njYh6HNv6Vr4A= X-Received: by 10.112.214.235 with SMTP id od11mr4665628lbc.21.1463068246628; Thu, 12 May 2016 08:50:46 -0700 (PDT) Received: from localhost.localdomain (ppp91-77-173-31.pppoe.mtu-net.ru. [91.77.173.31]) by smtp.gmail.com with ESMTPSA id l21sm2239027lfi.37.2016.05.12.08.50.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 May 2016 08:50:45 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Thu, 12 May 2016 18:50:35 +0300 Message-Id: <1463068235-16953-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 X-Topics: patch Subject: [lng-odp] [PATCH] validation: pktio: initialize pkt_seq 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" recv_packets_tmo() has if for not initialized pkt_seq array, while init is done in create_packets(), so we need just reorder that lines. https://bugs.linaro.org/show_bug.cgi?id=2222 Signed-off-by: Maxim Uvarov Reviewed-by: Bill Fischofer --- test/validation/pktio/pktio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c index a51e0b2..90adc02 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -919,16 +919,16 @@ static void test_recv_tmo(recv_tmo_mode_e mode) ret = odp_pktout_queue(pktio_tx, &pktout_queue, 1); CU_ASSERT_FATAL(ret > 0); + ret = create_packets(pkt_tbl, pkt_seq, test_pkt_count, pktio_tx, + pktio_rx); + CU_ASSERT_FATAL(ret == test_pkt_count); + /* No packets sent yet, so should wait */ ns = 100 * ODP_TIME_MSEC_IN_NS; - ret = recv_packets_tmo(pktio_rx, pkt_tbl, pkt_seq, 1, mode, + ret = recv_packets_tmo(pktio_rx, &pkt_tbl[0], &pkt_seq[0], 1, mode, odp_pktin_wait_time(ns), ns); CU_ASSERT(ret == 0); - ret = create_packets(pkt_tbl, pkt_seq, test_pkt_count, pktio_tx, - pktio_rx); - CU_ASSERT_FATAL(ret == test_pkt_count); - ret = odp_pktout_send(pktout_queue, pkt_tbl, test_pkt_count); CU_ASSERT_FATAL(ret == test_pkt_count);