Skip to content

tests: drivers: spi : some NXP platform fail with spi_loopback tests #88090

Closed
@hakehuang

Description

@hakehuang

Describe the bug

A clear and concise description of what the bug is.

Please also mention any information which could help others to understand
the problem you're facing:

  • What target platform are you using?

    • twr_ke18f
    • frdm_mcxn947_mcxn947_cpu0
    • mimxrt1180_evk/mimxrt1189/cm33
    • mimxrt700_evk/mimxrt798s/cm33_cpu0
  • What have you tried to diagnose or workaround this issue?

  • git bisect

  • Is this a regression? If yes, have you been able to "git bisect" it to a
    specific commit?

6bcee13d9bb040515ad8bb52b84bc9b2e2779209 is the first bad commit
commit 6bcee13d9bb040515ad8bb52b84bc9b2e2779209
Author: Declan Snyder <declan.snyder@nxp.com>
Date:   Wed Feb 26 14:20:44 2025 -0600

    tests: spi_loopback: Use ZTest properly

    Instead of having a bunch of giant if conditions and just running
    all the test cases from one actual ZTest case, convert all the test
    cases into proper ZTest test cases.

    Removing the returns is now required because otherwise there will be
    compiler warnings, and they were never doing anything anyways in the
    event of zassert fail. ZTest cases are meant to report pass or fail with
    ztest paradigm, not with return values and log messages.

    Also move the test of the spi lock/release to a separate test suite
    since it is not really testing an actual bus transfer, but rather a
    that a feature in the SPI API is respected.

    Signed-off-by: Declan Snyder <declan.snyder@nxp.com>

 tests/drivers/spi/spi_loopback/src/spi.c | 191 +++++++++++--------------------
 1 file changed, 70 insertions(+), 121 deletions(-)

To Reproduce

west update
scripts/twister --device-testing --hardware-map /home/ubuntu/nxp/twr_ke18f/map.yaml --west-flash -T tests/drivers/spi/spi_loopback/

Expected behavior

Test PASS

Impact

spi function

Logs and console output

2025-04-03 15:10:29,635 - twister - DEBUG - DEVICE: *** Booting Zephyr OS build v4.1.0-1089-g6bcee13d9bb0 ***
2025-04-03 15:10:29,645 - twister - DEBUG - DEVICE: I: SPI test on buffers TX/RX 0x20004300/0x200042e0, frame size = 8, DMA enabled (without CONFIG_NOCACHE_MEMORY)
2025-04-03 15:10:29,649 - twister - DEBUG - DEVICE: Running TESTSUITE spi_extra_api_features
2025-04-03 15:10:29,655 - twister - DEBUG - DEVICE: ===================================================================
2025-04-03 15:10:29,658 - twister - DEBUG - DEVICE: START - test_spi_lock_release
2025-04-03 15:10:29,661 - twister - DEBUG - DEVICE: I: channel 0 error status is 0x0
2025-04-03 15:10:29,663 - twister - DEBUG - DEVICE: I: channel 1 error status is 0x2

Environment (please complete the following information):

  • OS: (e.g. Linux, MacOS, Windows)
  • Toolchain (e.g Zephyr SDK, ...)
  • Commit SHA or Version used: v4.1.0-1841-g8f53407fa67

Metadata

Metadata

Assignees

Labels

bugThe issue is a bug, or the PR is fixing a bugplatform: NXPNXP

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions