Skip to content

tests: spi: spi_loopback fails with test_spi_null_rx_buf_set #88704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hakehuang opened this issue Apr 16, 2025 · 0 comments
Open

tests: spi: spi_loopback fails with test_spi_null_rx_buf_set #88704

hakehuang opened this issue Apr 16, 2025 · 0 comments
Assignees
Labels
area: SPI SPI bus area: Tests Issues related to a particular existing or missing test bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@hakehuang
Copy link
Collaborator

hakehuang commented Apr 16, 2025

Describe the bug

test_spi_null_rx_buf_set fails on several NXP platforms

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

  • What target platform are you using?
  • frdm_ke17z/frdm_ke17z512/frdm_k64f/rd_rw612_bga/frdm_rw612
  • 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?
b983b0441b4ad6f11edfb678c09dc7237570c5e4 is the first bad commit
commit b983b0441b4ad6f11edfb678c09dc7237570c5e4
Author: Piotr Krzyzanowski <[email protected]>
Date:   Mon Mar 24 22:58:15 2025 +0100

    tests: drivers: spi: Add NULL spi_buf_set tests

    Add test cases where spi_transceive gets NULL spi_buf_set
    once for tx and once for rx.

    Signed-off-by: Piotr Krzyzanowski <[email protected]>

 tests/drivers/spi/spi_loopback/src/spi.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)


To Reproduce

scripts/twister --device-testing --hardware-map map.yaml -T tests/drivers/spi/spi_loopback/

Expected behavior

test PASS

Impact

spi over flexspi

Logs and console output

*** Booting Zephyr OS build v4.1.0-2445-g246f02b09460 ***
SPI test on buffers TX/RX 0x20004380/0x20004360, frame size = 8, DMA enabled (without CONFIG_NOCACHE_MEMORY)
Polling...Running TESTSUITE spi_extra_api_features
===================================================================
START - test_spi_lock_release
 PASS - test_spi_lock_release in 0.002 seconds
===================================================================
TESTSUITE spi_extra_api_features succeeded
Running TESTSUITE spi_extra_api_features
===================================================================
START - test_spi_lock_release
 PASS - test_spi_lock_release in 0.002 seconds
===================================================================
TESTSUITE spi_extra_api_features succeeded
Running TESTSUITE spi_loopback
===================================================================
Testing loopback spec: SLOW
START - test_nop_nil_bufs
 PASS - test_nop_nil_bufs in 0.001 seconds
===================================================================
START - test_spi_async_call
 PASS - test_spi_async_call in 0.235 seconds
===================================================================
START - test_spi_complete_large_transfers
 PASS - test_spi_complete_large_transfers in 0.232 seconds
===================================================================
START - test_spi_complete_loop
 PASS - test_spi_complete_loop in 0.001 seconds
===================================================================
START - test_spi_complete_multiple
 PASS - test_spi_complete_multiple in 0.002 seconds
===================================================================
START - test_spi_null_rx_buf_set
E: Transfer could not start
E: Timeout waiting for transfer complete

    Assertion failed at WEST_TOPDIR/zephyr/tests/drivers/spi/spi_loopback/src/spi.c:109: spi_loopback_transceive: (ret is true)
SPI transceive failed, code -116
 FAIL - test_spi_null_rx_buf_set in 0.221 seconds
===================================================================
START - test_spi_null_tx_buf
 PASS - test_spi_null_tx_buf in 0.001 seconds
===================================================================
START - test_spi_null_tx_buf_set
 PASS - test_spi_null_tx_buf_set in 0.001 seconds
===================================================================
START - test_spi_rx_bigger_than_tx
 PASS - test_spi_rx_bigger_than_tx in 0.001 seconds
===================================================================
START - test_spi_rx_every_4
 PASS - test_spi_rx_every_4 in 0.001 seconds
===================================================================
START - test_spi_rx_half_end
 PASS - test_spi_rx_half_end in 0.001 seconds
