diff options
| author | Alison Schofield <alison.schofield@intel.com> | 2026-11-02 11:15:14 -0800 |
|---|---|---|
| committer | Dave Jiang <dave.jiang@intel.com> | 2026-11-02 14:00:22 -0700 |
| commit | 533928808ac1e6a96a7daa74b6ad68c3f7f43a28 (patch) | |
| tree | 71432cc6315933e2ebf1aeff30e6f4d029684d16 /scripts/Makefile.thinlto | |
| parent | a0481710d758d1d9c560a84551dbb61ea86d3299 (diff) | |
| download | linux-next-533928808ac1e6a96a7daa74b6ad68c3f7f43a28.tar.gz linux-next-533928808ac1e6a96a7daa74b6ad68c3f7f43a28.zip | |
cxl/mbox: Add KUnit tests for cxl_internal_send_cmd()
cxl_internal_send_cmd() validates mailbox payload sizes, translates device
return codes to errnos, and checks returned output sizes. Existing cxl_test
coverage does not exercise many of its error paths.
Add a KUnit suite that replaces mbox_send() with a stub transport, allowing
tests to control transport errors, device return codes, and output sizes.
The suite covers command forwarding, payload size limits, transport errors,
defined and unknown device return codes, background commands, and fixed
versus variable output sizes.
The unknown return code cases provide regression coverage for "cxl/mbox:
Treat unknown device return codes as errors". Without that change, the
tests fail and KASAN reports a global out-of-bounds read.
The suite uses the existing CONFIG_CXL_KUNIT_TEST option, allowing it to
run without additional configuration.
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/7e9ed4f09b2fb56847c58e0fc5a9b2590d6576f2.1793645996.git.alison.schofield@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
