public inbox for linux-cxl@vger.kernel.org
 help / color / mirror / Atom feed
From: cp0613@linux.alibaba.com
To: ishal.l.verma@intel.com, alison.schofield@intel.com,
	nvdimm@lists.linux.dev
Cc: linux-cxl@vger.kernel.org, Chen Pei <cp0613@linux.alibaba.com>
Subject: [ndctl PATCH 2/2] ndctl/test: Fix meson configuration error when fwctl is disabled
Date: Tue, 10 Mar 2026 10:41:02 +0800	[thread overview]
Message-ID: <20260310024102.25682-3-cp0613@linux.alibaba.com> (raw)
In-Reply-To: <20260310024102.25682-1-cp0613@linux.alibaba.com>

From: Chen Pei <cp0613@linux.alibaba.com>

The meson.build script unconditionally references the fwctl
executable in the depends list of test definitions. However,
fwctl is only defined when the fwctl build option is enabled.
This causes a meson configuration error:

  test/meson.build:283:6: ERROR: Unknown variable "fwctl".

when building with -Dfwctl=disabled.

This patch fixes the issue by moving the test dependencies
into a conditional list (tests_deps) that includes fwctl only
when the option is enabled, ensuring all referenced variables
are properly defined during meson configuration.

Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
---
 test/meson.build | 31 ++++++++++++++++++-------------
 1 file changed, 18 insertions(+), 13 deletions(-)

diff --git a/test/meson.build b/test/meson.build
index 615376e..a4e3805 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -267,22 +267,27 @@ test_env = [
     'DATA_PATH=@0@'.format(meson.current_source_dir()),
 ]
 
+tests_deps = [
+  ndctl_tool,
+  daxctl_tool,
+  cxl_tool,
+  smart_notify,
+  list_smart_dimm,
+  dax_pmd,
+  dax_errors,
+  daxdev_errors,
+  dax_dev,
+  mmap,
+]
+
+if get_option('fwctl').enabled()
+  tests_deps += [fwctl]
+endif
+
 foreach t : tests
   test(t[0], t[1],
     is_parallel : false,
-    depends : [
-      ndctl_tool,
-      daxctl_tool,
-      cxl_tool,
-      smart_notify,
-      list_smart_dimm,
-      dax_pmd,
-      dax_errors,
-      daxdev_errors,
-      dax_dev,
-      fwctl,
-      mmap,
-    ],
+    depends : tests_deps,
     suite: t[2],
     timeout : 600,
     env : test_env,
-- 
2.43.0


  parent reply	other threads:[~2026-03-10  2:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10  2:41 [ndctl PATCH 0/2] ndctl: Fix build issues when fwctl is disabled cp0613
2026-03-10  2:41 ` [ndctl PATCH 1/2] ndctl: Fix missing key_type parameter in ndctl_dimm_remove_key stub cp0613
2026-03-19  0:45   ` Alison Schofield
2026-03-10  2:41 ` cp0613 [this message]
2026-03-19  0:39   ` [ndctl PATCH 2/2] ndctl/test: Fix meson configuration error when fwctl is disabled Alison Schofield

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260310024102.25682-3-cp0613@linux.alibaba.com \
    --to=cp0613@linux.alibaba.com \
    --cc=alison.schofield@intel.com \
    --cc=ishal.l.verma@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox