Skip to content

Fails tests/drivers/display/display_read_write on SDL display driver #88714

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
soburi opened this issue Apr 16, 2025 · 4 comments
Open

Fails tests/drivers/display/display_read_write on SDL display driver #88714

soburi opened this issue Apr 16, 2025 · 4 comments
Assignees
Labels
area: Display area: native port Host native arch port (native_sim) bug The issue is a bug, or the PR is fixing a bug

Comments

@soburi
Copy link
Member

soburi commented Apr 16, 2025

Describe the bug

Fails tests/drivers/display/display_read_write on SDL display driver.

At a glance, the #81184 change seems

display_read() behavior.

To Reproduce

 west twister -p native_sim -T tests/drivers/display/display_read_write/ 

Note: Currently, the test is disabled by the harness: display line.
To run the test, we need to remove this line from
tests/drivers/display/display_read_write/testcase.yaml

Expected behavior
Pass the test.

@soburi soburi added the bug The issue is a bug, or the PR is fixing a bug label Apr 16, 2025
@JarmouniA JarmouniA added area: native port Host native arch port (native_sim) area: Display labels Apr 16, 2025
@aescolar
Copy link
Member

@Finomnis
Copy link
Contributor

What's the error?

@soburi
Copy link
Member Author

soburi commented Apr 20, 2025

@Finomnis

What's the error?

As mentioned above, to run the tests/drivers/display/display_read_write/ test, you must modify the testcase.yaml. However, two errors will occur if you do so and run the tests. One is an error where the thread priority is inappropriate and the test stops with an assert.

ASSERTION FAIL [((((prio)) == 15 && z_is_idle_thread_entry((entry))) || (((15 - 1) >= ((-16))) && ((prio)) >= ((-16)) && ((prio)) <= (15 - 1)))] @ WEST_TOPDIR/zephyr/kernel/thread.c:517
 invalid priority (15); allowed range: 14 to -16
@WEST_TOPDIR/zephyr/lib/os/assert.c:43
[00:00:00.000,000] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
[00:00:00.000,000] <err> os: Current thread: 0x8140dc0 (main)
[00:00:00.000,000] <err> os: Halting system

This can be avoided by adjusting CONFIG_SDL_DISPLAY_THREAD_PRIORITY.
But I have no idea how to fix it properly at this point.

And if I work around it, the test will fail.
This test reads data written in the framebuffer memory and checks whether it is the expected content.
I think the reading behavior has probably changed.

The test passed in versions before 02d562e.
The fix in 02d562e
adds support for transparent colors, but it still affects settings other than ARGB8888. It seems strange.

*** Booting Zephyr OS build v4.1.0-2646-ge41909a32ce9 ***
Running TESTSUITE display_read_write
====================================================================
START - test_clear

 Assertion failed at WEST_TOPDIR/zephyr/tests/drivers/display/display_read_write/src/main.c:88: verify_background_color: (buf32[i] not equal to color)
@0
 FAIL - test_clear in 0.000 seconds
====================================================================
START - test_read_does_not_clear_existing_buffer

 Assertion failed at WEST_TOPDIR/zephyr/tests/drivers/display/display_read_write/src/main.c:64: verify_bytes_of_area: data not equal to disp_buffer

 FAIL - test_read_does_not_clear_existing_buffer in 0.000 seconds
====================================================================
START - test_write_to_buffer_head

 Assertion failed at WEST_TOPDIR/zephyr/tests/drivers/display/display_read_write/src/main.c:64: verify_bytes_of_area: data not equal to disp_buffer

 FAIL - test_write_to_buffer_head in 0.000 seconds
====================================================================
START - test_write_to_buffer_tail

 Assertion failed at WEST_TOPDIR/zephyr/tests/drivers/display/display_read_write/src/main.c:210: display_read_write_test_write_to_buffer_tail: data not equal to disp_buffer + (display_width * display_height * bpp - buf_size)

 FAIL - test_write_to_buffer_tail in 0.000 seconds
====================================================================
TESTSUITE display_read_write failed.

@Finomnis
Copy link
Contributor

Finomnis commented Apr 20, 2025

The thread priority issue is probably related to #87883.

@faxe1008

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Display area: native port Host native arch port (native_sim) bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

4 participants