From patchwork Fri Apr 24 07:43:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ruifeng Wang X-Patchwork-Id: 69238 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 1FA93A00C2; Fri, 24 Apr 2020 09:44:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7C3221C1F2; Fri, 24 Apr 2020 09:44:25 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 0A73D1C1F2; Fri, 24 Apr 2020 09:44:24 +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 88D6231B; Fri, 24 Apr 2020 00:44:23 -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 79AC13F68F; Fri, 24 Apr 2020 00:44:20 -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 , stable@dpdk.org Date: Fri, 24 Apr 2020 15:43:53 +0800 Message-Id: <20200424074356.193204-2-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 1/4] test/cycles: restore original delay function 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" test_delay_us_sleep registers sleep based delay for testing. The change of default delay function is not expected. Restore defalut delay function to fix the issue. Fixes: a51639cc720a ("eal: add nanosleep based delay function") Cc: stable@dpdk.org Signed-off-by: Ruifeng Wang Reviewed-by: Gavin Hu --- app/test/test_cycles.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/test/test_cycles.c b/app/test/test_cycles.c index c78e6a5b1..015a9290f 100644 --- a/app/test/test_cycles.c +++ b/app/test/test_cycles.c @@ -79,8 +79,14 @@ REGISTER_TEST_COMMAND(cycles_autotest, test_cycles); static int test_delay_us_sleep(void) { + int rv = 0; + rte_delay_us_callback_register(rte_delay_us_sleep); - return check_wait_one_second(); + rv = check_wait_one_second(); + /* restore original delay function */ + rte_delay_us_callback_register(rte_delay_us_block); + + return rv; } REGISTER_TEST_COMMAND(delay_us_sleep_autotest, test_delay_us_sleep); 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); From patchwork Fri Apr 24 07:43:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ruifeng Wang X-Patchwork-Id: 69240 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 B27E5A00C2; Fri, 24 Apr 2020 09:44:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 869BC1C209; Fri, 24 Apr 2020 09:44:34 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 97E551C209 for ; Fri, 24 Apr 2020 09:44:32 +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 2BBB331B; Fri, 24 Apr 2020 00:44:32 -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 763923F68F; Fri, 24 Apr 2020 00:44:29 -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:55 +0800 Message-Id: <20200424074356.193204-4-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 3/4] ci: expose test time out argument 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" The unit test time out setting was the same for jobs on different platforms. Due to difference of running environments, platforms could have different time out expecations. Provide TIMEOUT_FACTOR as a knob to change the time out setting. Signed-off-by: Ruifeng Wang Reviewed-by: Gavin Hu --- .ci/linux-build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index d079801d7..b653de97c 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -96,5 +96,6 @@ if [ "$ABI_CHECKS" = "1" ]; then fi if [ "$RUN_TESTS" = "1" ]; then - sudo meson test -C build --suite fast-tests -t 3 + TIMEOUT_FACTOR=${TIMEOUT_FACTOR:-3} + sudo meson test -C build --suite fast-tests -t $TIMEOUT_FACTOR fi From patchwork Fri Apr 24 07:43:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ruifeng Wang X-Patchwork-Id: 69241 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 6F437A00C2; Fri, 24 Apr 2020 09:44:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 036B81C1E8; Fri, 24 Apr 2020 09:44:39 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id EEEA31C219 for ; Fri, 24 Apr 2020 09:44:37 +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 786D531B; Fri, 24 Apr 2020 00:44:37 -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 E3E093F68F; Fri, 24 Apr 2020 00:44:34 -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:56 +0800 Message-Id: <20200424074356.193204-5-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 4/4] ci: increase time out multiplier 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" aarch64 jobs are running in containers. Tests may take longer time when system load is high. Use bigger time out value for aarch64 test jobs to stabilize test result. Signed-off-by: Ruifeng Wang Reviewed-by: Gavin Hu --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2d2292ff6..e8a4b99b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -105,7 +105,7 @@ jobs: - env: DEF_LIB="static" arch: arm64 compiler: gcc - - env: DEF_LIB="shared" RUN_TESTS=1 + - env: DEF_LIB="shared" RUN_TESTS=1 TIMEOUT_FACTOR=9 arch: arm64 compiler: gcc - env: DEF_LIB="shared" BUILD_DOCS=1 @@ -128,6 +128,6 @@ jobs: - env: DEF_LIB="static" arch: arm64 compiler: clang - - env: DEF_LIB="shared" RUN_TESTS=1 + - env: DEF_LIB="shared" RUN_TESTS=1 TIMEOUT_FACTOR=9 arch: arm64 compiler: clang