From patchwork Thu Apr 30 08:40:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Badicioiu X-Patchwork-Id: 47775 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A11CD20553 for ; Thu, 30 Apr 2015 08:43:16 +0000 (UTC) Received: by lbcne10 with SMTP id ne10sf12610503lbc.1 for ; Thu, 30 Apr 2015 01:43:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:mime-version:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=E1Klw5AhAtZDc46YP6nv3UA2KcAMRPOexn+3uH/xmfw=; b=FfkOA0qz0R8wCbVhhXCxWxwW9oAbC4iek7IjeZCpqkPDhDsU6OTaGepNUSHCh0KJRI 2XvAc/Z8PM1N2v+q7AShV7ZKJH4fnV4BVXpEAGsQDAqfPBw7gr9OZH+6icvdihSpE2cD E7MSViagfoMyrYbA3AiXqW+SasKcCHvcAe0vpj4HfNHYojbdQotbqnmPu0PjQqJc7XEx wWfqRWLroL/Q+Td6zHaaUsPS3sglWNTykMk+0tVDC3P7v1gfy+PBhnTA8YqFrfscmplc 3hzTFMz5Cqh3AJ+96DJ0Nwor0BFKn/Yhf4xFu4q5sZjh0vT9fiJPn2euSJ6iw4TLeFZL Y7GQ== X-Gm-Message-State: ALoCoQmhstcMu89P6Vjg3IQeSET/OIQkGJv7Hv0gVP3xMOR7yv1EXJNX6mW+JE9kic60TXgpSfZ0 X-Received: by 10.180.216.12 with SMTP id om12mr1111674wic.1.1430383395176; Thu, 30 Apr 2015 01:43:15 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.72 with SMTP id h8ls352462laa.71.gmail; Thu, 30 Apr 2015 01:43:15 -0700 (PDT) X-Received: by 10.112.125.33 with SMTP id mn1mr2835592lbb.82.1430383395006; Thu, 30 Apr 2015 01:43:15 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id ko5si1264267lbb.43.2015.04.30.01.43.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Apr 2015 01:43:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbuc2 with SMTP id uc2so39045125lbb.2 for ; Thu, 30 Apr 2015 01:43:14 -0700 (PDT) X-Received: by 10.112.140.231 with SMTP id rj7mr2786608lbb.76.1430383394771; Thu, 30 Apr 2015 01:43:14 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp2977763lbt; Thu, 30 Apr 2015 01:43:14 -0700 (PDT) X-Received: by 10.229.192.199 with SMTP id dr7mr3333066qcb.8.1430383393428; Thu, 30 Apr 2015 01:43:13 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u123si23002110qhd.83.2015.04.30.01.43.11; Thu, 30 Apr 2015 01:43:13 -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; Received: by lists.linaro.org (Postfix, from userid 109) id 6358461DB8; Thu, 30 Apr 2015 08:43:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 5031E61C80; Thu, 30 Apr 2015 08:43:09 +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 22A9B61C96; Thu, 30 Apr 2015 08:43:07 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0091.outbound.protection.outlook.com [157.56.111.91]) by lists.linaro.org (Postfix) with ESMTPS id 8D1C861C80 for ; Thu, 30 Apr 2015 08:43:06 +0000 (UTC) Received: from DM2PR03CA0024.namprd03.prod.outlook.com (10.141.96.23) by BN3PR0301MB1284.namprd03.prod.outlook.com (25.161.210.148) with Microsoft SMTP Server (TLS) id 15.1.154.19; Thu, 30 Apr 2015 08:43:05 +0000 Received: from BN1BFFO11FD032.protection.gbl (2a01:111:f400:7c10::1:196) by DM2PR03CA0024.outlook.office365.com (2a01:111:e400:2428::23) with Microsoft SMTP Server (TLS) id 15.1.154.19 via Frontend Transport; Thu, 30 Apr 2015 08:43:05 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 192.88.158.2 as permitted sender) Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD032.mail.protection.outlook.com (10.58.144.95) with Microsoft SMTP Server (TLS) id 15.1.160.8 via Frontend Transport; Thu, 30 Apr 2015 08:43:04 +0000 Received: from fsr-fed1364-15.ea.freescale.net (fsr-fed1364-15.ea.freescale.net [10.171.81.144]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t3U8h2nc025266; Thu, 30 Apr 2015 01:43:03 -0700 From: To: Date: Thu, 30 Apr 2015 11:40:51 +0300 Message-ID: <1430383251-29202-1-git-send-email-alexandru.badicioiu@linaro.org> X-Mailer: git-send-email 1.7.3.4 X-EOPAttributedMessage: 0 X-Matching-Connectors: 130748569851625803; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(189002)(199003)(19580405001)(19580395003)(106466001)(6806004)(46102003)(50986999)(48376002)(86362001)(2351001)(50466002)(5001960100002)(105596002)(36756003)(229853001)(87936001)(50226001)(62966003)(77156002)(92566002)(77096005)(47776003)(104016003)(33646002)(86152002)(110136002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0301MB1284; H:az84smr01.freescale.net; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1284; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:BN3PR0301MB1284; BCL:0; PCL:0; RULEID:(400006); SRVR:BN3PR0301MB1284; X-Forefront-PRVS: 056297E276 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2015 08:43:04.9285 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0301MB1284 X-Topics: patch Subject: [lng-odp] [PATCH 1/1] validation: pktio: fix polling tests X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: alexandru.badicioiu@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Alexandru Badicioiu Some tests poll input queues for packets but the queues are setup as scheduled. Signed-off-by: Alexandru Badicioiu Reviewed-by: Stuart Haslam --- test/validation/odp_pktio.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c index 8df367d..33ed80a 100644 --- a/test/validation/odp_pktio.c +++ b/test/validation/odp_pktio.c @@ -227,7 +227,7 @@ static odp_pktio_t create_pktio(const char *iface) return pktio; } -static int create_inq(odp_pktio_t pktio) +static int create_inq(odp_pktio_t pktio, odp_queue_type_t qtype) { odp_queue_param_t qparam; odp_queue_t inq_def; @@ -242,7 +242,9 @@ static int create_inq(odp_pktio_t pktio) inq_def = odp_queue_lookup(inq_name); if (inq_def == ODP_QUEUE_INVALID) inq_def = odp_queue_create(inq_name, - ODP_QUEUE_TYPE_PKTIN, &qparam); + ODP_QUEUE_TYPE_PKTIN, + qtype == ODP_QUEUE_TYPE_POLL ? NULL : &qparam); + CU_ASSERT(inq_def != ODP_QUEUE_INVALID); return odp_pktio_inq_setdef(pktio, inq_def); @@ -410,7 +412,7 @@ static void pktio_test_txrx(odp_queue_type_t q_type, int num_pkts) CU_FAIL("failed to open iface"); return; } - create_inq(io->id); + create_inq(io->id, q_type); io->outq = odp_pktio_outq_getdef(io->id); if (q_type == ODP_QUEUE_TYPE_POLL) io->inq = odp_pktio_inq_getdef(io->id); @@ -526,7 +528,7 @@ static void test_odp_pktio_inq_remdef(void) int i; CU_ASSERT(pktio != ODP_PKTIO_INVALID); - CU_ASSERT(create_inq(pktio) == 0); + CU_ASSERT(create_inq(pktio, ODP_QUEUE_TYPE_POLL) == 0); CU_ASSERT((inq = odp_pktio_inq_getdef(pktio)) != ODP_QUEUE_INVALID); CU_ASSERT(odp_pktio_inq_remdef(pktio) == 0); @@ -583,7 +585,7 @@ static void test_odp_pktio_inq(void) pktio = create_pktio(iface_name[0]); CU_ASSERT(pktio != ODP_PKTIO_INVALID); - CU_ASSERT(create_inq(pktio) == 0); + CU_ASSERT(create_inq(pktio, ODP_QUEUE_TYPE_POLL) == 0); CU_ASSERT(destroy_inq(pktio) == 0); CU_ASSERT(odp_pktio_close(pktio) == 0); }