NVDIMM Device and Persistent Memory development
 help / color / mirror / Atom feed
From: Marc Herbert <marc.herbert@linux.intel.com>
To: Dave Jiang <dave.jiang@intel.com>,
	linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev
Cc: alison.schofield@intel.com, Dan Williams <dan.j.williams@intel.com>
Subject: Re: [NDCTL PATCH v9 4/4] cxl/test: Add test for cxl features device
Date: Fri, 23 May 2025 14:20:50 -0700	[thread overview]
Message-ID: <912b25f7-95be-4933-b024-909bf6eb925f@linux.intel.com> (raw)
In-Reply-To: <20250523164641.3346251-5-dave.jiang@intel.com>

Again, apologies for commenting so late (v9).

I reviewed only the shell script below and all these comments
could be "future improvements" post merge. Or, before merge
if there is a v10.

On 2025-05-23 09:46, Dave Jiang wrote:
> --- /dev/null
> +++ b/test/cxl-features.sh
> @@ -0,0 +1,37 @@
> +#!/bin/bash -Ex
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (C) 2025 Intel Corporation. All rights reserved.
> +
> +main()
> +{
> +    local rc=77
> +    # 237 is -ENODEV
> +    ERR_NODEV=237

Nit: local ERR_NODEV=237

> +
> +    . $(dirname "$0")/common

Mmmm... interesting, moving this too goes beyond what I recommended but
maybe it's better?

In theory, sourced files have no side-effect or barely. In practice
though...

LGTM!

> +    FEATURES="$TEST_PATH"/fwctl
> +
> +    trap 'err $LINENO' ERR
> +
> +    modprobe cxl_test
> +
> +    test -x "$FEATURES" || do_skip "no CXL Features Control"
> +
> +    rc=0
> +    "$FEATURES" || rc=$?
> +
> +    echo "error: $rc"

echo "status: $rc"

> +    if [ "$rc" -eq "$ERR_NODEV" ]; then
> +	do_skip "no CXL FWCTL char dev"
> +    elif [ "$rc" -ne 0 ]; then
> +	echo "fail: $LINENO" && exit 1
> +    fi
> +
> +    trap 'err $LINENO' ERR

I had a chat with David and he confirmed this duplicate is an oversight.

> +
> +    _cxl_cleanup
> +}
> +
> +{
> +    main "$@"; exit "$?"
> +}

  reply	other threads:[~2025-05-23 21:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-23 16:46 [NDCTL PATCH v9 0/4] ndctl: Add support and test for CXL Features support Dave Jiang
2025-05-23 16:46 ` [NDCTL PATCH v9 1/4] cxl: Add cxl_bus_get_by_provider() Dave Jiang
2025-05-23 16:46 ` [NDCTL PATCH v9 2/4] cxl: Enumerate major/minor of FWCTL char device Dave Jiang
2025-05-29 13:17   ` Jonathan Cameron
2025-05-23 16:46 ` [NDCTL PATCH v9 3/4] ndctl: Add features.h from kernel UAPI Dave Jiang
2025-05-23 16:46 ` [NDCTL PATCH v9 4/4] cxl/test: Add test for cxl features device Dave Jiang
2025-05-23 21:20   ` Marc Herbert [this message]
2025-05-28  1:36 ` [NDCTL PATCH v9 0/4] ndctl: Add support and test for CXL Features support 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=912b25f7-95be-4933-b024-909bf6eb925f@linux.intel.com \
    --to=marc.herbert@linux.intel.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@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