From patchwork Mon Jun 3 18:59:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Santana X-Patchwork-Id: 54267 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5DC1F1B9E6; Mon, 3 Jun 2019 21:00:01 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 2DAF41B9E3 for ; Mon, 3 Jun 2019 21:00:00 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 860EC30833C0; Mon, 3 Jun 2019 18:59:59 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.18.25.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id E82575C296; Mon, 3 Jun 2019 18:59:57 +0000 (UTC) From: Michael Santana To: dev Cc: Thomas Monjalon , Michael Santana Date: Mon, 3 Jun 2019 14:59:56 -0400 Message-Id: <20190603185956.4560-1-msantana@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Mon, 03 Jun 2019 18:59:59 +0000 (UTC) Subject: [dpdk-dev] [PATCH] test: skip test when cores do not meet requirement 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" If the running platform does not meet the required 4 cores or more to run tests rcu_qsbr_autotest and hash_readwrite_autotest meson reports them as failed tests when they really should be skipped tests. The working change can be shown here: FAIL: https://travis-ci.com/Maickii/dpdk-2/jobs/205045946#L645 https://travis-ci.com/Maickii/dpdk-2/jobs/205045946#L671 SKIP: https://travis-ci.com/Maickii/dpdk-2/jobs/205047293#L645 https://travis-ci.com/Maickii/dpdk-2/jobs/205047293#L671 Signed-off-by: Michael Santana --- app/test/test_hash_readwrite.c | 2 +- app/test/test_rcu_qsbr.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test/test_hash_readwrite.c b/app/test/test_hash_readwrite.c index 480ae97d8..a34193e98 100644 --- a/app/test/test_hash_readwrite.c +++ b/app/test/test_hash_readwrite.c @@ -621,7 +621,7 @@ test_hash_readwrite_main(void) if (rte_lcore_count() <= 2) { printf("More than two lcores are required " "to do read write test\n"); - return -1; + return TEST_SKIPPED; } RTE_LCORE_FOREACH_SLAVE(core_id) { diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c index 92ab0c20a..f3e02dd3f 100644 --- a/app/test/test_rcu_qsbr.c +++ b/app/test/test_rcu_qsbr.c @@ -953,8 +953,8 @@ test_rcu_qsbr_main(void) return -1; if (num_cores < 4) { - printf("Test failed! Need 4 or more cores\n"); - goto test_fail; + printf("Test skipped! Need 4 or more cores\n"); + return TEST_SKIPPED; } /* Error-checking test cases */