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 wifi test cases - disconnect done as teardown after each connect #5743

Merged
merged 6 commits into from Dec 28, 2017

Conversation

Projects
None yet
6 participants
@VeijoPesonen
Contributor

VeijoPesonen commented Dec 21, 2017

Description

Assumed behavior of the drivers is that when connect method is called the modem is not in connected state. In other words when a test case executes connect successfully the next case assumes that disconnect has also been called.

If AP is not found instead of expecting NSAPI_ERROR_PARAMETER we are expecting NSAPI_ERROR_NO_SSID from now on.

NSAPI_SECURITY_WPA_WPA2 used in WIFI_CONNECT_SECURE from now on.

Don't check against assumed channel if user configures channel number as 0. This is helpful if a driver does not support setting the channel.

Status

READY

Migrations

NO

Steps to test or reproduce

...\mbed-os> mbed test --compile -t ARM -m REALTEK_RTL8195AM --app-config .\TESTS\network\wifi\template_mbed_app.txt -n tests-network-wifi
...\mbed-os> mbedhtrun -f .\BUILD\tests\REALTEK_RTL8195AM\ARM\TESTS\network\wifi\wifi.bin -d X: -p COMY:9600

VeijoPesonen added some commits Dec 8, 2017

Greentea Wifi testcase fixes
Call disconnect when connect has been tested. Also instead of waiting
for parameter error in case of missing SSID give missing SSID error
code.
Greentea WIFI-SCAN - make possible to disable check against assumed c…
…hannel

It's possible that a device does not support setting the channel to be used.
In case channel is not set by the device lets disable the check.
@VeijoPesonen

This comment has been minimized.

Contributor

VeijoPesonen commented Dec 21, 2017

@SeppoTakalo and @jarlamsa, please review

@@ -54,12 +54,16 @@ void wifi_scan(void)
if (strcmp(MBED_CONF_APP_WIFI_SECURE_SSID, ssid) == 0) {
secure_found = true;
TEST_ASSERT_EQUAL_INT(NSAPI_SECURITY_WPA2, security);

This comment has been minimized.

@jarlamsa

jarlamsa Dec 21, 2017

Contributor

Should this be changed also to WPA/WPA2?

This comment has been minimized.

@VeijoPesonen

VeijoPesonen Dec 21, 2017

Contributor

Yes, it should and I'll change it.

This comment has been minimized.

@jarlamsa

jarlamsa Dec 21, 2017

Contributor

Security to check against should be defined in the .json which also defines the wlan ap to connect to.

@SeppoTakalo

This comment has been minimized.

Contributor

SeppoTakalo commented Dec 21, 2017

Partially dublicate of this: #5723

The disconnect phase is added there.

@0xc0170 0xc0170 added the needs: work label Dec 21, 2017

@0xc0170 0xc0170 added needs: CI and removed needs: work labels Dec 22, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Dec 22, 2017

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Dec 22, 2017

Build : SUCCESS

Build number : 750
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5743/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build

@@ -28,6 +28,5 @@ void wifi_connect_nocredentials(void)
WiFiInterface *wifi = get_interface();
nsapi_error_t error;
error = wifi->connect();
wifi->disconnect();
TEST_ASSERT(error == NSAPI_ERROR_PARAMETER);
TEST_ASSERT(error == NSAPI_ERROR_NO_SSID);

This comment has been minimized.

@SeppoTakalo

SeppoTakalo Dec 22, 2017

Contributor

Should we also accept the NSAPI_ERROR_PARAMETER

I'm not sure that all drivers currently return this NO_SSID.

This comment has been minimized.

@VeijoPesonen

VeijoPesonen Dec 22, 2017

Contributor

I'll add it.

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Dec 22, 2017

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Dec 22, 2017

Build : SUCCESS

Build number : 759
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5743/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr cmonr merged commit 43af0d7 into ARMmbed:master Dec 28, 2017

17 checks passed

AWS-CI uVisor Build & Test Verification build successful.
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Local events testing has passed
Details
travis-ci/littlefs Local littlefs testing has passed
Details
travis-ci/mbed2-ATMEL Local mbed2-ATMEL testing has passed
Details
travis-ci/mbed2-MAXIM Local mbed2-MAXIM testing has passed
Details
travis-ci/mbed2-NORDIC Local mbed2-NORDIC testing has passed
Details
travis-ci/mbed2-NUVOTON Local mbed2-NUVOTON testing has passed
Details
travis-ci/mbed2-NXP Local mbed2-NXP testing has passed
Details
travis-ci/mbed2-SILICON_LABS Local mbed2-SILICON_LABS testing has passed
Details
travis-ci/mbed2-STM Local mbed2-STM testing has passed
Details
travis-ci/tools Local tools testing has passed
Details

@VeijoPesonen VeijoPesonen deleted the VeijoPesonen:greentea-wifi-fixes-disconnect branch Jan 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment