From patchwork Fri Apr 24 07:43:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ruifeng Wang X-Patchwork-Id: 69239 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 32921A00C2; Fri, 24 Apr 2020 09:44:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2394D1C1FA; Fri, 24 Apr 2020 09:44:29 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 48AF21C1CB for ; Fri, 24 Apr 2020 09:44:28 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C834931B; Fri, 24 Apr 2020 00:44:27 -0700 (PDT) Received: from net-arm-thunderx2-02.shanghai.arm.com (net-arm-thunderx2-02.shanghai.arm.com [10.169.41.165]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 36D923F68F; Fri, 24 Apr 2020 00:44:24 -0700 (PDT) From: Ruifeng Wang To: aconole@redhat.com, maicolgabriel@hotmail.com Cc: dev@dpdk.org, gavin.hu@arm.com, honnappa.nagarahalli@arm.com, juraj.linkes@pantheon.tech, nd@arm.com, Ruifeng Wang Date: Fri, 24 Apr 2020 15:43:54 +0800 Message-Id: <20200424074356.193204-3-ruifeng.wang@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200424074356.193204-1-ruifeng.wang@arm.com> References: <20200424074356.193204-1-ruifeng.wang@arm.com> Subject: [dpdk-dev] [PATCH 2/4] test/cycles: increase threshold for containers on aarch64 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" rte_delay_us_xxx could have more deviation than expected when system load is high. Test case failures were observed on Travis CI which run unit test in container for aarch64. Use looser criteria for cycle tests on aarch64. Signed-off-by: Ruifeng Wang Reviewed-by: Gavin Hu --- app/test/test_cycles.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/test/test_cycles.c b/app/test/test_cycles.c index 015a9290f..52bc9af81 100644 --- a/app/test/test_cycles.c +++ b/app/test/test_cycles.c @@ -30,6 +30,13 @@ check_wait_one_second(void) uint64_t hz = rte_get_timer_hz(); uint64_t max_inc = (hz / 100); /* 10 ms max between 2 reads */ +#if defined(RTE_ARCH_ARM64) + /* When testing in containers, 'delay' could have less accuracy + * if system is busy. + */ + max_inc = 3 * max_inc; +#endif + /* check that waiting 1 second is precise */ prev_cycles = rte_get_timer_cycles(); rte_delay_us(1000000);