From patchwork Tue Feb 20 17: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: 128926 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4849068ljc; Tue, 20 Feb 2018 09:00:59 -0800 (PST) X-Google-Smtp-Source: AH8x224coSpviEMLe796ox0kbna5L+qSkMdGDcFR3sBFQtKs89UE+txa5hlAS2cAqMc3AA5O4UzD X-Received: by 10.129.109.1 with SMTP id i1mr240951ywc.113.1519146059503; Tue, 20 Feb 2018 09:00:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519146059; cv=none; d=google.com; s=arc-20160816; b=Ignf47rwOApwpUR8G0RVLyp+8v4gIqr98A0wCuD5f43iqmq1W60qPhQnLwi3PZuCF/ zneIbz1lTbgHakZU4kA7t2UGa1fwS/ELuEOFAsyY/7TunPpNUTfq0Z0CdGhtq8iGmSSS mlHStWyg/50g3D/NoRgEAo4bU5MbCQsKIFvVZkWLyyvepavu/fstgccP7LOWo+0okfd1 E+doGvlhDp3KXqBg573PrB6eQ8vRFdCwZhSVl0zsiOc0AhsawWoh6oUkF/YRWqK2L8kw 45vxkQbcwi4Fu7JKq7kcpaC8dZdXEPsgN7yieGotR9Og8xPeHnDzrScnm+XzcpRM84he KrWw== 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=kZ/MVevFTd6YWnmie9La/LP9HxCT7klpzPHZdkK9wLc=; b=eKsDfG7GS0S5Dum1J1qCnc+p30cvGcZCFUeJs7tBZPSgM3xNdTMBIPL+ZJXLyIwXZp /WqQrVngwUEask7HuZjw/+YJ6bowZbwbgg09W41VJ65SLJ4XGafzRMT/k17OuF6mHFGt 7e2CECb2ybTa0/Yomjyjl03mQpbLn30/NoWujJ6Se9mL5f1mwvlrv1hGd6SwohGZ+p2s Qqe5y3qHP38V2IHdURreQBL4JMwSzopT7OXSt8v6j14iUTUzZ5VtYcX/eBKxPKn3wPVI 553bBmj3fXEf6U+BMGxqKutY4y4nEY+eM4hW7/Qx5lL5DgZyud91hfyHNs2q7pjDoyv+ x6JA== 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 p22si6531535qkl.75.2018.02.20.09.00.59; Tue, 20 Feb 2018 09: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 1EB4061520; Tue, 20 Feb 2018 17: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 B0B366150C; Tue, 20 Feb 2018 17:00:20 +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 B86DD610B9; Tue, 20 Feb 2018 17:00:13 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 787846094D for ; Tue, 20 Feb 2018 17:00:11 +0000 (UTC) Received: from mxback5g.mail.yandex.net (mxback5g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:166]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 013722A244E6 for ; Tue, 20 Feb 2018 20:00:10 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback5g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id PgJyXSlkeD-09QWgvVX; Tue, 20 Feb 2018 20:00:09 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id j65fuiFbN5-09EaaXbT; Tue, 20 Feb 2018 20: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: Tue, 20 Feb 2018 20:00:06 +0300 Message-Id: <1519146008-3368-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519146008-3368-1-git-send-email-odpbot@yandex.ru> References: <1519146008-3368-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 491 Subject: [lng-odp] [PATCH v1 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: d5419e8857b2bc61d3be17fe53f171550fee426b ** Merge commit sha: 1623e4e7c0742c5238c1b97abe1e8af93f091443 **/ 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 7ea508aa0..c3b807aee 100644 --- a/test/validation/api/timer/timer.c +++ b/test/validation/api/timer/timer.c @@ -373,7 +373,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;