From: Alison Schofield <alison.schofield@intel.com>
To: Richard Cheng <icheng@nvidia.com>
Cc: <nvdimm@lists.linux.dev>, <linux-cxl@vger.kernel.org>
Subject: Re: [ndctl PATCH] test/cxl-poison.sh: test scanning past fully mapped partitions
Date: Tue, 21 Jul 2026 17:21:19 -0700 [thread overview]
Message-ID: <amAM_w91VuN_1t6s@aschofie-mobl2.lan> (raw)
In-Reply-To: <ak9yQtGEvMWruPhV@MWDK4CY14F>
On Thu, Jul 09, 2026 at 06:12:17PM +0800, Richard Cheng wrote:
> On Tue, Jun 30, 2026 at 09:42:02PM +0800, Alison Schofield wrote:
> > Listing poison by memdev scans the unmapped tail of every partition.
> > When an earlier partition is fully mapped, its tail is zero length, but
> > the scan must continue to later partitions. A regression caused the
> > scan to stop at the first fully-mapped partition, leaving later
> > partitions unscanned.
> >
> > Backstop that behavior with a test case that fully maps a memdev's RAM
> > partition so its unmapped tail is zero length, then injects poison into
> > the unmapped PMEM partition that follows. The PMEM poison is only
> > reported if the scan continues past the fully-mapped RAM partition.
> >
>
> Hi Alison,
>
> Thanks for this ! I ran it against cxl_test in the following ways.
>
> On a kernel with the fix [1], the test passes in both run_poison_test passes:
> 1 poison record found after inject at the first pmem DPA, 0 after clear.
>
> On a kernel without the fix, it fails exactly at the "1 poison records expected, 0 found"
> assertion, so it catches the regression as intended.
>
> Just one small thing below.
>
>
> > Signed-off-by: Alison Schofield <alison.schofield@intel.com>
> > ---
> > test/cxl-poison.sh | 40 ++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 40 insertions(+)
> >
> > diff --git a/test/cxl-poison.sh b/test/cxl-poison.sh
> > index 49aa1b68c5c1..a03e08084eb4 100644
> > --- a/test/cxl-poison.sh
> > +++ b/test/cxl-poison.sh
> > @@ -219,6 +219,45 @@ test_poison_by_region_offset_negative()
> > clear_poison "$region" "$large_offset" true
> > }
> >
> > +# Backstop a driver fix where a fully mapped partition prematurely
> > +# terminated the unmapped poison scan.
> > +test_poison_unmapped_later_partition()
> > +{
> > + local decoder ram_size pmem_dpa
> > +
>
> "region" is assigned below but not declared local like the others.
> Does it have any reason for it to not be local var?
> It might be harmless today but tests added after this one will inherit
> a stale global region, if it ever uses one.
>
> Tested-by: Richard Cheng <icheng@nvidia.com>
> Reviewed-by: Richard Cheng <icheng@nvidia.com>
Thanks!
I made region a local per your suggestion.
Applied to pending for NDCTL v86
https://github.com/pmem/ndctl/commits/pending/
next prev parent reply other threads:[~2026-07-22 0:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 4:42 [ndctl PATCH] test/cxl-poison.sh: test scanning past fully mapped partitions Alison Schofield
2026-07-09 10:12 ` Richard Cheng
2026-07-22 0:21 ` Alison Schofield [this message]
2026-08-31 19:52 ` 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=amAM_w91VuN_1t6s@aschofie-mobl2.lan \
--to=alison.schofield@intel.com \
--cc=icheng@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.