From patchwork Fri May 13 12:44:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 67779 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp247554qge; Fri, 13 May 2016 05:45:21 -0700 (PDT) X-Received: by 10.55.145.6 with SMTP id t6mr15592981qkd.206.1463143521048; Fri, 13 May 2016 05:45:21 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id b70si11996029qge.25.2016.05.13.05.45.15; Fri, 13 May 2016 05:45:21 -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 08DF161651; Fri, 13 May 2016 12:45:15 +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 58A62615DA; Fri, 13 May 2016 12:45:10 +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 A0E6D615E1; Fri, 13 May 2016 12:45:08 +0000 (UTC) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) by lists.linaro.org (Postfix) with ESMTPS id 7F1AA615D8 for ; Fri, 13 May 2016 12:45:07 +0000 (UTC) Received: by mail-lf0-f50.google.com with SMTP id j8so87414481lfd.2 for ; Fri, 13 May 2016 05:45:07 -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=0RJPoGYJVC7qFH5RgOht1pRaCP0WDbczt/FE0iM3Ugo=; b=F+lWFP6PcH2Z/UC5i4wFQ9staVI/5Rii5ZpjVeCwM2ZqKVVPGmwGY1ZiaHGpdZSm9c j9urutxclYCyj6FnfzLFpsf63U5AQeUj+SJKo8/2TcYhNZP+zCCOU+R6CbtImkSQER36 QifD8zQ0CKBsC+nrjkXCV8UQY6NoEmGmTBvSOAdmeBMqocxjrkyHLZ5dDWQB3p0ZfPtz p+YO508AWD0EEKu3RdzWtgJg1nKqPaPr+JjhWj1FDYoMdh9smTjgK0LHW26oVPTsWU6j e4LDGwlqG13Mj6MQkeP/lw8OmTf925qKAkeFpxrR0NRkAWraiIlCGB9SfV6wINORODG5 HXfA== X-Gm-Message-State: AOPr4FVjAKadSNdglg1idmNiG1hBXZvJ0iaZ4KLClhkPYGOuvq1e5O4dYYZgYDm2eSLqOv4CqFQ= X-Received: by 10.25.163.15 with SMTP id m15mr6912434lfe.93.1463143505976; Fri, 13 May 2016 05:45:05 -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 s203sm2891239lfd.23.2016.05.13.05.45.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 May 2016 05:45:05 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Fri, 13 May 2016 15:44:51 +0300 Message-Id: <1463143491-13172-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 X-Topics: patch Subject: [lng-odp] [PATCHv2] 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" Initialize to zero pkt_seq array first used in recv_packets_tmo(). https://bugs.linaro.org/show_bug.cgi?id=2222 Signed-off-by: Maxim Uvarov --- test/validation/pktio/pktio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c index a51e0b2..d035a26 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -919,9 +919,11 @@ static void test_recv_tmo(recv_tmo_mode_e mode) ret = odp_pktout_queue(pktio_tx, &pktout_queue, 1); CU_ASSERT_FATAL(ret > 0); + memset(pkt_seq, 0, sizeof(pkt_seq)); + /* 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);