From patchwork Thu Apr 21 00:14:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 66265 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2742822qge; Wed, 20 Apr 2016 17:18:57 -0700 (PDT) X-Received: by 10.55.159.73 with SMTP id i70mr15677692qke.29.1461197937456; Wed, 20 Apr 2016 17:18:57 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id a202si4281858qkc.132.2016.04.20.17.18.57; Wed, 20 Apr 2016 17:18:57 -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 E396A686A9; Thu, 21 Apr 2016 00:18:56 +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 8100A684A3; Thu, 21 Apr 2016 00:15:12 +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 6C08F684A3; Thu, 21 Apr 2016 00:14:57 +0000 (UTC) Received: from mail-oi0-f50.google.com (mail-oi0-f50.google.com [209.85.218.50]) by lists.linaro.org (Postfix) with ESMTPS id 14C2168625 for ; Thu, 21 Apr 2016 00:14:25 +0000 (UTC) Received: by mail-oi0-f50.google.com with SMTP id k142so61084631oib.1 for ; Wed, 20 Apr 2016 17:14:25 -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:in-reply-to :references; bh=7odpa2J1to1Awz3lNYn5haBw3Ydiet28o/mKWBrHzFs=; b=YjjbRo9grklqtfLyNwiM1Kk0r5Z6yEUDjPbObZ6yarGTuRFWsO5MRtFZBi+Hx92W9I M86HAczzuTty2YiyAsIAIZ+b1bGd8p7NhVbookzLhcBQL6dSgPIw0+hgjJNYvkMOeMdT AHzVFfnl5VXsLPfNBGYJRltgC9UO78RHdQ62cVkM/w+YrJ9BjYwlVXPM+eQjoM/Jc5IJ aPheQw57CCsgypz1eOZQT6c5G3FIH34+MbyH/QcE9tvsjhp/FLtzf7Y/jQYcxOgT04hR sJG8qQa0wmGYJojthH/Sxkf0zjtY+wewhQGVKdY1tCjz9s/afaedLeEUPem5B2oNSDLS 5n9A== X-Gm-Message-State: AOPr4FWs+If9ig0FUbTPsqqKN1u/2inJrQcceNIWmPKd+2W3nDIe6oc1h3m9AJOuZCpMRb+m0l0= X-Received: by 10.202.54.212 with SMTP id d203mr4825946oia.23.1461197664635; Wed, 20 Apr 2016 17:14:24 -0700 (PDT) Received: from Ubuntu15.localdomain (cpe-66-68-129-43.austin.res.rr.com. [66.68.129.43]) by smtp.gmail.com with ESMTPSA id a34sm335otb.1.2016.04.20.17.14.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Apr 2016 17:14:24 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Wed, 20 Apr 2016 19:14:11 -0500 Message-Id: <1461197655-23743-8-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1461197655-23743-1-git-send-email-bill.fischofer@linaro.org> References: <1461197655-23743-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv4 07/11] validation: pktio: add pktio config test 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" From: Matias Elo Add new validation test for odp_pktio_config(). Signed-off-by: Matias Elo Reviewed-and-tested-by: Bill Fischofer --- test/validation/pktio/pktio.c | 23 +++++++++++++++++++++++ test/validation/pktio/pktio.h | 1 + 2 files changed, 24 insertions(+) diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c index 6dc6505..7568985 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -978,6 +978,29 @@ static void pktio_test_print(void) } } +void pktio_test_pktio_config(void) +{ + odp_pktio_t pktio; + odp_pktio_capability_t capa; + odp_pktio_config_t config; + + pktio = create_pktio(0, ODP_PKTIN_MODE_DIRECT, ODP_PKTOUT_MODE_DIRECT); + CU_ASSERT_FATAL(pktio != ODP_PKTIO_INVALID); + + odp_pktio_config_init(&config); + + CU_ASSERT(odp_pktio_config(pktio, NULL) == 0); + + CU_ASSERT(odp_pktio_config(pktio, &config) == 0); + + CU_ASSERT_FATAL(odp_pktio_capability(pktio, &capa) == 0); + + config = capa.config; + CU_ASSERT(odp_pktio_config(pktio, &config) == 0); + + CU_ASSERT_FATAL(odp_pktio_close(pktio) == 0); +} + void pktio_test_pktin_queue_config_direct(void) { odp_pktio_t pktio; diff --git a/test/validation/pktio/pktio.h b/test/validation/pktio/pktio.h index 495031b..9c1b210 100644 --- a/test/validation/pktio/pktio.h +++ b/test/validation/pktio/pktio.h @@ -26,6 +26,7 @@ void pktio_test_open(void); void pktio_test_lookup(void); void pktio_test_index(void); void pktio_test_inq(void); +void pktio_test_pktio_config(void); void pktio_test_pktin_queue_config_direct(void); void pktio_test_pktin_queue_config_sched(void); void pktio_test_pktin_queue_config_queue(void);