-
Notifications
You must be signed in to change notification settings - Fork 3k
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
connectivity tests: avoid HardFault with null pointer #15068
Conversation
@jeromecoutant, thank you for your changes. |
This pull request has automatically been marked as stale because it has had no recent activity. @ARMmbed/mbed-os-maintainers, @ARMmbed/mbed-os-connectivity, please complete review of the changes to move the PR forward. Thank you for your contributions. |
@@ -30,6 +30,10 @@ using namespace utest::v1; | |||
void wifi_connect(void) | |||
{ | |||
WiFiInterface *wifi = get_interface(); | |||
TEST_ASSERT(wifi); | |||
if (wifi == NULL) { |
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's the difference between wifi tests returning (assert before) and asserting with a message (TEST_ASSERT_NOT_NULL_MESSAGE
not in this case)
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.
Other tests are stopping as soon as a test assert comes.
This one doesn't stop, so it needs a "clean" return.
Let's start CI ? |
Jenkins CI Test : ❌ FAILEDBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Jenkins CI Test : ✔️ SUCCESSBuild Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
Issue occurs with wrong mbed setup,
for example if you forget to config the correct IP interface.
In this case tests are crashing into HardFault.
Proposition is to check the interface pointer in each tests.
Now tests are failing with more explicit status.
Thx
Impact of changes
none for well configured setup :-)
Migration actions required
Documentation
Pull request type
Test results
Reviewers