Commit graph

122 commits

Author SHA1 Message Date
Jouni Malinen d91a64c426 tests: WPS AP and UPnP event subscription and many events
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-06 11:56:10 +03:00
Jouni Malinen 61c3d464e6 tests: Multiple WPS ERs adding a new enrollee using PIN
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-06 11:32:02 +03:00
Jouni Malinen 926404a6b2 tests: WPS config method update for WPS and P2P
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-05 21:58:18 +03:00
Jouni Malinen d188367148 tests: WPS Enrollee protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-01 12:31:16 +03:00
Jouni Malinen fbf6b71791 tests: AP configuration using wps_config and wps_cred_processing=2
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-01 12:31:16 +03:00
Jouni Malinen ea982de1ee tests: WPS ER timing out STA entry after negotiation
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-01 12:31:16 +03:00
Jouni Malinen 96038a5f85 tests: WPS AP and advertisement OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-31 17:25:20 +03:00
Jouni Malinen 476daa0585 tests: WPS UPnP SetSelectedRegistrar protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-31 17:25:20 +03:00
Jouni Malinen 31e56b953c tests: WPS ER Selected Registrar timeout
This extends ap_wps_pbc_timeout to cover another long WPS timeout:
ER-initiated SetSelectedRegistrar timeout on AP. Using the same test
case for this avoids the need for another 120 second test case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-31 17:25:20 +03:00
Jouni Malinen 24b7f2822e tests: More WPS/HTTP test coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-31 17:25:20 +03:00
Jouni Malinen 6aaa661af1 tests: More WPS ER coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-26 21:09:37 +03:00
Jouni Malinen 4c3ae1c0d1 tests: More WPS ER HTTP protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-19 01:36:48 +03:00
Jouni Malinen c965ae034a tests: WPS ER protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-17 00:18:32 +03:00
Jouni Malinen df1d01cfed tests: WPS and non-WPS AP in single hostapd process
This is a regression test case for WPS_AP_PIN triggered hostapd segfault
when a non-WPS interface was enabled.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-16 23:14:44 +03:00
Jouni Malinen 5c267d718d tests: Fix WPS HTTP test case exceptions
resp.status is an integer, not a string.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-16 21:26:01 +03:00
Jouni Malinen e1eb0e9e6e tests: AP config using wps_config command with invalid passphrase
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-08-06 20:47:25 +03:00
Jouni Malinen a1eabc74b8 tests: Skip WPA(V1) test cases in FIPS mode
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-02 16:52:56 +03:00
Jouni Malinen 8936b095ea tests: Fix ap_wps_wpa_cli_action outside VM
Pass absolute path to the daemonized wpa_cli process and add read
privileges for everyone on the action script to make this test case work
better when run without a VM.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-23 20:48:33 +03:00
Jouni Malinen 2602a2ff9e tests: WPS events and wpa_cli action script
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-22 17:12:07 +03:00
Jouni Malinen ccf4d7644a tests: WPS ER OOM in XML processing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-19 16:44:51 +03:00
Jouni Malinen 2c3a019083 tests: Initial AP configuration and OOM during PSK generation
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-19 16:31:12 +03:00
Jouni Malinen 742408afa8 tests: Verify wpa parameter in hostapd GET_CONFIG
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-18 00:20:23 +03:00
Jouni Malinen 81f8e7e9fb tests: Increase HTTPConnection timeout in ap_wps_upnp_http_proto
It looks like the previous timeout of 0.1 seconds could be hit under
parallel VM load, so double this to 0.2 second to avoid hitting
unnecessary test failures.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-19 13:45:16 +03:00
Jouni Malinen e51c8b2e97 tests: Make ap_wps_ap_scan_2 more robust
The test sequence "scan_and_bss_entry_removed ap_wps_ap_scan_2" resulted
in failure due to an old BSS entry remaining from the first test case to
the second and the WPS_PBC operation on a forced BSSID ending up picking
the incorrect BSS entry. Make this more robust by clearing the scan
results from cfg80211.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-18 22:33:48 +03:00
Jouni Malinen 492c3a9180 tests: Make ap_wps_pbc_overlap_2* less likely to cause issues
Both of these test cases were leaving out BSS entries with active PBC
mode at the end of the test. This could result in the next text case
failing, e.g., in "ap_wps_pbc_overlap_2ap grpform_ext_listen" and
"ap_wps_pbc_overlap_2sta grpform_ext_listen" sequences. Fix this by
flushing the scan results more carefully at the end of the PBC overlap
test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-18 22:29:14 +03:00
Jouni Malinen d6f6a86a04 tests: wps_priority in configuration and WPS behavior
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-04 14:04:16 +03:00
Jouni Malinen b204753115 tests: WPS HTTP protocol tests
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-03 18:26:50 +03:00
Jouni Malinen 2272f5aada tests: WPS AP iteration on no Selected Registrar and error case
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-04-24 17:55:33 +03:00
Jouni Malinen 46dea617ae tests: WPS PIN and iterate through APs without selected registrar
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-03-06 15:37:02 +02:00
Jouni Malinen c4668009d0 tests: Remove unnecessary use of sudo from test cases
run-tests.py is running as root, so sudo does not need to be used
anymore from within each test case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-07 15:37:13 +02:00
Jouni Malinen b638f70316 tests: Replace subprocess.call for rm with os.remove()
There is no need to use sudo and external rm to remove files now that
run-tests.py is required to run as root.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-07 15:37:13 +02:00
Ben 1d21a5bee5 tests: Fix ap_wps_per_station_psk to use own_addr()
The test used p2p_dev_addr() that can be different from own_addr()
if a dedicated P2P Device interface is used.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-02-05 13:48:40 +02:00
Jouni Malinen a08fdb17aa tests: EAPOL supplicant invalid frame handling
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-28 13:09:31 +02:00
Jouni Malinen fba25c99a5 tests: Make ap_wps_er_pbc_overlap more robust
Reorder scanning in a way that allows the ER behavior to be more
predictable. The first Probe Request report is for a previously received
frame on the AP and this new sequence avoids leaving either of the PBC
test STAs to be that one.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-23 00:52:56 +02:00
Jouni Malinen e60be3b3d4 tests: WPS registrar learning configuration from WPA+WPA2 AP
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-19 18:39:13 +02:00
Jouni Malinen 81e787b750 tests: Convert test skipping to use exception
Instead of returning "skip" from the test function, raise the new
HwsimSkip exception to indicate a test case was skipped.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-08 22:43:47 +02:00
Jouni Malinen 5f35a5e27f tests: Add wait_connected() and wait_disconnected() helpers
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 13:10:09 +02:00
Jouni Malinen 9d7fdac5b3 tests: Try to clear scan results after regulatory domain changes
It was possible for regulatory domain changes to "leak" into following
test cases in number of cases where the cfg80211 BSS table remained
after regulatory domain had been restored to world roaming. Try to make
this less likely to occur by explicitly clearing BSS table at the end of
test cases that use different regulatory domain. This makes P2P test
cases that verify channel selection based on world roaming rules more
robust.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-15 01:32:01 +02:00
Jouni Malinen be9f156200 tests: Move WPS_ER_STOP from reset() to test cases
This avoids one more cleanup step between most test cases by stopping ER
only in case it was actually used during a test.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen d6b916c9db tests: WPS_ER_PBC error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen 8f8c2fe8b2 tests: WPS ER restart and stop
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen 33d0b1579b tests: Optimize WPS tests by avoiding full scan
A single channel scan just before WPS_REG, WPS_PBC, and WPS_PIN commands
can be used to avoid having to run a full scan. This saves significant
amount of time in the WPS test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:07 +02:00
Jouni Malinen 243dcc4ae4 tests: Add a helper function for clearing scan cache
This makes it more convenient and consistent to clear the cached scan
results from cfg80211 and wpa_supplicant.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-01 12:20:53 +02:00
Jouni Malinen 3c086180c1 tests: Make ap_wps_reg_config_tkip failure log more helpful
The "Not fully connected" report did not clearly identify what went
wrong, so make this more verbose in hope of being able to determine what
happened should this test case fail again.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-27 20:33:35 +02:00
Jouni Malinen 9ed53f5edf tests: Increase WPS connection timeout to make tests more robust
It was possible to hit the 10 second timeout in some test cases under
heavy load (e.g., with large number of VMs running tests in parallel).
These timeouts are not really indicating any real error, so make them
less likely to show up in reports by increasing the connection timeout
to 30 seconds.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-27 20:30:07 +02:00
Jouni Malinen 1531402ee4 tests: WPS with ap_scan=2
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-27 20:19:45 +02:00
Jouni Malinen 72a8e30b96 tests: Allow GCMP to be added into ap_wps_mixed_cred network profile
This is needed in preparation for WPS AES being mapped to enabling both
CCMP and GCMP if the driver supports both ciphers.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-27 16:52:10 +02:00
Jouni Malinen 3f08d1cde8 tests: WPS PBC triggered based on hostapd event
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-12 17:58:04 +03:00
Jouni Malinen e5a79e3f93 tests: WPS while connected
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-09-28 11:03:48 +03:00
Jouni Malinen 321c7f6034 tests: Make ap_wps_er_add_enrollee more robust under load
The scan for WPS-AUTH validation may miss a Probe Response frame if the
hostapd process gets blocked under load, e.g., when testing with
parallel-vm.sh.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-09-27 16:17:17 +03:00