From patchwork Thu Feb 15 02: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: 128389 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1237340ljc; Wed, 14 Feb 2018 18:01:29 -0800 (PST) X-Google-Smtp-Source: AH8x225vxjw+jwX1h7aqWS+TU/HsT3gofnSxre7nTa6T3JWTIWkov8OOBHShCQYe2eqrYmuOfcEM X-Received: by 10.200.29.2 with SMTP id d2mr1774321qtl.246.1518660088915; Wed, 14 Feb 2018 18:01:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518660088; cv=none; d=google.com; s=arc-20160816; b=xQaAB28/UtX6Cqt1K6XLOZ2hIdFV5mk/YIMjG4QOTZ1ORij/KFH0DJJsY6RoHUMzWI 365DJbfFmciYzn9ozk7BlhJi88uB8Yxp9BOehuAFmk22GxAWp/7q+bixpkuDmesGJnwd nN/F0HDD5tN5757jRvA+lIsgjZit61epiiC+XQ+azIezYI1ekjqcnWwzwYOyamAU3REU wM9/vE6ufRnaXtg9nIigJ5wUNSTEpQpBlC6jQ558kNuDvFkutUILkTPjnKzuwpzBAwSi sxfukV/8UhgimvuCr3S5hStYBNv3RoCcvxZitqc9M6sPcxGmsXC/Lhuw1VU8ASbTtzmF dWLA== 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=lLb4OMQLAo0Mb9J1QQDbThZxiUIFCSSDcikbsLF4xPg=; b=Vn1hnxzHCZ13JU/mNZIylT1iKn1UI0DvIat8yaVRm78mS+iLKNxP1PIUtG9VvrI+O0 jrOzthMRDjSdq8RZokJVcphwkbVSg8QcfdJ2ZEgMG42J3qyOm5LSF7Pn5e2TzpoWwPnf e5H0W4P3EUrmS1OQngTHhkdmrXYq0q6jJ5wZnxJDXG3sWCvO9irnI0zSE8mv6/jRzDfv OO36EHH0IWySN4xHiGzeC+prOrJkF0XUR72C00/T8l66ImU0vVTf9TqgF+NBvx4ZIhO9 OtNmBWyukoeYFgx0J7MHg7EFUcN3ZA0ZlD3g41p5GuVt8xAl3Ydi2Dbgt3hF/rqCgN2Q f57A== 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 e19si9024690qka.382.2018.02.14.18.01.28; Wed, 14 Feb 2018 18:01:28 -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 92B09617F0; Thu, 15 Feb 2018 02:01:28 +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 272A260C8F; Thu, 15 Feb 2018 02:00:24 +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 152C0617EA; Thu, 15 Feb 2018 02:00:15 +0000 (UTC) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [37.140.190.183]) by lists.linaro.org (Postfix) with ESMTPS id A6A4D6068C for ; Thu, 15 Feb 2018 02:00:13 +0000 (UTC) Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward105o.mail.yandex.net (Yandex) with ESMTP id C05A844454DB for ; Thu, 15 Feb 2018 05:00:11 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback3j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id SOA02gYJy7-0BqOMlZl; Thu, 15 Feb 2018 05:00:11 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 6jl0Vbctpc-0BYKmBCu; Thu, 15 Feb 2018 05: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 05:00:09 +0300 Message-Id: <1518660009-4870-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518660009-4870-1-git-send-email-odpbot@yandex.ru> References: <1518660009-4870-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 479 Subject: [lng-odp] [PATCH v4 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 Fixes: https://bugs.linaro.org/show_bug.cgi?id=3628 --- /** 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: 9b9d263a8c8d97db779d6ae7d0c692617caa1047 **/ 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;