===================================================================
START - test_spi_rx_half_start
 PASS - test_spi_rx_half_start in 0.001 seconds
===================================================================
TESTSUITE spi_loopback failed.
Running TESTSUITE spi_loopback
===================================================================
Testing loopback spec: FAST
START - test_nop_nil_bufs
 PASS - test_nop_nil_bufs in 0.001 seconds
===================================================================
START - test_spi_async_call
 PASS - test_spi_async_call in 0.144 seconds
===================================================================
START - test_spi_complete_large_transfers
 PASS - test_spi_complete_large_transfers in 0.141 seconds
===================================================================
START - test_spi_complete_loop
 PASS - test_spi_complete_loop in 0.001 seconds
===================================================================
START - test_spi_complete_multiple
 PASS - test_spi_complete_multiple in 0.002 seconds
===================================================================
START - test_spi_null_rx_buf_set
E: Transfer could not start
E: Timeout waiting for transfer complete

    Assertion failed at WEST_TOPDIR/zephyr/tests/drivers/spi/spi_loopback/src/spi.c:109: spi_loopback_transceive: (ret is true)
SPI transceive failed, code -116
 FAIL - test_spi_null_rx_buf_set in 0.221 seconds
===================================================================
START - test_spi_null_tx_buf
 PASS - test_spi_null_tx_buf in 0.001 seconds
===================================================================
START - test_spi_null_tx_buf_set
 PASS - test_spi_null_tx_buf_set in 0.001 seconds
===================================================================
START - test_spi_rx_bigger_than_tx
 PASS - test_spi_rx_bigger_than_tx in 0.001 seconds
===================================================================
START - test_spi_rx_every_4
 PASS - test_spi_rx_every_4 in 0.001 seconds
===================================================================
START - test_spi_rx_half_end
 PASS - test_spi_rx_half_end in 0.001 seconds
===================================================================
START - test_spi_rx_half_start
 PASS - test_spi_rx_half_start in 0.001 seconds
===================================================================
TESTSUITE spi_loopback failed.

------ TESTSUITE SUMMARY START ------

SUITE PASS - 100.00% [spi_extra_api_features]: pass = 1, fail = 0, skip = 0, total = 1 duration = 0.002 seconds
 - PASS - [spi_extra_api_features.test_spi_lock_release] duration = 0.002 seconds

SUITE FAIL -  91.67% [spi_loopback]: pass = 11, fail = 1, skip = 0, total = 12 duration = 0.698 seconds
 - PASS - [spi_loopback.test_nop_nil_bufs] duration = 0.001 seconds
 - PASS - [spi_loopback.test_spi_async_call] duration = 0.235 seconds
 - PASS - [spi_loopback.test_spi_complete_large_transfers] duration = 0.232 seconds
 - PASS - [spi_loopback.test_spi_complete_loop] duration = 0.001 seconds
 - PASS - [spi_loopback.test_spi_complete_multiple] duration = 0.002 seconds
 - FAIL - [spi_loopback.test_spi_null_rx_buf_set] duration = 0.221 seconds
 - PASS - [spi_loopback.test_spi_null_tx_buf] duration = 0.001 seconds
 - PASS - [spi_loopback.test_spi_null_tx_buf_set] duration = 0.001 seconds
 - PASS - [spi_loopback.test_spi_rx_bigger_than_tx] duration = 0.001 seconds
 - PASS - [spi_loopback.test_spi_rx_every_4] duration = 0.001 seconds
 - PASS - [spi_loopback.test_spi_rx_half_end] duration = 0.001 seconds
 - PASS - [spi_loopback.test_spi_rx_half_start] duration = 0.001 seconds

------ TESTSUITE SUMMARY END ------

===================================================================
RunID: c7ffdb2648f21a877a72ffdc41103a86
PROJECT EXECUTION FAILED

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-2494-g86293ebe114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: SPI SPI bus area: Tests Issues related to a particular existing or missing test bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

4 participants