From patchwork Mon Dec 28 16:40:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 59026 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1807031lbb; Mon, 28 Dec 2015 08:42:23 -0800 (PST) X-Received: by 10.55.78.84 with SMTP id c81mr72219021qkb.85.1451320943601; Mon, 28 Dec 2015 08:42:23 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f11si65349533qge.19.2015.12.28.08.42.23; Mon, 28 Dec 2015 08:42:23 -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 1ADBD616EF; Mon, 28 Dec 2015 16:42:23 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=KHEDdSrv; 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_H2,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 7111E61700; Mon, 28 Dec 2015 16:40:34 +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 42C21616EF; Mon, 28 Dec 2015 16:40:28 +0000 (UTC) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) by lists.linaro.org (Postfix) with ESMTPS id 6C2BF616EF for ; Mon, 28 Dec 2015 16:40:22 +0000 (UTC) Received: by mail-lb0-f175.google.com with SMTP id oh2so93540413lbb.3 for ; Mon, 28 Dec 2015 08:40:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XxXvqMjAFwoa5nQU7WZsGN5NcHO3zOJ+AKhayWAMClg=; b=KHEDdSrvI4Z8MZYXFJRv9SIT9rO6XIQh91IgQfJ/hpy39RW84/CKC8S4Z0U4oMAOMJ mTPiB37bPz7vUM3UYWERtPKmo3YvYZJ7VTtfscbNTz45sAbxwolNfPWvUV3VwYcsONb7 x7xT2OMef3E+tfUgN6m0ho6W1Izuvnh+F+0LY= 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=XxXvqMjAFwoa5nQU7WZsGN5NcHO3zOJ+AKhayWAMClg=; b=lRfKlAt2aQSIabIArOtKSzskISYrqRs9O1A1KrH5XNw1Vp+LPQ1yRVTI8cINJsZgtm 3sCHtLpTNN5FTCquWFxE5RB8zYHOkeQJyCXFUMylmfLGDLCzb3cv00v+QWnui8L3MiZS 0dMvasBrsMMwbKBnJQry6ClWvLSxDdUbr0HBSRUZnqZoEsbVGIvTbqSP/nKR2n+T/Eae xpveLn1hS854ELiSjT1xPI0lL7ys7Cc1aRVzpn0X/LTiJdk2H8CAqcJYhNxkCRy/kUrK b275TNT1v303ho7qNgDoLgZf5bj9OfgU8jjft6UyToQF6dMKsYBwwgH6M0s/xps4NUnr e++g== X-Gm-Message-State: ALoCoQnK3mwNSS/NU3DdZssQ98rOv594rO1tg3Oarrof3XY7uSiIUeEMevnC/OllUz2GAtqA50yWUxZ8dBkzMJGqvbGCsbX12w== X-Received: by 10.112.73.69 with SMTP id j5mr11489666lbv.124.1451320821260; Mon, 28 Dec 2015 08:40:21 -0800 (PST) Received: from localhost.localdomain (ppp91-76-173-134.pppoe.mtu-net.ru. [91.76.173.134]) by smtp.gmail.com with ESMTPSA id kz5sm9252745lbc.7.2015.12.28.08.40.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Dec 2015 08:40:20 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Mon, 28 Dec 2015 19:40:12 +0300 Message-Id: <1451320813-9428-4-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1451320813-9428-1-git-send-email-maxim.uvarov@linaro.org> References: <1451320813-9428-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv2 3/4] validation: test odp_pktio_link_status() 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" Signed-off-by: Maxim Uvarov --- test/validation/pktio/pktio.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c index e473a1d..7b647a4 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include "pktio.h" @@ -1052,6 +1053,13 @@ void pktio_test_recv_on_wonly(void) ret = odp_pktio_start(pktio); CU_ASSERT_FATAL(ret == 0); + ret = odph_pktio_wait_linkup(pktio); + if (ret != -1) { + /* assert only if link state supported and + * it's down. */ + CU_ASSERT_FATAL(ret == 1); + } + ret = odp_pktio_recv(pktio, &pkt, 1); CU_ASSERT(ret < 0);