-
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
Greentea testing wifi connect nonblocked #11194
Conversation
af00970
to
b294d60
Compare
@dmaziec1, thank you for your changes. |
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.
Would you please add this to the test case documentation - TESTS/network/wifi/README.md. Otherwise this looks good to me.
@@ -0,0 +1,72 @@ | |||
/* | |||
* Copyright (c) 2017, ARM Limited, All Rights Reserved |
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.
2019
@@ -74,6 +74,7 @@ Case cases[] = { | |||
Case("WIFI-GET-RSSI", wifi_get_rssi), | |||
Case("WIFI-CONNECT-PARAMS-VALID-UNSECURE", wifi_connect_params_valid_unsecure), | |||
Case("WIFI-CONNECT", wifi_connect), | |||
//Case("WIFI-CONNECT-NONBLOCKING", wifi_connect_nonblock), |
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.
this should not be in here (can be added anytime).
Why is it commented out ? The implementation is being added in this PR.
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.
In fact, none of the Wi-Fi class implementations we checked is able to pass this test right now. We want the test to be available, however, in order to determine the expected behaviour and be able to ask Wi-Fi stack developers (Ublox, ST, etc.) to implement the missing functionality or at least return NSAPI_ERROR_UNSUPPORTED
, so the test can be skipped.
We thought it would be easiest for someone starting the implementation with a test-driven-development to uncomment this line, run the test and try to make it pass.
Removing the test is also fine - most developers will probably be able to figure out how to run it ;-).
I would say, however, that leaving a commented test will not let us (and anyone developing a W-Fi driver) forget about this function.
@0xc0170 , how about we add a comment explaining the situation, like:
// Most boards are not passing this test, but they should if they support non-blocking API.
?
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.
The comment would be better than it is now.
affc80d
to
07aa23b
Compare
} else { | ||
while ((connection_status != NSAPI_STATUS_GLOBAL_UP) | ||
&& (connection_status != NSAPI_STATUS_LOCAL_UP)) { | ||
connection_status = wifi->get_connection_status(); |
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.
You are effectively polling in busy-loop.
Please add some kind of delay here, or use callbacks that report connection status.
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.
Asynchronous execution added, @SeppoTakalo , please review again.
@dmaziec1 Please respond to reviews. |
1cce2de
to
88b00fb
Compare
88b00fb
to
6aca4ab
Compare
6aca4ab
to
8f4a865
Compare
CI started |
Test run: SUCCESSSummary: 4 of 4 test jobs passed |
Description
Added test is implemented for testing Wifi in nonblocked mode. However, it is commented in Test cases
TESTS/network/wifi/main.cpp
because most boards do not use this functionality.Pull request type
Reviewers
@SeppoTakalo
@VeijoPesonen
@michalpasztamobica
Release Notes