From patchwork Thu Feb 15 01:00:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 128387 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1197598ljc; Wed, 14 Feb 2018 17:00:59 -0800 (PST) X-Google-Smtp-Source: AH8x226FQIF9zQBckfKug+0IHX+wgKF75iZlIjnLVphAjGgUf4s3VryqvNtsewQ+Uaj3G1l3fNcP X-Received: by 10.55.75.151 with SMTP id y145mr1549416qka.281.1518656459734; Wed, 14 Feb 2018 17:00:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518656459; cv=none; d=google.com; s=arc-20160816; b=shooqZ4KYaGWw54Kq2uUo50T6aE/svu5foe1Wgl9XKebVAR1wIX0Bn6YgKau/oVFgi GujXyC0+H/jt4nKsGCmWP2jrr5Ht2Bj40veh0+4xLZI5U5I1kUeuusqQtxigOwMAwQqb 12e5/k9IdZRk5Ix5WbsC+MDzQ3/UL4QtNF4DiP+O9sfGxMpej6o5tpZ/yW5it1PlIX2s 8QwDjw2Kmr4FrTlbfls2R2omojfZaj1VNTaeXI2vonKU3+SkFAWoZftXWwqJXjGl8hZ7 /TLpAPU75ZNGtNs0iYiUTiAgsQU8IpgMnqfVoJp3AhGk85wlroZ58UogXDl2uWnIdeSE Cq0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=lMZuNYmXB0qSTNtg0qCpzWEm6SnpnXlArFuHyhmP2J0=; b=VrdKkcFguhGQbVLbs+l6hNQBWBeFsWX5+QcHHDFyntukx45u0TxRfEwqYE76EwDFyE nSW2RuK6krZDxQeUrHyibtWOeGVMXNBgxWda3Wz6RG/+eBaQfuYE30JdU4v2LAqMOdds 3J6x6EDNIjZT6RFz8RfXZzYcC8J77mrioLZDKeENai8IPWee+OgFHP2x0Z0R5BX6WPaZ eFv8gDPakmCHh/RS44mAe1Q4T/H0onj1QDG+tfRXxUhSu8NY/s33aPcif7mlyWi8kMgU QymFvfhX6DhD9qhf8YMCFDhLNX3yf4tl5yJBmbHJ/ReSdI9YsOXrI27iwLFYwVK0u8TH xTlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id a6si1754893qkb.411.2018.02.14.17.00.59; Wed, 14 Feb 2018 17:00:59 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 611666174A; Thu, 15 Feb 2018 01:00:59 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 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 19F9A617B5; Thu, 15 Feb 2018 01:00:19 +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 B5D6A6174A; Thu, 15 Feb 2018 01:00:15 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id A8F126093A for ; Thu, 15 Feb 2018 01:00:13 +0000 (UTC) Received: from mxback5o.mail.yandex.net (mxback5o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1f]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 391C01245369 for ; Thu, 15 Feb 2018 04:00:12 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback5o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id CUg9kNTp7k-0CTq88Pp; Thu, 15 Feb 2018 04:00:12 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id mdVomAt4eE-0BY85kXw; Thu, 15 Feb 2018 04:00:11 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Thu, 15 Feb 2018 04:00:09 +0300 Message-Id: <1518656409-31169-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518656409-31169-1-git-send-email-odpbot@yandex.ru> References: <1518656409-31169-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 479 Subject: [lng-odp] [PATCH v3 2/2] validation: timer: fix "Failed to set timer" error 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Occasionally timer test will try to set timer to a tick that has just passed. It is not an error per se, so it should be handled properly. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 479 (lumag:timer-fix) ** https://github.com/Linaro/odp/pull/479 ** Patch: https://github.com/Linaro/odp/pull/479.patch ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847 ** Merge commit sha: eff72e496790b8e924e3fceaea22548fa28241b8 **/ test/validation/api/timer/timer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/validation/api/timer/timer.c b/test/validation/api/timer/timer.c index da2dc05ca..0dfb565e2 100644 --- a/test/validation/api/timer/timer.c +++ b/test/validation/api/timer/timer.c @@ -386,7 +386,10 @@ static int worker_entrypoint(void *arg TEST_UNUSED) odp_timer_ns_to_tick(tp, (rand_r(&seed) % RANGE_MS) * 1000000ULL); timer_rc = odp_timer_set_abs(tt[i].tim, tck, &tt[i].ev); - if (timer_rc != ODP_TIMER_SUCCESS) { + if (timer_rc == ODP_TIMER_TOOEARLY) { + LOG_ERR("Missed tick, setting timer\n"); + } else if (timer_rc != ODP_TIMER_SUCCESS) { + LOG_ERR("Failed to set timer: %d\n", timer_rc); CU_FAIL("Failed to set timer"); } else { tt[i].tick = tck;