-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
base: main
Are you sure you want to change the base?
tests: drivers: ipm: Fix drivers.ipc.mailbox #81032
Conversation
tests/drivers/ipm/src/main.c
Outdated
@@ -32,9 +32,9 @@ extern struct ipm_driver_api ipm_dummy_api; | |||
|
|||
/* Set up the dummy IPM driver */ | |||
struct ipm_dummy_driver_data ipm_dummy0_driver_data; | |||
DEVICE_DEFINE(ipm_dummy0, "ipm_dummy0", NULL, | |||
DEVICE_DEFINE(ipm_dummy0, "ipm_dummy0", ipm_dummy_init, |
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 is a dummy init call needed?
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.
to check the dummy device for this test that it pass init stage
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.
Device successful init needs to be tested by getting a valid reference when using device_get_binding, not by inserting dummy calls
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.
What is the problem to check the init this way for this test's purposes ?
(device_get_binding() check is added as well)
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
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 <[email protected]>
c3b67da
to
e31351b
Compare
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.
Before the fix:
./scripts/twister -p qemu_x86 -T tests/drivers/ipm
with the fix: