Linux CXL
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: Alison Schofield <alison.schofield@intel.com>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Jonathan Cameron <jic23@kernel.org>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <iweiny@kernel.org>, Li Ming <ming.li@zohomail.com>,
	Richard Cheng <icheng@nvidia.com>
Cc: linux-cxl@vger.kernel.org
Subject: Re: [PATCH 0/4] cxl: Add KUnit tests and documentation
Date: Wed, 14 Oct 2026 13:52:36 -0700	[thread overview]
Message-ID: <9247c159-2ea0-4a69-b795-0583cbd078a1@intel.com> (raw)
In-Reply-To: <cover.1791949910.git.alison.schofield@intel.com>



On 10/13/26 9:17 PM, Alison Schofield wrote:
> The CXL subsystem has no KUnit tests. Its automated test coverage comes
> from cxl_test and the ndctl suite, which exercise the driver stack through
> an emulated CXL topology. KUnit complements that coverage by testing self-
> contained logic and error paths in isolation.
> 
> This series introduces CXL KUnit infrastructure and documentation describing
> how it complements the existing cxl_test coverage.
> 
> The first KUnit suite, a collection of related test cases, exercises the HDM
> decoder interleave encoding helpers, providing a starting point for testing
> self-contained CXL logic. The second suite exercises mailbox command handling,
> including error paths that are difficult to reach through cxl_test.
> 
> The mailbox tests also demonstrate the value of regression coverage. An
> unknown device return code can cause an out-of-bounds read and allow a failed
> command to be reported as successful. The series corrects that behavior, then
> adds tests that reproduce the failure without the correction. With KASAN enabled,
> the tests also expose the out-of-bounds read.
> 
> Together, the two suites establish a pattern for adding KUnit coverage
> to CXL, both for existing functionality and for bugs as they are found.
> 
> 
> 
> Alison Schofield (3):
>   Documentation/driver-api/cxl: Add a testing page
>   cxl: Add KUnit tests for HDM decoder encoding helpers
>   cxl/mbox: Add KUnit tests for cxl_internal_send_cmd()
> 
> Gaobin Huang (1):
>   cxl/mbox: Treat unknown device return codes as errors
> 
>  Documentation/driver-api/cxl/index.rst   |   1 +
>  Documentation/driver-api/cxl/testing.rst | 120 +++++++++++
>  drivers/cxl/.kunitconfig                 |   4 +
>  drivers/cxl/Kconfig                      |  16 ++
>  drivers/cxl/Makefile                     |   1 +
>  drivers/cxl/core/Makefile                |   1 +
>  drivers/cxl/core/tests/Makefile          |   5 +
>  drivers/cxl/core/tests/mbox_kunit.c      | 249 +++++++++++++++++++++++
>  drivers/cxl/cxlmem.h                     |   6 +
>  drivers/cxl/tests/Makefile               |   5 +
>  drivers/cxl/tests/hdm_encoding_kunit.c   | 156 ++++++++++++++
>  11 files changed, 564 insertions(+)
>  create mode 100644 Documentation/driver-api/cxl/testing.rst
>  create mode 100644 drivers/cxl/.kunitconfig
>  create mode 100644 drivers/cxl/core/tests/Makefile
>  create mode 100644 drivers/cxl/core/tests/mbox_kunit.c
>  create mode 100644 drivers/cxl/tests/Makefile
>  create mode 100644 drivers/cxl/tests/hdm_encoding_kunit.c
> 

Nice! For the series,
Reviewed-by: Dave Jiang <dave.jiang@intel.com>


      parent reply	other threads:[~2026-10-14 20:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14  4:17 [PATCH 0/4] cxl: Add KUnit tests and documentation Alison Schofield
2026-10-14  4:17 ` [PATCH 1/4] Documentation/driver-api/cxl: Add a testing page Alison Schofield
2026-10-14 21:34   ` Alison Schofield
2026-10-14  4:17 ` [PATCH 2/4] cxl: Add KUnit tests for HDM decoder encoding helpers Alison Schofield
2026-10-14  4:17 ` [PATCH 3/4] cxl/mbox: Treat unknown device return codes as errors Alison Schofield
2026-10-14 15:06   ` 黄高彬
2026-10-14  4:17 ` [PATCH 4/4] cxl/mbox: Add KUnit tests for cxl_internal_send_cmd() Alison Schofield
2026-10-14 20:52 ` Dave Jiang [this message]

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=9247c159-2ea0-4a69-b795-0583cbd078a1@intel.com \
    --to=dave.jiang@intel.com \
    --cc=alison.schofield@intel.com \
    --cc=dave@stgolabs.net \
    --cc=icheng@nvidia.com \
    --cc=iweiny@kernel.org \
    --cc=jic23@kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=ming.li@zohomail.com \
    --cc=vishal.l.verma@intel.com \
    /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