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 55DB0A04A4 for ; Tue, 1 Mar 2022 15:09:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 515EE426FB; Tue, 1 Mar 2022 15:09:04 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 0DD33426FB for ; Tue, 1 Mar 2022 15:09:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646143742; x=1677679742; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=E83VI3caFnDlGERyB7ZRgjoX7/ClyxFv4EYtdTwcZqI=; b=OTsTAt9jM6sngf5rW8Na8l6E41EAs8rZsiw6DHMFU/GXDImHLnHHLcN5 DXGOOaPdJCrQ34gww2vRReyX18SVMCpsJ43YoFMZI7kbSPE1wuGOl8gBC E3zFEn3E/xfOk/TBNSIy+yuz7IAo5p5RbZN6yVRT33JLoSxTNgh1d0Cla WNKjg5fQLmo82sWuuSirhaJ98Ox0xW+fu02xlcxPYO0tmxOgl4m2dMvtw p8+yCU2BNjpIf2OzpfXSjks0TBcc18RUlXlLggD2HeXSWKi7isC03DCAH pSgl2J/Q96XIlzDlHQYQ/nfdGpg2uRFbFk72x9GMpc1Zw7NgungZuYk8c g==; X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="251967518" X-IronPort-AV: E=Sophos;i="5.90,146,1643702400"; d="scan'208";a="251967518" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2022 06:09:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,146,1643702400"; d="scan'208";a="510522994" Received: from silpixa00399126.ir.intel.com ([10.237.223.34]) by orsmga006.jf.intel.com with ESMTP; 01 Mar 2022 06:09:00 -0800 From: Bruce Richardson To: stable@dpdk.org Cc: christian.ehrhardt@canonical.com, Bruce Richardson , Jerin Jacob Subject: [PATCH 19.11 4/4] build: fix warnings when running external commands Date: Tue, 1 Mar 2022 14:08:38 +0000 Message-Id: <20220301140838.406891-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220301140838.406891-1-bruce.richardson@intel.com> References: <20220301140838.406891-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 | 2 +- config/arm/meson.build | 2 +- config/meson.build | 4 ++-- config/x86/meson.build | 2 +- kernel/linux/kni/meson.build | 2 +- kernel/linux/meson.build | 6 +++--- meson.build | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index 2e35e93477..8823f5a960 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 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/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/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