-
Notifications
You must be signed in to change notification settings - Fork 8.3k
tests: drivers: ipm: Fix drivers.ipc.mailbox #81032
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
tests: drivers: ipm: Fix drivers.ipc.mailbox #81032
Conversation
gmarull
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant init call
253c402 to
c3b67da
Compare
c3b67da to
e31351b
Compare
tests/drivers/ipm/src/main.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why PRE_KERNEL_2? I would avoid this and use PRE_KERNEL_1 if possible, PRE_KERNEL_2 is something that hopefully will go away soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why PRE_KERNEL_2?
Looking at drivers/ipm where both are used, my choice was the closest to POST_KERNEL as it was here,
although there is no visible difference when this test runs on qemu-s.
PRE_KERNEL_2 is something that hopefully will go away soon.
interesting, I didn't come across this info in the sources or docs, eg.
https://github.com/zephyrproject-rtos/zephyr/blob/main/doc/kernel/drivers/index.rst#initialization-levels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is being discussed, please move this to PRE_KERNEL_1 for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, changed to PRE_KERNEL_1
|
did you consider switching this to ztest instead? Parsing output like this is not great and we do it mostly for samples only. |
I thought about refactoring to ztest, but considered it would be too much for a quick fix of this particular test where the console harness works well. |
Fix 'drivers.ipc.mailbox' test suite to restore and improve its testing functionality: * fix printf() redirection through IPM console. * fix and check the dummy driver initialization. * specify correct Twister harness type (Console) and use matching patterns to recognize the expected console output. Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
e31351b to
c6fde3d
Compare
Fix
drivers.ipc.mailboxtest suite to restore and improve its testing functionality:fix printf() redirection through IPM console.
fix and check the dummy driver initialization.
specify correct Twister harness type (Console) and use matching patterns to recognize the expected console output.
Before the fix:
./scripts/twister -p qemu_x86 -T tests/drivers/ipmwith the fix: