From patchwork Tue Sep 4 20:00:05 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: 145954 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4086974ljw; Tue, 4 Sep 2018 13:01:42 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY7Cp1nl6rDrqQ6QnqjqG3uS3OZ+OwoG1lPiT5i9j3JODi+q6NLwaPZguJhQxyjYxicjQMF X-Received: by 2002:ac8:3790:: with SMTP id d16-v6mr32257923qtc.128.1536091301912; Tue, 04 Sep 2018 13:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536091301; cv=none; d=google.com; s=arc-20160816; b=Oii0KUNuDVk+g64MTKKQslyYPRqF/csMLyFUHngDV+M77NGadB8k4WZQQUsjF9RZn9 ngu6SKnbCpnqI82MAaoTzdVFfMZ7ULV8RprOmQEwadfR/zKG8WdP6+dT7LcdBA1SrarN 7bSsFumpIK7AFgKj32E9sqfFCBWiuWxH3lF9Mz72LjUktrHQjTxrW1+xu4uDgnwjY4VS HIImB4yV6lEdtxF3OvkQmrlBjrEyRvTjBRDmtQZiBAtpuwPFA99+KWwwGj07+R5BsysA aTQYl3mkRr+OirqrlWAZzvhrTy+aA3nc4a/grI+qYlPYMeqOiAsYZOxOcTNup8JF/E5R 56QA== 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=ISH+7K4PBSiUIzUjCIRiFBkM6p35PscHp9jnsDbSyxA=; b=GMS7d55uJiYpqu26CjkRFZAIE6Im3MaZzZ43JKxGpch8kF9hnk4pTEw4pGEdjndRDu 5JrJxnGUUkgTdeSNGbgO1x3pza467ZETnltqXKAW2fB+GfLMVHhjBv/rszCmx/rvsxgs Ggc9LXuORpQvrB8pt6H42dmZlJTQQwjrr5ryQM8L6IZqTAUF1x/x5Up/Yl4iISvjhH1D iGtvhw8dxfLKavu3gTY1vSrmEbmFy8omlk8gGbCBhHe1v9qwnw4TZ3CKu57n+yka7xRp z2e3ilHN6fOFVJtoPpMALVdNJ1vKG7yQ3nKHwdvvNnIm5uQBltdRuibKbtapYdvSHoIn sqJA== 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 j31-v6si4696551qtd.364.2018.09.04.13.01.41; Tue, 04 Sep 2018 13:01:41 -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 826566865F; Tue, 4 Sep 2018 20:01:41 +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 CD37567B5F; Tue, 4 Sep 2018 20:00:25 +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 210566864F; Tue, 4 Sep 2018 20:00:20 +0000 (UTC) Received: from forward105j.mail.yandex.net (forward105j.mail.yandex.net [5.45.198.248]) by lists.linaro.org (Postfix) with ESMTPS id B17D667B5F for ; Tue, 4 Sep 2018 20:00:13 +0000 (UTC) Received: from mxback9g.mail.yandex.net (mxback9g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:170]) by forward105j.mail.yandex.net (Yandex) with ESMTP id 0C2C1184CA1 for ; Tue, 4 Sep 2018 23:00:11 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback9g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 4rO6uZEmvq-0ADKcwst; Tue, 04 Sep 2018 23:00:10 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id lXapyhRv4D-09KCY5NP; Tue, 04 Sep 2018 23:00:10 +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, 4 Sep 2018 20:00:05 +0000 Message-Id: <1536091206-7970-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536091206-7970-1-git-send-email-odpbot@yandex.ru> References: <1536091206-7970-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 694 Subject: [lng-odp] [PATCH v1 3/4] 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: 27864f6260e216acae7cc113756aae21161a4fe4 **/ 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); }