From patchwork Fri Jan 15 16:18:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 59874 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp644327lbb; Fri, 15 Jan 2016 08:18:47 -0800 (PST) X-Received: by 10.55.26.22 with SMTP id a22mr14141397qka.0.1452874727492; Fri, 15 Jan 2016 08:18:47 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g131si13933346qkb.102.2016.01.15.08.18.46; Fri, 15 Jan 2016 08:18:47 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 914A56194F; Fri, 15 Jan 2016 16:18:46 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=hNaz0Bww; dkim-adsp=none (unprotected policy); dkim-atps=neutral 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.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, 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 17FDB6193C; Fri, 15 Jan 2016 16:18:43 +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 F17D861941; Fri, 15 Jan 2016 16:18:40 +0000 (UTC) Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by lists.linaro.org (Postfix) with ESMTPS id A288E6193B for ; Fri, 15 Jan 2016 16:18:36 +0000 (UTC) Received: by mail-wm0-f50.google.com with SMTP id f206so26717680wmf.0 for ; Fri, 15 Jan 2016 08:18:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id; bh=FmppGVVxyWgnH4TEtsbf+JWh2zNXTfPgF3dUzGJL15w=; b=hNaz0BwwUpxgl1kal7hZ7c+vsMHXmjo5jYdQ5sWq1ILn+PimdoppAkOTtMnSOKVIsY POkdCZqfFURxcYuQMljUUebvWMtMQTiiXgmtaN7CtemNjxuNcCXATKSOODThSXPlzgFo IqjnFBVG6SSlKZFatUi8jbVmk9g/MBZQUbKzg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=FmppGVVxyWgnH4TEtsbf+JWh2zNXTfPgF3dUzGJL15w=; b=hN5Qz5QUD3D502RPSqbrfkY7bD4Sq619Nz1lAWHLysCBECfhBMvXA+OsbRCggx68V6 kkv1POByYWHSUDavMuDm1bbPuziA+Yw6xOPvkg6MxUxHi6pSDKw622j0kFcoCLKLHk9k pvQP5envVHkjAAFEy5sPXUQbIYDH8U+eI5thGypJXRw6numOvfUuiooJQQ+qwy1vR1x6 ur+eC3cIY+RA+hljsROSz0JS7770mIOunnmtVPupaaVI63e12UJTVjqc9/Z0gsFFjXdM fcj3LT6qHtXiWyGPfYC9UnBYPt6WqE5JmYwtFBxSQRh+0azjLtBxo8IoLhNLon/z8ErU Heiw== X-Gm-Message-State: AG10YOSHr5EnlIJ1qQyThKc3ikLaJvq8JX2BhycdyOCDZE6Rx9h2CiFBp2b6ER0ZxGE0BSXwrwA= X-Received: by 10.28.98.133 with SMTP id w127mr4206574wmb.4.1452874715824; Fri, 15 Jan 2016 08:18:35 -0800 (PST) Received: from e106441.emea.arm.com ([2001:41d0:a:3cb4::1]) by smtp.gmail.com with ESMTPSA id x6sm11208139wje.38.2016.01.15.08.18.34 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Jan 2016 08:18:34 -0800 (PST) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Fri, 15 Jan 2016 16:18:26 +0000 Message-Id: <1452874706-32033-1-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 X-Topics: patch Subject: [lng-odp] [PATCH] validation: pktio: reduce stdout noise 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" Printing the pktio info every time a pktio is opened generates a load of noise on stdout and makes it difficult to see the status of individual test cases. Signed-off-by: Stuart Haslam Reviewed-by: Ivan Khoronzhuk --- Log goes from this: http://people.linaro.org/~stuart.haslam/pktio1.log To this: http://people.linaro.org/~stuart.haslam/pktio2.log test/validation/pktio/pktio.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c index b3732bb..9c8c871 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -293,10 +293,6 @@ static odp_pktio_t create_pktio(int iface_idx, odp_pktio_input_mode_t imode, CU_ASSERT(pktio != ODP_PKTIO_INVALID); CU_ASSERT(odp_pktio_to_u64(pktio) != odp_pktio_to_u64(ODP_PKTIO_INVALID)); - /* Print pktio debug info and test that the odp_pktio_print() function - * is implemented. */ - if (pktio != ODP_PKTIO_INVALID) - odp_pktio_print(pktio); if (wait_for_network) spin_wait(ODP_TIME_SEC_IN_NS / 4); @@ -734,6 +730,24 @@ void pktio_test_lookup(void) CU_ASSERT(odp_pktio_lookup(iface_name[0]) == ODP_PKTIO_INVALID); } +static void pktio_test_print(void) +{ + odp_pktio_t pktio; + int i; + + for (i = 0; i < num_ifaces; ++i) { + pktio = create_pktio(i, ODP_PKTIN_MODE_POLL, + ODP_PKTOUT_MODE_SEND); + CU_ASSERT_FATAL(pktio != ODP_PKTIO_INVALID); + + /* Print pktio debug info and test that the + * odp_pktio_print() function is implemented. */ + odp_pktio_print(pktio); + + CU_ASSERT(odp_pktio_close(pktio) == 0); + } +} + void pktio_test_inq(void) { odp_pktio_t pktio; @@ -1217,6 +1231,7 @@ int pktio_suite_term(void) odp_testinfo_t pktio_suite_unsegmented[] = { ODP_TEST_INFO(pktio_test_open), ODP_TEST_INFO(pktio_test_lookup), + ODP_TEST_INFO(pktio_test_print), ODP_TEST_INFO(pktio_test_inq), ODP_TEST_INFO(pktio_test_poll_queue), ODP_TEST_INFO(pktio_test_poll_multi),