From patchwork Wed Sep 5 11:00:03 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: 145991 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4783721ljw; Wed, 5 Sep 2018 04:02:01 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbWxxqp2MijgGStOtE8NHCvaIcolycH47GLikVGlMlM8i5c8f/DqYfcvvwhAH2pMjNzeskJ X-Received: by 2002:ac8:30eb:: with SMTP id w40-v6mr32598909qta.176.1536145320976; Wed, 05 Sep 2018 04:02:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536145320; cv=none; d=google.com; s=arc-20160816; b=qovuKat5bTQ7eZiR6OkPyOlRgOB3eMWqNyQk2TfzGTCbnOy3oXvmdDH0IWNmJddbVf 4uOmu8AenTuaipgCUCzYzFG0IA38rk8X9YP1kYCViLe6NNauPk0UrpbgAL8MQguNzLLD emsoui6O1mISywn1CyEBkQVFyT38WGgwtvM340NpZdAFgoFQ1nIYzZsaYKxkFINOJcJG V7GmY6uv7z118m1bimW2IXx5kfCN88INezL/6s4EH6X2VWyJlj0jyXrBVb+UY4AoESP6 cTek/pPxqR5MI5gAri0AGOOGziUQKEl+ynrkoX4mghkULqHSz9Sb2l4HMw2WIung4oGq QACQ== 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; bh=0DVr3HZDd+pBac6TiD3LR2E9mzY7UOjdJUwdbSsOOUc=; b=h5q4aPESra4WBtR6BdUXVZftdX+5d/MyjLnLFBZPQfwiYbJWt9d+ahzD8FH2sYnmoa MO2UYIQHvvOReXt3JiB5MPpfq5ApPBWgo6/pu9E0TUG9r4Txv349j7Og0r7SxIjQAAsN /dSncv8AF2CWxPTkp7UzVCIx5VvZbRLNb42P/9ALCm3lP7r46W3kBckWUOivXgUNnkkG G9EGPUMDODoWgzDkJis60T6BhRqjS7thNa4EsilazmAZX42EL0ovzPF9ESUyaTvJBHsR xkOIXDpK73PmGmLZL4wWBqHfJnEZRQnwWSQdwW3xYI3pT0Mw92IhtZDb+hP0735Qwj82 Bj1A== 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 r22-v6si1232416qtk.15.2018.09.05.04.02.00; Wed, 05 Sep 2018 04:02:00 -0700 (PDT) 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 8C23268616; Wed, 5 Sep 2018 11:02:00 +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=-3.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW 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 7AA2668600; Wed, 5 Sep 2018 11:00:29 +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 1BF6F60CF7; Wed, 5 Sep 2018 11:00:19 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id CBA6160CF7 for ; Wed, 5 Sep 2018 11:00:12 +0000 (UTC) Received: from mxback2o.mail.yandex.net (mxback2o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1c]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 58E603D836B9 for ; Wed, 5 Sep 2018 14:00:10 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback2o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id rQptfMH1Rk-0AN4DK6F; Wed, 05 Sep 2018 14:00:10 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 5T90TlmWMq-094CxXDf; Wed, 05 Sep 2018 14: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, 5 Sep 2018 11:00:03 +0000 Message-Id: <1536145206-9205-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536145206-9205-1-git-send-email-odpbot@yandex.ru> References: <1536145206-9205-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 694 Subject: [lng-odp] [PATCH v2 2/5] validation: scheduler: print debug diagnostics on test_wait failure 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 Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 694 (lumag:timer) ** https://github.com/Linaro/odp/pull/694 ** Patch: https://github.com/Linaro/odp/pull/694.patch ** Base sha: 0a5d67beda902557056d5b5146d8cbe86e5001b0 ** Merge commit sha: dc2fc3943e99a8bb113f9e34a27d9bf1b521ed5b **/ test/validation/api/scheduler/scheduler.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/test/validation/api/scheduler/scheduler.c b/test/validation/api/scheduler/scheduler.c index 2e44d3248..069220393 100644 --- a/test/validation/api/scheduler/scheduler.c +++ b/test/validation/api/scheduler/scheduler.c @@ -185,8 +185,19 @@ static void scheduler_test_wait_time(void) upper_limit = odp_time_local_from_ns(5 * ODP_TIME_SEC_IN_NS + ODP_WAIT_TOLERANCE); - CU_ASSERT(odp_time_cmp(diff, lower_limit) >= 0); - CU_ASSERT(odp_time_cmp(diff, upper_limit) <= 0); + if (odp_time_cmp(diff, lower_limit) <= 0) { + fprintf(stderr, "Exceed lower limit: " + "diff is %" PRIu64 ", lower_limit %" PRIu64 "\n", + odp_time_to_ns(diff), odp_time_to_ns(lower_limit)); + CU_FAIL("Exceed lower limit\n"); + } + + if (odp_time_cmp(diff, upper_limit) >= 0) { + fprintf(stderr, "Exceed upper limit: " + "diff is %" PRIu64 ", upper_limit %" PRIu64 "\n", + odp_time_to_ns(diff), odp_time_to_ns(upper_limit)); + CU_FAIL("Exceed upper limit\n"); + } CU_ASSERT_FATAL(odp_queue_destroy(queue) == 0); }