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 2092DA04A4 for ; Tue, 1 Mar 2022 15:44:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB4594270A; Tue, 1 Mar 2022 15:44:25 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 219D1426DE for ; Tue, 1 Mar 2022 15:44:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646145864; x=1677681864; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9TtA1z6vJepcsAajdZPjg73C2X9x0Ttmx6FvnV8MFn8=; b=RfshHiTNu9iLFpS3puLhCG2wloKnXoG2fAfAZ35wPisn6KyaA9uUgutw afmVNcimel7Qtvf+O9GeUG+BXJOg2iBPykIwcrntDbGrFTum8jg0lxR0o Ho3pB1Ch1wVpStQzKmyw3RyYDxUriJU5U+I4QRDChTZYGEW46b+8vD/NI 59peUTc2z4J5/kmvxqMEh69B68Pxjt5RbvoDod0xJpnrxvh+8OrwcDZnK gqXUfErF2Y/DOOrXtOQSq/rGZ4xj3vRxJl9/QzN/gV2SXrveKJbP+e+3X xFPHihMkdhaflYgBqrCOVrGsBT+tLghxpmTcZ5xveB6IzB/h9ctZ1/el9 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="233760092" X-IronPort-AV: E=Sophos;i="5.90,146,1643702400"; d="scan'208";a="233760092" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2022 06:44:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,146,1643702400"; d="scan'208";a="641284267" Received: from silpixa00399126.ir.intel.com ([10.237.223.34]) by orsmga004.jf.intel.com with ESMTP; 01 Mar 2022 06:44:14 -0800 From: Bruce Richardson To: stable@dpdk.org Cc: christian.ehrhardt@canonical.com, Bruce Richardson , Jerin Jacob Subject: [PATCH 19.11 v2 4/5] build: fix warnings when running external commands Date: Tue, 1 Mar 2022 14:44:02 +0000 Message-Id: <20220301144403.411190-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220301144403.411190-1-bruce.richardson@intel.com> References: <20220301140838.406891-1-bruce.richardson@intel.com> <20220301144403.411190-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 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 Cc: stable@dpdk.org Reported-by: Jerin Jacob Signed-off-by: Bruce Richardson Tested-by: Jerin Jacob --- app/test/meson.build | 4 ++-- config/arm/meson.build | 2 +- config/meson.build | 4 ++-- config/x86/meson.build | 2 +- drivers/meson.build | 4 ++-- kernel/linux/kni/meson.build | 2 +- kernel/linux/meson.build | 6 +++--- lib/meson.build | 4 ++-- meson.build | 4 ++-- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index 2e35e93477..5554be9710 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -405,7 +405,7 @@ dpdk_test = executable('dpdk-test', has_hugepage = true if is_linux check_hugepage = run_command('cat', - '/proc/sys/vm/nr_hugepages') + '/proc/sys/vm/nr_hugepages', check: false) if (check_hugepage.returncode() != 0 or check_hugepage.stdout().strip() == '0') has_hugepage = false @@ -419,7 +419,7 @@ timeout_seconds = 600 timeout_seconds_fast = 10 get_coremask = find_program('get-coremask.sh') -num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip() +num_cores_arg = '-l ' + run_command(get_coremask, check: true).stdout().strip() default_test_args = [num_cores_arg] diff --git a/config/arm/meson.build b/config/arm/meson.build index 60f7b05396..dceea336dd 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -152,7 +152,7 @@ else # 'Primary Part number', 'Revision'] 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(' ') endif diff --git a/config/meson.build b/config/meson.build index e87d1ba533..4b03746889 100644 --- a/config/meson.build +++ b/config/meson.build @@ -22,8 +22,8 @@ is_ms_linker = is_windows and (cc.get_id() == 'clang') # depending on the configuration options pver = meson.project_version().split('.') major_version = '@0@.@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() # experimental libraries are versioned as 0.majorminor versions, e.g. 0.201 ever = abi_version.split('.') experimental_abi_version = '0.@0@@1@'.format(ever.get(0), ever.get(1)) diff --git a/config/x86/meson.build b/config/x86/meson.build index adc857ba28..855a7d0edd 100644 --- a/config/x86/meson.build +++ b/config/x86/meson.build @@ -3,7 +3,7 @@ # get binutils version for the workaround of Bug 97 if not is_windows - ldver = run_command('ld', '-v').stdout().strip() + ldver = run_command('ld', '-v', check: true).stdout().strip() if ldver.contains('2.30') and cc.has_argument('-mno-avx512f') machine_args += '-mno-avx512f' message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97') diff --git a/drivers/meson.build b/drivers/meson.build index 0400d84675..22cc049142 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -127,8 +127,8 @@ foreach class:dpdk_driver_classes meson.current_source_dir(), drv_path, lib_name) - is_experimental = run_command(is_experimental_cmd, - files(version_map)).returncode() + is_experimental = run_command(is_experimental_cmd, files(version_map), + check: false).returncode() if is_experimental != 0 lib_version = experimental_abi_version diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build index facc6d8a69..eb97ec1491 100644 --- a/kernel/linux/kni/meson.build +++ b/kernel/linux/kni/meson.build @@ -5,7 +5,7 @@ # Ref: https://jira.devtools.intel.com/browse/DPDK-29263 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 kmod_cflags = '-DHAVE_ARG_TX_QUEUE' diff --git a/kernel/linux/meson.build b/kernel/linux/meson.build index cd74739905..793c58ef56 100644 --- a/kernel/linux/meson.build +++ b/kernel/linux/meson.build @@ -13,7 +13,7 @@ kernel_dir = get_option('kernel_dir') kernel_source_dir = get_option('kernel_dir') if kernel_dir == '' # use default path for native builds - kernel_version = run_command('uname', '-r').stdout().strip() + kernel_version = run_command('uname', '-r', check: true).stdout().strip() kernel_dir = '/lib/modules/' + kernel_version if kernel_source_dir == '' # use default path for native builds @@ -22,8 +22,8 @@ if kernel_dir == '' endif # test running make in kernel directory, using "make kernelversion" -make_returncode = run_command('make', '-sC', kernel_dir + '/build', - 'kernelversion').returncode() +make_returncode = run_command('make', '-sC', kernel_dir + '/build', 'kernelversion', + check: false).returncode() if make_returncode != 0 warning('Cannot compile kernel modules as requested - are kernel headers installed?') subdir_done() diff --git a/lib/meson.build b/lib/meson.build index f8da4f3168..6d86ca3e26 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -108,8 +108,8 @@ foreach l:libraries version_map = '@0@/@1@/rte_@2@_version.map'.format( meson.current_source_dir(), dir_name, name) - is_experimental = run_command(is_experimental_cmd, - files(version_map)).returncode() + is_experimental = run_command(is_experimental_cmd, files(version_map), + check: false).returncode() if is_experimental != 0 lib_version = experimental_abi_version diff --git a/meson.build b/meson.build index a32bcda1c9..94f51a8c6c 100644 --- a/meson.build +++ b/meson.build @@ -4,8 +4,8 @@ project('DPDK', 'C', # Get version number from file. # Fallback to "more" for Windows compatibility. - version: run_command(find_program('cat', 'more'), - files('VERSION')).stdout().strip(), + version: run_command(find_program('cat', 'more'), files('VERSION'), + check: true).stdout().strip(), license: 'BSD', default_options: [ 'buildtype=release', -- 2.32.0