From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E2CFAA0C43; Mon, 18 Oct 2021 19:02:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0B2D40142; Mon, 18 Oct 2021 19:02:59 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 0173840141 for ; Mon, 18 Oct 2021 19:02:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634576577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4DIKNjSFY2qDEEVWvRK7piujX23lUNWPQdpvKDw48/k=; b=e5/yHvHSux0vB3LcYdw4emeOGSAnCNAziKClV2z2JdrLw3TEpYlAGEyRNAv5UKVIJH3FGc qIHxO+rdD1PLGnyXqCBU7H0dHGbIr+BRkUcrcY3YI4qN+NLHxaYN0loQfv/WFnafz5Pig+ Guqr4s1RraXgt87W/SZwPP49BgYdL1M= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-172-rIkqqRmuOY61TmE--pm-qA-1; Mon, 18 Oct 2021 13:02:53 -0400 X-MC-Unique: rIkqqRmuOY61TmE--pm-qA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E0F108066F0; Mon, 18 Oct 2021 17:02:52 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5D70510016F4; Mon, 18 Oct 2021 17:02:51 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: aconole@redhat.com, blo@iol.unh.edu Date: Mon, 18 Oct 2021 19:01:36 +0200 Message-Id: <20211018170136.5189-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-dev] [PATCH] test: rely on EAL detection for core list X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Cores count has a direct impact on the time needed to complete unit tests. Currently, the core list used for unit test is enforced to "all cores on the system" with no way for (CI) users to adapt it. On the other hand, EAL default behavior (when no -c/-l option gets passed) is to start threads on as many cores available in the process cpu affinity. Remove logic from meson: users can then select where to run the tests by either running meson with a custom cpu affinity (using taskset/cpuset depending on OS) or by passing a --test-args option to meson. Example: $ sudo meson test -C build --suite fast-tests -t 3 --test-args "-l 0-3" Signed-off-by: David Marchand --- I wanted to post this as a RFC, but now, I wonder if all CI test RFC patches, so sending as a normal patch. --- app/test/get-coremask.sh | 13 ------------- app/test/meson.build | 10 +--------- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100755 app/test/get-coremask.sh diff --git a/app/test/get-coremask.sh b/app/test/get-coremask.sh deleted file mode 100755 index bb8cf404d2..0000000000 --- a/app/test/get-coremask.sh +++ /dev/null @@ -1,13 +0,0 @@ -#! /bin/sh -e -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2019 Intel Corporation - -if [ "$(uname)" = "Linux" ] ; then - cat /sys/devices/system/cpu/present -elif [ "$(uname)" = "FreeBSD" ] ; then - ncpus=$(/sbin/sysctl -n hw.ncpu) - echo 0-$(expr $ncpus - 1) -else -# fallback - echo 0-3 -fi diff --git a/app/test/meson.build b/app/test/meson.build index a16374b7a1..c7b377d52d 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -463,13 +463,8 @@ message('hugepage availability: @0@'.format(has_hugepage)) timeout_seconds = 600 timeout_seconds_fast = 10 -get_coremask = find_program('get-coremask.sh') -num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip() - -default_test_args = [num_cores_arg] - foreach arg : fast_tests - test_args = default_test_args + test_args = [] run_test = true if not has_hugepage if arg[1] @@ -502,7 +497,6 @@ endforeach foreach arg : perf_test_names test(arg, dpdk_test, env : ['DPDK_TEST=' + arg], - args : default_test_args, timeout : timeout_seconds, is_parallel : false, suite : 'perf-tests') @@ -511,7 +505,6 @@ endforeach foreach arg : driver_test_names test(arg, dpdk_test, env : ['DPDK_TEST=' + arg], - args : default_test_args, timeout : timeout_seconds, is_parallel : false, suite : 'driver-tests') @@ -520,7 +513,6 @@ endforeach foreach arg : dump_test_names test(arg, dpdk_test, env : ['DPDK_TEST=' + arg], - args : default_test_args, timeout : timeout_seconds, is_parallel : false, suite : 'debug-tests') -- 2.23.0