From patchwork Wed Feb 21 00:00:06 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: 128984 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp14799ljc; Tue, 20 Feb 2018 16:00:56 -0800 (PST) X-Google-Smtp-Source: AH8x225tp4dJ6s9EzM/mVnTl/uEDbVEccbe1LOG2t98T1af6bLM0A19IWQPGPW2Id/lLNEEC18XE X-Received: by 10.237.43.226 with SMTP id e89mr2444483qtd.17.1519171256322; Tue, 20 Feb 2018 16:00:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519171256; cv=none; d=google.com; s=arc-20160816; b=NjdW3t+s7XHwul3xcbt+Yb3HD09xCADOv/yLD0yGkvXB783/jz4QuGoR8DX+YLgK+Z UmYTSzlbkOkJk8X/4QlbrQHdK9F0m2nQsbM2TXiHZtzpCzvyxgB1HVwjQEaVvxfURgXm AQL+s5+lG8cpiv5cJwR27URxHKEsoA8AC4//bKBcyf1qJrXHA5WhL2S3tlG7HW7vI7Yb tJHndJJi25oJrLGvqmYLjz8VNIgWDf8+R1JX3RFj+oNgFMUOR5H77SM323BS9H8SUU/I +5zJbfMAFC2x8CsJoEkdT+zXa5ya/I2Sm6JriZhj80ps/jc7qFvyd5MuDf5R5zzFwDj2 32jA== 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=b7bdZiMBzED61QISu/lE4OGBv9ZKcnduKD4cNS+gCHg=; b=QBOqDduxbUWALum61Ow2nLUFaLnY3dGIZ4Eal/WitrSeOSPYFA8+5++ujgo3ofHbLS JPwXL5pU/ImbRtEMXAR5kYj2fg8zdtKSDGIWjs94b+Y4QYLq8dtshXvEd/cXJGfWW2LH ESPJN73Hi4ac2FgQrvC09InZYac00EMxc+8Ao9olOB5F1CA7fY+v2jl63aE48A1MgTJI jld5e+MlZQJNiEcwZtJVNnOvDeAtX8tw7OADyCRmILbIw+G1R8Q6MXhJLMOZ7RMWplkJ ad7oem9TozdYSTa58ztH0a82nn8gRIQdEUaz8AKm3tA8fq5wJDfKdNJMMmzFzli7E6hg ixrw== 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 m5si3056448qkd.12.2018.02.20.16.00.54; Tue, 20 Feb 2018 16:00:56 -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 6D85E60883; Wed, 21 Feb 2018 00:00:54 +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 05D8F61762; Wed, 21 Feb 2018 00: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 B464861755; Wed, 21 Feb 2018 00:00:13 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id E858E61736 for ; Wed, 21 Feb 2018 00:00:11 +0000 (UTC) Received: from mxback1g.mail.yandex.net (mxback1g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:162]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 84755705001 for ; Wed, 21 Feb 2018 03:00:10 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback1g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id JRsh7Xaj8c-0AK4bkt3; Wed, 21 Feb 2018 03:00:10 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id zJRMDvitb1-09hC2g9S; Wed, 21 Feb 2018 03:00:09 +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: Wed, 21 Feb 2018 03:00:06 +0300 Message-Id: <1519171208-17451-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519171208-17451-1-git-send-email-odpbot@yandex.ru> References: <1519171208-17451-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 491 Subject: [lng-odp] [PATCH v2 1/3] 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 491 (lumag:timer-fix-2) ** https://github.com/Linaro/odp/pull/491 ** Patch: https://github.com/Linaro/odp/pull/491.patch ** Base sha: 5a58bbf2bb331fd7dde2ebbc0430634ace6900fb ** Merge commit sha: cdd45b49da3a6602badcf7c456c6b26d34dd2c9f **/ 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 26a5b6086..b4e903768 100644 --- a/test/validation/api/timer/timer.c +++ b/test/validation/api/timer/timer.c @@ -372,7 +372,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;