From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B471CA051C for ; Tue, 11 Feb 2020 12:30:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AB2B12BE9; Tue, 11 Feb 2020 12:30:43 +0100 (CET) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 2F8521BFA5 for ; Tue, 11 Feb 2020 12:30:42 +0100 (CET) Received: by mail-wr1-f66.google.com with SMTP id m16so11858312wrx.11 for ; Tue, 11 Feb 2020 03:30:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bzJ4LitZJ3aIXzPhyZox4MOiysRcPPNw8+NM2mfnKhE=; b=jIIxaXm9wbmvkpGgQOjcJTWyIpTVhz+ESHRqaLUWQ9Ap4cmIpXkOwVmlSlawVnwm8V L5WCjMtwSQO3NTNKNHqCT5TltXHR3PdUiKRfI0Vaf3LzccTwzZzySx+pEYrvWRwF/IQp e+xGVron+ilpXB7U8Qik03ufqYeeb7+gyTM5GXQ+Ei5/AsCno02uugzBe23Laa3gq8xq 6BgfbtsUZCZ2hKD3vEsEt8Rh0yU0C3xuWabssGiPMYm9+fdIZplDMMRktz5DrXQMiXgt cHNcf2YQ6a+48hvO/DsyBEDRvw+FM/tLE7n24DZ7v3YFe+G/wUyp5vVyqfmZWomkjTbx DghQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bzJ4LitZJ3aIXzPhyZox4MOiysRcPPNw8+NM2mfnKhE=; b=rbUmCc6CfPOw6eF8nOrllQ1a23SJKK+9ekQH4/ySqTw6UHPLJdLhHtwBYqVFokrO6S pd9qfn2IEXbA+va1KF3B0e1ezq1vV/wpXTxgg6HvKiDw7MQROGdUOBdJchYYUhRzgxik 1iHweZQtCnlfa5MvF7DmoVhqN3vIxsgx5NY0lnj03bnpmC0pzgUcEXJmPYSpWrmAJUx0 Zpso/BtR74MTa3Mh6fVHVjV+ePR3qHsP8RG3Q6Udn3DuGddMflvGHzgtiMlGJ2wzEgZN b6gvygJcmltG1+Pub+TGkqnPG8QsQc4RMg6tB4aX30Yiy+Jlcpi+0oLgP2Nw1qOpgsEJ +IVA== X-Gm-Message-State: APjAAAVEIt2+Ukc2K5DwaqiKVROvMG0aeqDlUEcT3T895q7YxeNyASMO VQxHV4A+/68Yw8cx3bStmEe16F/yfnE= X-Google-Smtp-Source: APXvYqy8RxxMC3fjH1L2lWf7MLXQ/M4LW1rzzAgTociGKW2tAPXmKxBUOaRQ2PV9DP7YPe1QHssIVA== X-Received: by 2002:adf:e746:: with SMTP id c6mr7713181wrn.323.1581420641905; Tue, 11 Feb 2020 03:30:41 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id p15sm3219662wma.40.2020.02.11.03.30.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:30:41 -0800 (PST) From: luca.boccassi@gmail.com To: Bruce Richardson Cc: dpdk stable Date: Tue, 11 Feb 2020 11:21:01 +0000 Message-Id: <20200211112216.3929-115-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'app/test: remove meson dependency on file in /sys' has been queued to stable release 19.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/13/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From bafd98728cc6d39b951d84de46c10a9c69c1d7d6 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Mon, 20 Jan 2020 12:22:18 +0000 Subject: [PATCH] app/test: remove meson dependency on file in /sys [ upstream commit 599d67b6a4bf96096352cc5fbc8fc28e54a1ca62 ] Meson versions 0.52 and 0.53 are being overly smart and detecting the path "/sys/devices/system/cpu/present" in the call to cat in app/test/meson.build and then adding it as a dependency to the build configuration. This causes issues on systems where the timestamp of that file always returns the current time, since it means that the build.ninja file is always out of date, and therefore needs to be rebuilt. We can fix this by just using a simple shell script to return the coremask appropriately for BSD and Linux, and removing that code logic from meson - thereby hiding the use of the /sys file. Fixes: c70622ac6f72 ("test: detect number of cores with meson") Signed-off-by: Bruce Richardson --- MAINTAINERS | 1 + app/test/get-coremask.sh | 13 +++++++++++++ app/test/meson.build | 16 ++-------------- 3 files changed, 16 insertions(+), 14 deletions(-) create mode 100755 app/test/get-coremask.sh diff --git a/MAINTAINERS b/MAINTAINERS index 4395d8df14..607a7fa8b4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1434,6 +1434,7 @@ Unit tests framework F: app/test/Makefile F: app/test/autotest* F: app/test/commands.c +F: app/test/get-coremask.sh F: app/test/packet_burst_generator.c F: app/test/packet_burst_generator.h F: app/test/process.h diff --git a/app/test/get-coremask.sh b/app/test/get-coremask.sh new file mode 100755 index 0000000000..bb8cf404d2 --- /dev/null +++ b/app/test/get-coremask.sh @@ -0,0 +1,13 @@ +#! /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 fb49d804ba..22b0cefaa3 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -398,20 +398,8 @@ dpdk_test = executable('dpdk-test', timeout_seconds = 600 timeout_seconds_fast = 10 -# Retrieve the number of CPU cores, defaulting to 4. -num_cores = '0-3' -if host_machine.system() == 'linux' - num_cores = run_command('cat', - '/sys/devices/system/cpu/present' - ).stdout().strip() -elif host_machine.system() == 'freebsd' - snum_cores = run_command('/sbin/sysctl', '-n', - 'hw.ncpu').stdout().strip() - inum_cores = snum_cores.to_int() - 1 - num_cores = '0-@0@'.format(inum_cores) -endif - -num_cores_arg = '-l ' + num_cores +get_coremask = find_program('get-coremask.sh') +num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip() test_args = [num_cores_arg] foreach arg : fast_test_names -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:42.775052304 +0000 +++ 0115-app-test-remove-meson-dependency-on-file-in-sys.patch 2020-02-11 11:17:38.580004713 +0000 @@ -1,8 +1,10 @@ -From 599d67b6a4bf96096352cc5fbc8fc28e54a1ca62 Mon Sep 17 00:00:00 2001 +From bafd98728cc6d39b951d84de46c10a9c69c1d7d6 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Mon, 20 Jan 2020 12:22:18 +0000 Subject: [PATCH] app/test: remove meson dependency on file in /sys +[ upstream commit 599d67b6a4bf96096352cc5fbc8fc28e54a1ca62 ] + Meson versions 0.52 and 0.53 are being overly smart and detecting the path "/sys/devices/system/cpu/present" in the call to cat in app/test/meson.build and then adding it as a dependency to the build @@ -15,7 +17,6 @@ thereby hiding the use of the /sys file. Fixes: c70622ac6f72 ("test: detect number of cores with meson") -Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- @@ -26,10 +27,10 @@ create mode 100755 app/test/get-coremask.sh diff --git a/MAINTAINERS b/MAINTAINERS -index 8916ef9626..48fbaa043a 100644 +index 4395d8df14..607a7fa8b4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -1446,6 +1446,7 @@ Unit tests framework +@@ -1434,6 +1434,7 @@ Unit tests framework F: app/test/Makefile F: app/test/autotest* F: app/test/commands.c