-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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: smp: add some module and integration test cases #31010
tests: smp: add some module and integration test cases #31010
Conversation
@Zhaoningx , please review the PR. |
6614aa0
to
fb8d00d
Compare
fb8d00d
to
5c226a8
Compare
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 are we testing those internal APIs directly? Are we trying to hit coverage? Could this be due to dead code? I would prefer to see the functionality and coverage being tested using the public APIs
Got it, I understand now. I will correct this and not use this internal API for testing. Thank you! |
5c226a8
to
e39f7a2
Compare
36bd57a
to
20d044f
Compare
ca6f57f
to
de478b0
Compare
Sorry for did not give it a clear description after the update. I have updated those test cases to better testing scenarios, and also not using the internal API anymore just for coverage. There is no dead code currently(the previous merged PR#33293 has delete the dead code of z_smp_reacquire_global_lock()). So could you please help to review it again, @nashif @andyross, thank you! |
de478b0
to
1c0e3a5
Compare
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.
Two cases to remove. One that seems needless, the other is validating a behavior that is a historical bug that shouldn't even be valid.
1c0e3a5
to
d309d46
Compare
This PR add 2 module test cases: - test_smp_release_global_lock() and test_smp_release_global_lock_irq() verify z_smp_release_global_lock() works. And 1 integration test cases: - test_inc_concurrency() to verify parallelly increase operations will fail if not applying synchronization on SMP. Signed-off-by: Enjia Mai <[email protected]>
d309d46
to
ccb6146
Compare
Hi, @andyross, Thanks so much for your review. I try to address the comments you gave, could you please take a look at it again? |
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.
Can't find anything more to complain about. Thanks!
Excuse me, @nashif , could you please take a look at this PR again? I have addressed all the comments and I think it can be merged, thank you! |
Add some module and integration test cases for testing SMP:
There are several test cases added in this PR for testing:
Add module test case:
to verify z_smp_release_global_lock() works
Add integration test cases:
verify parallelly increase operations will fail if not applying synchronization on SMP.
Ps: After clarified by Andy in issue #33551, I remove the test_smp_irq_lock_sem() and test_smp_irq_lock_mutex() because it's better to no use them in this way.
Signed-off-by: Enjia Mai [email protected]