patch 'build: fix warnings when running external commands' has been queued to stable release 21.11.1

Kevin Traynor ktraynor at redhat.com
Mon Feb 21 16:35:08 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.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/26/22. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/aa8ad3e48c20f2f3645c718a885d3f76c06a20c9

Thanks.

Kevin

---
>From aa8ad3e48c20f2f3645c718a885d3f76c06a20c9 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Thu, 20 Jan 2022 18:06:39 +0000
Subject: [PATCH] build: fix warnings when running external commands

[ upstream commit ecb904cc4596b33aa182e2a7c9edc3104ff981c3 ]

Meson 0.61.1 is giving warnings that the calls to run_command do not
always explicitly specify if the result is to be checked or not, i.e.
there is a missing "check" parameter. This is because the default
behaviour without the parameter is due to change in the future.

We can fix these warnings by explicitly adding into each call whether
the result should be checked by meson or not. This patch therefore
adds in "check: false" to each run_command call where the result is
being checked by the DPDK meson.build code afterwards, and adds in
"check: true" to any calls where the result is currently unchecked.

Bugzilla ID: 921

Reported-by: Jerin Jacob <jerinj at marvell.com>
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Tested-by: Jerin Jacob <jerinj at marvell.com>
---
 app/test/meson.build                    | 2 +-
 buildtools/meson.build                  | 2 +-
 config/arm/meson.build                  | 2 +-
 config/meson.build                      | 5 +++--
 config/x86/meson.build                  | 2 +-
 drivers/common/mlx5/linux/meson.build   | 2 +-
 drivers/common/mlx5/windows/meson.build | 4 ++--
 drivers/net/mlx4/meson.build            | 2 +-
 kernel/linux/kni/meson.build            | 2 +-
 kernel/linux/meson.build                | 9 +++++----
 meson.build                             | 2 +-
 11 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index 2b480adfba..f7ee8ebc57 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -493,5 +493,5 @@ dpdk_test = executable('dpdk-test',
         install: true)
 
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command('has-hugepage.sh', check: true).stdout().strip() != '0'
 message('hugepage availability: @0@'.format(has_hugepage))
 
diff --git a/buildtools/meson.build b/buildtools/meson.build
index 22ea0ba375..400b88f251 100644
--- a/buildtools/meson.build
+++ b/buildtools/meson.build
@@ -46,5 +46,5 @@ endif
 foreach module : python3_required_modules
     script = 'import importlib.util; import sys; exit(importlib.util.find_spec("@0@") is None)'
-    if run_command(py3, '-c', script.format(module)).returncode() != 0
+    if run_command(py3, '-c', script.format(module), check: false).returncode() != 0
         error('missing python module: @0@'.format(module))
     endif
diff --git a/config/arm/meson.build b/config/arm/meson.build
index 44b44b63a6..0c8570aabb 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -464,5 +464,5 @@ else
             detect_vendor = find_program(join_paths(meson.current_source_dir(),
                                                     'armv8_machine.py'))
-            cmd = run_command(detect_vendor.path())
+            cmd = run_command(detect_vendor.path(), check: false)
             if cmd.returncode() == 0
                 cmd_output = cmd.stdout().to_lower().strip().split(' ')
diff --git a/config/meson.build b/config/meson.build
index 805d5d51d0..ee12318d4f 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -23,5 +23,6 @@ is_ms_linker = is_windows and (cc.get_id() == 'clang')
 pver = meson.project_version().split('.')
 major_version = '@0 at .@1@'.format(pver.get(0), pver.get(1))
-abi_version = run_command(find_program('cat', 'more'), abi_version_file).stdout().strip()
+abi_version = run_command(find_program('cat', 'more'), abi_version_file,
+        check: true).stdout().strip()
 
 # Libraries have the abi_version as the filename extension
@@ -335,5 +336,5 @@ if max_lcores == 'detect'
     endif
     # overwrite the default value with discovered values
-    max_lcores = run_command(get_cpu_count_cmd).stdout().to_int()
+    max_lcores = run_command(get_cpu_count_cmd, check: true).stdout().to_int()
     min_lcores = 2
     # DPDK must be built for at least 2 cores
diff --git a/config/x86/meson.build b/config/x86/meson.build
index e25ed316f4..54345c4da3 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -5,5 +5,5 @@
 binutils_ok = true
 if is_linux or cc.get_id() == 'gcc'
-    binutils_ok = run_command(binutils_avx512_check).returncode() == 0
+    binutils_ok = run_command(binutils_avx512_check, check: false).returncode() == 0
     if not binutils_ok and cc.has_argument('-mno-avx512f')
         machine_args += '-mno-avx512f'
diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build
index 7909f23e21..4c7b53b9bd 100644
--- a/drivers/common/mlx5/linux/meson.build
+++ b/drivers/common/mlx5/linux/meson.build
@@ -37,5 +37,5 @@ endforeach
 if static_ibverbs or dlopen_ibverbs
     # Build without adding shared libs to Requires.private
-    ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
+    ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs', check: true).stdout()
     ext_deps += declare_dependency(compile_args: ibv_cflags.split())
 endif
diff --git a/drivers/common/mlx5/windows/meson.build b/drivers/common/mlx5/windows/meson.build
index 980f76b11c..edbbaa9ae1 100644
--- a/drivers/common/mlx5/windows/meson.build
+++ b/drivers/common/mlx5/windows/meson.build
@@ -9,6 +9,6 @@ sources += files(
 )
 
-res_lib = run_command(python3, '-c', 'import os; print(os.environ["DEVX_LIB_PATH"])')
-res_inc = run_command(python3, '-c', 'import os; print(os.environ["DEVX_INC_PATH"])')
+res_lib = run_command(python3, '-c', 'import os; print(os.environ["DEVX_LIB_PATH"])', check: false)
+res_inc = run_command(python3, '-c', 'import os; print(os.environ["DEVX_INC_PATH"])', check: false)
 
 if (res_lib.returncode() != 0 or res_inc.returncode() != 0)
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index 99a30eab8f..a038c1ec1b 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -43,5 +43,5 @@ endforeach
 if static_ibverbs or dlopen_ibverbs
     # Build without adding shared libs to Requires.private
-    ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
+    ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs', check:true).stdout()
     ext_deps += declare_dependency(compile_args: ibv_cflags.split())
 endif
diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
index c683fc7b36..dae8c37b37 100644
--- a/kernel/linux/kni/meson.build
+++ b/kernel/linux/kni/meson.build
@@ -6,5 +6,5 @@
 kmod_cflags = ''
 file_path = kernel_source_dir + '/include/linux/netdevice.h'
-run_cmd = run_command('grep', 'ndo_tx_timeout', file_path)
+run_cmd = run_command('grep', 'ndo_tx_timeout', file_path, check: false)
 
 if run_cmd.stdout().contains('txqueue') == true
diff --git a/kernel/linux/meson.build b/kernel/linux/meson.build
index 0637452e95..d8fb20c1c3 100644
--- a/kernel/linux/meson.build
+++ b/kernel/linux/meson.build
@@ -12,5 +12,5 @@ cross_args = []
 if not meson.is_cross_build()
     # native build
-    kernel_version = run_command('uname', '-r').stdout().strip()
+    kernel_version = run_command('uname', '-r', check: true).stdout().strip()
     kernel_install_dir = '/lib/modules/' + kernel_version + '/extra/dpdk'
     if kernel_build_dir == ''
@@ -25,5 +25,5 @@ if not meson.is_cross_build()
     # test running make in kernel directory, using "make kernelversion"
     make_returncode = run_command('make', '-sC', kernel_build_dir,
-            'kernelversion').returncode()
+            'kernelversion', check: true).returncode()
     if make_returncode != 0
         # backward compatibility:
@@ -32,5 +32,5 @@ if not meson.is_cross_build()
             kernel_build_dir = join_paths(kernel_build_dir, 'build')
             make_returncode = run_command('make', '-sC', kernel_build_dir,
-                    'kernelversion').returncode()
+                    'kernelversion', check: true).returncode()
         endif
     endif
@@ -55,5 +55,6 @@ endif
 cross_compiler = find_program('c').path()
 if cross_compiler.endswith('gcc')
-    cross_prefix = run_command([py3, '-c', 'print("' + cross_compiler + '"[:-3])']).stdout().strip()
+    cross_prefix = run_command([py3, '-c', 'print("' + cross_compiler + '"[:-3])'],
+            check: true).stdout().strip()
 elif cross_compiler.endswith('clang')
     cross_prefix = ''
diff --git a/meson.build b/meson.build
index 12cb6e0e83..1223b79d74 100644
--- a/meson.build
+++ b/meson.build
@@ -6,5 +6,5 @@ project('DPDK', 'C',
         # Fallback to "more" for Windows compatibility.
         version: run_command(find_program('cat', 'more'),
-            files('VERSION')).stdout().strip(),
+            files('VERSION'), check: true).stdout().strip(),
         license: 'BSD',
         default_options: ['buildtype=release', 'default_library=static'],
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-02-21 15:22:47.192525793 +0000
+++ 0119-build-fix-warnings-when-running-external-commands.patch	2022-02-21 15:22:44.249704482 +0000
@@ -1 +1 @@
-From ecb904cc4596b33aa182e2a7c9edc3104ff981c3 Mon Sep 17 00:00:00 2001
+From aa8ad3e48c20f2f3645c718a885d3f76c06a20c9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ecb904cc4596b33aa182e2a7c9edc3104ff981c3 ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -38 +39 @@
-index 725a218f4a..5476c180ee 100644
+index 2b480adfba..f7ee8ebc57 100644
@@ -41 +42 @@
-@@ -458,5 +458,5 @@ dpdk_test = executable('dpdk-test',
+@@ -493,5 +493,5 @@ dpdk_test = executable('dpdk-test',
@@ -60 +61 @@
-index c3a3f2faaf..e102381af5 100644
+index 44b44b63a6..0c8570aabb 100644



More information about the stable mailing list