Commit graph

1393 commits

Author SHA1 Message Date
Jouni Malinen a783340d04 tests: Skip OpenSSL cipher string tests with other TLS libraries
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-12 00:19:21 +02:00
Jouni Malinen 37d6135507 tests: Increase altsubject_match testing coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-11 00:27:01 +02:00
Jouni Malinen c2096d9981 tests: bssid_blacklist and bssid_whitelist
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-10 17:35:53 +02:00
Jouni Malinen 70437ae55a tests: Drop mesh_ht_mode parameter from mesh test cases
This network profile parameter will be removed with the cleanup that
makes mesh use shared functions for setting channel parameters. That
will allow HT to be enabled automatically based on driver capabilities.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-10 17:35:53 +02:00
Jouni Malinen de1d5049dc tests: Mesh in 5 GHz band
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-10 17:35:53 +02:00
Johannes Berg 2e1d7386e2 tests: Refactor tshark running
Refactor the code to run tshark into its own submodule. This allows
even remembering whether -Y or -R needs to be used for filtering.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-01-10 00:53:57 +02:00
Jouni Malinen 0e126c6dca tests: Out-of-memory cases for D-Bus operations
This increases testing coverage on various error paths.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-09 02:46:26 +02:00
Jouni Malinen 795b6f57a8 tests: Additional D-Bus error path coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-09 02:32:15 +02:00
Jouni Malinen cd9548c02f tests: Add out-of-memory loop tests for hostapd startup
These test cases run hostapd interface setup multiple times with
TEST_ALLOC_FAIL commands triggering memory allocation failures one by
one at each possible location in the setup sequence. Effectively, these
test cases will hit most error paths for memory allocation issue cases
(i.e., only the cases requiring more than one allocation failure in a
sequence are not covered).

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-08 22:43:48 +02:00
Jouni Malinen f7af5a48f4 tests: hostapd BSS addition failures
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-08 22:43:48 +02:00
Jouni Malinen fff95bb614 tests: hostapd interface setup and memory allocation failures
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-08 22:43:48 +02:00
Jouni Malinen f12240a371 tests: Memory allocation failure in wpa_supplicant blacklist
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-08 22:43:48 +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
Johannes Berg 9c8779daf6 tests: Use rfkill python module
Instead of calling the rfkill binary, use the built-in module.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-01-08 20:56:54 +02:00
Johannes Berg bd31b92a68 tests: Add rfkill module
This can be used instead of invoking the rfkill binary.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-01-08 20:56:47 +02:00
Jouni Malinen 6a964b7560 tests: Make scan_random_mac more robust
There is a race condition between wlantest having received and written
the sniffer log and this test case using tshark to process it. Wait one
second before running tshark to make it less likely to get truncated
results that can result in the test case failing.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-07 16:31:22 +02:00
Jouni Malinen 51c5aeb42a tests: Convert "hwsim-SKIP" exception to use a custom class
This makes the design a bit cleaner for catching the exceptions.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-07 16:31:22 +02:00
Jouni Malinen 910eb5b525 tests: Import dbus module in a cleaner way
There is no need to use prepare_dbus() function to check whether the
dbus module can be imported.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-07 13:29:25 +02:00
Jouni Malinen c975e1c1da tests: Additional bgscan coverage
Verify error cases in bgscan module parameters. Increase learn bgscan
module coverage with parsing of the saved data and probe frequency
selection.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-06 02:49:13 +02:00
Jouni Malinen 59be78ef93 tests: Move SHA256 test cases into hwsim framework
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-05 17:34:20 +02:00
Jouni Malinen 4b462a0226 tests: Move SHA1 test cases into hwsim framework
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-05 17:29:00 +02:00
Jouni Malinen 896e1b836f tests: Move MD5 test cases into hwsim framework
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-05 17:12:27 +02:00
Jouni Malinen 88fc0dca98 tests: Move ms_funcs test cases into hwsim framework
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-05 17:05:42 +02:00
Jouni Malinen 1244408401 tests: Move AES key wrap/unwrap test cases into hwsim framework
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-05 16:35:59 +02:00
Jouni Malinen 477f83131f tests: Move AES-CBC test cases into hwsim framework
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-05 16:28:46 +02:00
Jouni Malinen e438fb0d3a tests: Move AES-128 EAX mode test cases into hwsim framework
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-05 16:24:42 +02:00
Jouni Malinen 304d40e904 tests: Move OMAC1-AES test cases into hwsim module tests
This makes sure the test cases are executed automatically with rest of
the hwsim tests.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-05 16:02:08 +02:00
Jouni Malinen 942b75468d tests: Add module tests for AES-SIV
This moves the AES-SIV test case from tests/test-aes.c to be part of
wpa_supplicant module testing framework with a new
src/crypto/crypto_module_tests.c component. In addition, the second test
vector from RFC 5297 is also included for additional coverage.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-05 15:50:53 +02:00
Jouni Malinen 8aeb6e3dbc tests: MAC_RAND_SCAN with valid and invalid arguments
This verifies that random MAC address is used as requested in Probe
Request frames.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-04 23:06:58 +02:00
Jouni Malinen 5434f07c20 tests: TDLS channel switching
Verify correct behavior with invalid commands. In addition, allow minor
mac80211_hwsim modifications to be used to enable testing of the driver
interface to enable and disable channel switching.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-04 21:46:38 +02:00
Eliad Peller 41bf76447b tests: WMM-AC reassociation-to-same-BSS test
Make sure the tspecs are kept on reassociation to the same BSS.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
2015-01-04 18:59:07 +02:00
Eliad Peller bc32f830f4 tests: wmm_ac_status and roaming case with WMM-AC
Make sure the wmm_ac_status command reflects correctly the existing
tspecs after add_ts/del_ts commands. Add a new test to verify all tspecs
are removed on roaming (while FT is not used).

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
2015-01-04 18:57:23 +02:00
Jouni Malinen 750904dd42 tests: Extend EAP key lifetime in memory to cover MSK and EMSK
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-03 15:49:57 +02:00
Jouni Malinen ce8ca2f9a0 tests: Make wpas_mesh_max_peering more robust
The previous version was enabling all three stations at the same time
and left dev[1] and dev[2] competing on getting connected with dev[0]
that allowed only one pairing. This was not exactly robust and the pass
criteria depended on an extra event from either dev[1] or dev[2]. Fix
that by first connecting dev[0] and dev[1] and only after that, start
dev[2]. This allows proper validation of both the peering limit on
dev[0] and no extra event on dev[2].

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-02 22:50:27 +02:00
Jouni Malinen 29bac7cb89 tests: Make scan_hidden more robust under heavy CPU load
It is possible for the Probe Response frame wait to time out when active
scanning is used under heavy CPU load. Make this test case more robust
by trying multiple times before declaring the scan for a hidden SSID to
have failed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-02 22:50:27 +02:00
Jouni Malinen 2ec82e67c1 tests: wpa_supplicant D-Bus interface
This adds new files with test cases to verify both the old and new
wpa_supplicant D-Bus interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-02 22:50:27 +02:00
Jouni Malinen b0839232fa tests: Enable wpa_supplicant D-Bus support for hwsim tests
This allows automated testing of the wpa_supplicant D-Bus interface. The
instance controlling wlan0 registers with D-Bus if dbus-daemon was
started successfully. This is only used in VM testing, i.e., not when
run-tests.sh is used on the host system with D-Bus running for normal
system purposes.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-02 22:50:27 +02:00
Jouni Malinen 5b3c40a65b tests: Verify that wpa_supplicant clears keys from memory
Check that PMK and PTK and not left in memory (heap or stack)
unnecessarily after they are not needed anymore.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-30 10:37:02 +02:00
Jouni Malinen 13113d127c tests: Filter out extra files from codecov reports
wpa_cli and hostapd_cli are not currently tested for code coverage, so
filter the files specific to those components away from the code
coverage reports. *_module_tests.c are not included in normal builds, so
drop them as well. In addition, drop the system header file (byteswap.h)
that gets somehow unnecessarily included in the reports for couple of
lines.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-29 18:27:23 +02:00
Jouni Malinen 7fe84009f8 tests: Reorder build.sh operations
This leaves the build tree with valid wpa_supplicant object files in the
end and makes it a bit easier to do additional custom builds when
needed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-29 15:49:05 +02:00
Jouni Malinen 185275228d tests: Use QUIET=1 option to make build.sh output much shorter
Report only fatal errors when building binaries for hwsim testing.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-29 15:49:05 +02:00
Jouni Malinen 31705bf4fc tests: Skip mesh test cases if kernel does have CONFIG_MAC80211_MESH
Previously, these test cases were marked as failures, but it is nicer to
mark as skipped if the kernel does not include support for mesh.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-29 15:49:05 +02:00
Jouni Malinen e2a8db7785 tests: Report missing erp support more nicely in wpas_ctrl_get_capability
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-29 15:49:05 +02:00
Jouni Malinen 84512f8c9b tests: Support older tshark versions
The -Y command line argument may need to be replaced with -R when an
older tshark version is used.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-29 15:49:05 +02:00
Jouni Malinen 8c6f6ac100 tests: Allow DFS test cases to be skipped
Some of the newer dfs_radar* test cases did not allow hostapd
startup to fail. Since these require relatively recent kernel
support, mark the test cases with skip rather than fail based
on that step failing.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-29 15:49:05 +02:00
Jouni Malinen 752d58c775 tests: Allow SMPS test case to be skipped
ap_ht_smps needs relatively recern kernel support, so allow it to be
skipped rather than claimed as failure, in case hostapd startup fails.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-29 15:49:04 +02:00
Jouni Malinen 6532a84ed3 tests: Fix --codecov cases to find correct wpa_cli/hostapd_cli
It was possible for the separate builds to not include
wpa_cli/hostapd_cli in the default location. Make sure hostapd_cli gets
built for --codecov cases and update both WPACLI and HAPDCLI paths to
match the alternative location.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-29 15:49:04 +02:00
Jouni Malinen de677292d5 tests: Verify that hostapd-as-RADIUS-server started
Large number of test cases will fail if hostapd fails to start as the
RADIUS server. To make this more obvious, verify that the RADIUS server
instance is running and do not even start test execution if the setup if
not work properly.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-26 13:21:00 +02:00
Jouni Malinen ed8a1fa496 tests: Limit number of failed test cases in the curses output
It was possible for the scr.addstr() operations to fail and terminate
parallel-vm.py if the number of failed test cases increased beyond what
fits on the screen.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-26 13:21:00 +02:00
Jouni Malinen c715b31f18 tests: Clear active PBC mode from cfg80211 BSS table in p2p_channel
This reduces number of test combinations in which PBC session overlap
could have been indicated incorrectly.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-25 16:37:12 +02:00
Jouni Malinen dd859e20ac tests: Make p2p_channel test cases more robust
Wait for a CTRL-EVENT-REGDOM-CHANGE even before returning from
set_country() to avoid issues with test operations being executed before
all components have had chance to update their regulatory domain
information. Some of these test cases could fail under heavy load.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-25 16:37:12 +02:00
Jouni Malinen 1f4de34ec1 tests: Maintain test result counters through the run
This avoids having to go through the full output buffer from each
VM for each update during a test run.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-25 16:37:12 +02:00
Jouni Malinen 8041102874 tests: Process VM stdout output in full lines
Merge partial lines together before processing them in parallel-vm.py.
This avoids issues in cases where the stdout read gets split into pieces
that do not include the full READY/PASS/FAIL/SKIP information. In
addition, strip unnecessary whitespace (mainly, '\r') from the log
lines.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-25 16:37:12 +02:00
Jouni Malinen 1942b68172 tests: Disable terminal echo for stdin control (-i)
This makes vm-run.sh output cleaner to parse for parallel-vm.py.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-25 16:37:12 +02:00
Jouni Malinen 2e0d48e5c8 tests: Do not print to stdout during test execution
This cleans up vm-run.sh output and makes information more easily
available from the *.log files.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-25 16:37:12 +02:00
Jouni Malinen d3fb9c1403 tests: Add debug logging for parallel-vm.py
parallel-vm.log is now written with details of test execution steps and
results. This makes it easier to debug if something goes wrong in VM
monitoring. The --debug option can be used to enable verbose debugging.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-25 16:36:51 +02:00
Jouni Malinen 3eb1db0377 tests: Retry failed cases automatically in parallel VM run
parallel-vm.py is now retrying failed cases once at the end of the run.
If all the failed test cases passed on the second attempt, that is noted
in the summary output. Results are also indicated as the exit value from
the run: 0 = all cases passed on first run, 1 = some cases failed once,
but everything passed after one retry, 2 = some cases failed did not
succeed at all.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-23 22:25:29 +02:00
Jouni Malinen a628eeb42b tests: Add more long duration test cases to parallel-vm.py list
This adds the remaining test cases that took more than 15 seconds to run
into the list of test cases to run at the beginning of the execution to
avoid these being left at the end when only some of the VMs may be
running.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-23 20:34:13 +02:00
Jouni Malinen 6d930a1eef tests: Optimize ap_qosmap test cases
Avoid unnecessary DATA_TEST_CONFIG calls and wlantest_cli invocations to
speed up the test cases. This drops ap_qosmap execution time from about
14 seconds to under 3 seconds.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-23 17:46:34 +02:00
Jouni Malinen 4905f1ebfe tests: Optimize multi_check() waits in ap_bss_add* and ap_multi_bss*
There is no need to wait for the longer fixed duration for each STA when
an event message or an earlier wait for another STA can be used instead.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-23 17:20:18 +02:00
Jouni Malinen 610cfff5d7 tests: Make scan_hidden* more robust
Clear cfg80211 BSS table more carefully after the scan_hidden* test
cases. At least scan_hidden_many could have left behind a hidden SSID
entry that could cause problems for following scan_bss_operations test
case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-23 16:15:11 +02:00
Jouni Malinen e0cfd223c0 tests: Fix mesh no_auto_peer=1 test cases to allow enough time for retry
If the initial Authentication frame was too early for the peer (i.e.,
NEW_PEER_CANDIDATE event arrived only after the Authentication frame),
wpas_mesh_open_no_auto and wpas_mesh_secure_no_auto test cases were
failing since they waited only for 10 seconds for the connection to be
completed while the retry timer was set to 10-20 seconds on the
authenticator side.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-23 13:10:22 +02:00
Jouni Malinen 9828b70ebd tests: Fix wpas_ctrl_data_test with Linux 3.19-rc1
The kernel commit 'packet: make packet_snd fail on len smaller than l2
header' started rejecting <= 14 octet raw packet socket transmission.
This test case was testing with 14 ocets and that is now rejected by the
kernel. While this may be a kernel side issue, use one octet longer test
data for now to avoid undesired FAIL cases in hwsim tests.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-23 12:27:14 +02:00
Jouni Malinen b2eb3fe21c tests: Fix ap_ht_40mhz_intolerant_ap
The previous design did not actually break from the wait loop when the
AP changed back to 40 MHz channel and as such, ended up waiting the full
30 second time. Furthermore, the five second delay time for returning
back to 40 MHz was not sufficiently long to test behavior correctly
since the STA did not have any chances of returning the next coex report
before the AP had returned to 40 MHz. Increase the AP wait time to 15
seconds so that the once per 10 seconds OBSS scan from the STA gets in
before changing back to 40 MHz channel (after the 40 MHz intolerant AP
gets disabled).

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-22 22:07:54 +02:00
Jouni Malinen 6ac593ec47 tests: Optimize run-tests.py test case dict iteration
Use a single iteration through the module dictionary rather than
iterating over the keys and separately fetching values to get the
function.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-22 20:08:11 +02:00
Jouni Malinen 4cfe369b98 tests: Optimize stop.sh wait times
There is no need to wait for fixed 0.5 seconds for the processes to
exit.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-22 19:37:08 +02:00
Jouni Malinen b350009f8c tests: Optimize start.sh execution time
There is no need to wait for one extra second to chown log files when
running as root which is always the case in VM execution.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-22 19:22:42 +02:00
Jouni Malinen a69d0cdc72 tests: Merge grpform_cred_ready_timeout test cases into a single one
These test cases had a long 120 seconds wait for the GO Negotiation
initiator to time out. This can be done using two devices in parallel to
save two minutes from total test execution time.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-22 15:54:30 +02:00
Jouni Malinen 9be2b811d4 tests: Mesh max peering limit
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-22 11:53:02 +02:00
Jouni Malinen 4b9481bcd8 tests: Remove unnecessary wrap_wpas_mesh_test() complexity
This function did not seem to do anything else apart from making it less
obvious that hwsim_utils.test_connectivity() is called.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-22 11:52:54 +02:00
Jouni Malinen 8b2600329f tests: Mesh beacon_int parameter
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-21 23:45:29 +02:00
Jouni Malinen 5554fbef46 tests: Make parallel VM start a bit more resource friendly
Wait one second between each kvm start to avoid hitting large number of
processes trying to start in parallel. This allows the VMs to be started
more efficiently for parallel-vm.py runs with large number of VMs.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-21 22:04:54 +02:00
Jouni Malinen b3f4134912 tests: Clear cfg80211 BSS table at the end of scan_hidden
It was possible for the hidden SSID entry to leak into following test
cases and result in failures, e.g., in this sequence:

scan_hidden
scan_reqs_with_non_scan_radio_work
radius_auth_unreachable
wep_open_auth

BSS <BSSID> picked incorrect BSS entry within wpa_supplicant due to the
old zero-length SSID showing up from the earlier hidden SSID case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-21 21:58:47 +02:00
Jouni Malinen 2ffbf34db0 tests: Optimize test case execution order for multiple VMs
Move test cases with long duration to the beginning as an optimization
to avoid last part of the test execution running a long duration test
case on a single VM while all other VMs have already completed their
work.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-21 18:20:15 +02:00
Jouni Malinen 01c87519a3 tests: Do not mark proxyarp_open failed if ebtables is not available
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-21 17:14:00 +02:00
Jouni Malinen f24489d94f tests: Use new scripts for vm-run.sh codecov
Now there is only one set of commands to maintain. The separate reports
for individual components have not been of much use in the past, so they
are dropped for now.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-21 16:41:59 +02:00
Jouni Malinen cb0555f7be tests: EAP-IKEv2 protocol tests
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-21 16:16:26 +02:00
Jouni Malinen f41f670ea5 tests: ERP with EAP-IKEv2
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 23:48:53 +02:00
Jouni Malinen f1381f99e4 tests: Mesh ht_mode options
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 21:27:22 +02:00
Jouni Malinen f86868c253 tests: wdev_id in STATUS-DRIVER
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 21:18:26 +02:00
Jouni Malinen 542452a93d tests: hostapd behavior with interface in different bridge
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 21:01:31 +02:00
Jouni Malinen a42f88f8e7 tests: bg_scan_period parameter configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 19:44:40 +02:00
Jouni Malinen 6343f24d35 tests: IBSS cfg80211 workarounds
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 19:36:41 +02:00
Jouni Malinen cece9b7df7 tests: Dynamic BSS add operation reusing existing interface
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 19:04:18 +02:00
Jouni Malinen 8916857da6 tests: TDLS with VHT
This adds some more coverage, but the TDLS setup is not for VHT due to
missing support in mac80211.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 18:44:48 +02:00
Jouni Malinen 4466fe6541 tests: VHT and 40 MHz channel
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 18:44:48 +02:00
Jouni Malinen d4d80e9a14 tests: SMPS AP configuration options
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 18:44:48 +02:00
Jouni Malinen 598555c7e8 tests: IEEE 802.1X with static WEP
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 18:44:48 +02:00
Jouni Malinen 1e7528298a tests: cfg80211 scan-for-auth workaround with WEP keys
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 17:28:53 +02:00
Jouni Malinen a5687274e1 tests: cfg80211 scan-for-auth workaround failing
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 17:22:18 +02:00
Jouni Malinen b97a7bf672 tests: Large number of BSS add operations with hostapd
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 17:13:00 +02:00
Jouni Malinen 863a54093d tests: rfkill block prior to wpa_supplicant start
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 16:46:39 +02:00
Jouni Malinen d92da8a23e tests: Radar detection on non-HT and on HT40- channels
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 13:50:19 +02:00
Jouni Malinen cac5526390 tests: Report ROAM failure in pmksa_cache_opportunistic_multiple_sta
There is no need to wait for the timeout if the ROAM command itself
failed. This could happen if an earlier test case had left hidden SSIDs
in the cfg80211 BSS table.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 13:37:08 +02:00
Jouni Malinen 1264b68355 tests: Clear cfg80211 scan results after wext_hidden
Leaving hidden SSIDs in the cfg80211 BSS table can result in errors in
the following test cases, so use special care to clear all BSS entries
at the end of the wext_hidden test case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 13:36:01 +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 e0cccf26a4 tests: Add --codecov support to parallel-vm.py
This allows code coverage report to be generated must faster with the
help of parallel VMs executing test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 01:24:28 +02:00
Jouni Malinen 42ce1a27e0 tests: Connection with large number of scan_ssid=1 network blocks
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-19 23:30:58 +02:00
Jouni Malinen ed930f064c tests: P2P_LISTEN and scan
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-19 23:17:06 +02:00
Jouni Malinen 558ac77c58 tests: setband and scans
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-19 23:08:10 +02:00
Jouni Malinen 7749b1c982 tests: Additional coverage for filter_ssids=1
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-19 20:26:07 +02:00
Jouni Malinen 91cc6f918a tests: AP_SCAN 2 operation
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-19 20:08:58 +02:00
Jouni Malinen 83e80d32f1 tests: SCAN requests while in non-scan radio work
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-19 15:23:07 +02:00
Jouni Malinen 7c5c1ba7b4 tests: P2P_LISTEN behavior with offchannel TX
This verifies that offchannel TX (PD in this specific case) does not
stop ongoing long P2P_LISTEN operation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen 89cd4355bb tests: Fix proxyarp_open IPv4-from-bridge
There were couple of typos in the IP addresses and there was no coverage
for the normal unicast ARP response from the bridge (since non-wireless
device does not get proxied by the AP). In addition, it is better to
change the IP address used here to be unique to make the sniffer logs
easier to interpret.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-18 16:41:40 +02:00
Jouni Malinen 6d5332948c tests: Use send_ns() helper for the earlier proxyarp_open NS packets
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen 40e4c9c8b0 tests: Add traffic test to proxyarp_open
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen 5a3ce80265 tests: ProxyARP behavior with IPv6 frames
This adds transmission of number of NS/NA frames to test ProxyARP
behavior. The actual validation of the AP behavior is still manual,
i.e., a separate inspectation of the capture files is needed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen 19cbe06238 tests: Add ebtables rules for ProxyARP
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen a95c6973aa tests: Use non-promiscuous mode and packet-buffered tcpdump capture
This helps in avoiding truncated capture files in the proxyarp_open test
case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen 1d0b5a04e6 tests: Dump monitor messages before hwsim_utils test
This may be needed in some corner cases where broadcast frames with two
associated stations are received by both devices.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen db1d66d879 tests: Fix wifi_display_persistent_group event checks
The final invitation case in this test was verified incorrectly. The GO
was already operatign in that case, so there was not supposed to be a
new P2P-GROUP-STARTED message from GO. That happened to be show up in
the pending event messages from the last instance, but that was just by
accident and any additional dump_monitor() operation added here would
cause this test to fail. Fix this by handling the final invitation
separately and verifying that only the client side indicates
P2P-GROUP-STARTED.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen c8836a4f03 tests: Allow dump_monitor() to be used without global monitor interface
It is possible for WpaSupplicant instance to be used without the global
control socket, so allow dump_monitor() to handle this case cleanly.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:01:41 +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 970a23f665 tests: Make flush_scan_cache() more robust
It was possible for BSS entries on the scanned channel (2412 MHz) to be
left behind after flush_scan_cache() call. Use a less likely channel
2417 MHz as the default channel to scan. This will hopefully get rid of
most problematic BSS entries from previous test cases. For example,
ap_hs20_oen followed by ap_hs20_random_mac could fail due to
INTERWORKING_CONNECT seeing non-RSN scan result from the previous test
case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-15 01:13:03 +02:00
Jouni Malinen d48b64ba6c tests: Use helper function for adding open mesh network
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 23:34:43 +02:00
Jouni Malinen 7e3614df5c tests: Mesh with dynamic interface
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 23:28:36 +02:00
Jouni Malinen 5881873b86 tests: Make pmksa_cache_opportunistic_connect more robust
Use scan_for_bss() instead of scan(freq) to avoid false positives due to
active scan failing under heavy load.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 19:15:48 +02:00
Jouni Malinen acb63c753b tests: SAE with missing password
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 17:09:14 +02:00
Jouni Malinen 0e40d7daa4 tests: ERP when server has dropped the keys
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 15:47:04 +02:00
Jouni Malinen 777bbe7a3c tests: P2P_PRESENCE_REQ on group interface
This ends up using the special offchannel.c code path where a different
interface is selected for TX. In addition, the P2P-PRESENCE-RESPONSE
event is verified to be delivered on the group interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 15:47:04 +02:00
Jouni Malinen 11ace2ed1f tests: Mesh and missing SAE password
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 15:47:04 +02:00
Jouni Malinen fba65f7240 tests: Mesh BSS data
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 12:55:43 +02:00
Jouni Malinen 54cacef5eb tests: Mesh sae_groups configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 12:55:40 +02:00
Jouni Malinen e9026725f7 tests: Extra coverage for command line arguments
The results for these are not currently verified, but this allows
--codecov runs to get more coverage for the command line argument
parsers.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 12:24:15 +02:00
Jouni Malinen e869f812d3 tests: DEAUTHENTICATE/DISASSCIATE/CHAN_SWITCH error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen 69f9912310 tests: Additional FETCH_OSU and CANCEL_FETCH_OSU coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen ea27f66292 tests: STOP_FETCH_ANQP
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen 1eaeb7fbaa tests: P2P_UNAUTHORIZE to unauthorize a peer
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen 909f13cc52 tests: Move 'SET pmf 0' from reset() to test cases
This avoids one more cleanup step between most test cases by clearing
the default PMF behavior change only in case it was actually modified
during a test.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +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 b37dac50a2 tests: wpa_supplicant AP mode and PBC session overlap
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:02 +02:00
Jouni Malinen 6eae42f98f tests: Additional coverage for miscellaneous ctrl_iface commands
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:02 +02:00
Jouni Malinen 70d29ec946 tests: Extend RRM neighbor request testing
This uses a new testing mode in hostapd to allow RRM neighbor request
transmittion to be tested. For the second part of the test case to be
executed, mac80211_hwsim needs to be modified to claim support for the
required RRM capabilities (that change is not yet in Linux kernel).

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 21:09:32 +02:00
Jouni Malinen 357edd386f tests: Additional VENDOR_ELEM coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 20:12:24 +02:00
Jouni Malinen d655bbc797 tests: DATA_TEST_* error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 19:33:54 +02:00
Jouni Malinen b854d3c85d tests: EAPOL_RX failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 19:16:34 +02:00
Jouni Malinen f157078c13 tests: DRIVER_EVENT failure case
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 19:08:24 +02:00
Jouni Malinen 3d9848967a tests: Additional MGMT_TX coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 19:05:00 +02:00
Jouni Malinen cbdfff0a73 tests: A single BSS with multiple key management options
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-12 14:05:43 +02:00
Jouni Malinen 9446f3c253 tests: SCAN error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 01:13:35 +02:00
Jouni Malinen 530b519f78 tests: RADIO_WORK error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 00:27:06 +02:00
Jouni Malinen 9c1be553c8 tests: Invalid VENDOR command
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 00:10:52 +02:00
Jouni Malinen c2bf6d3afc tests: SIGNAL_POLL in 160 and 80+80 MHz channels
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 23:37:02 +02:00
Jouni Malinen f8423317b3 tests: WNM_SLEEP error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 23:03:10 +02:00
Jouni Malinen 08ba008c62 tests: AUTOSCAN reconfiguration while in SCANNING state
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 22:57:36 +02:00
Jouni Malinen 44c41cdf47 tests: Additional HS20_ICON_REQUEST coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 16:14:24 +02:00
Jouni Malinen ea215c54d0 tests: Additional coverage for HS20_GET_NAI_HOME_REALM_LIST
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 16:12:59 +02:00
Jouni Malinen 5e80b502ee tests: Additiona GAS_REQUEST/GAS_RESPONSE_GET coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen 1ca6d13dac tests: Make wep_open_auth less likely to fail due to old scan entry
Flush cfg80211 cached scan results to avoid getting any non-WEP matches
for the BSS.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-11 15:18:11 +02:00
Jouni Malinen ea68ed56b9 tests: Additional ANQP_GET and HS20_ANQP_GET error coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen 7e71fbc169 tests: INTERWORKING_CONNECT with invalid parameter
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen c62438b822 tests: Optimize p2p_persistent test cases
Number of unnecessary scan iterations can removed from these test cases
by specifying a single channel.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen c93b6706d2 tests: Additional P2P_REMOVE_CLIENT coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen 7387532549 tests: Additional coverage for P2P_EXT_LISTEN
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen bf1b59731a tests: Additional P2P_PRESENCE_REQ coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen d9f3bb1ad6 tests: ProxyARP ARP processing
This verifies processing of various ARP messages at an AP that enables
ProxyARP. All the validation steps have not yet been scripted, i.e., the
sniffer traces need manual analysis for full coverage.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-11 15:18:11 +02:00
Jouni Malinen 1872c52b8e tests: Additional P2P_SET coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen 25057d9227 tests: P2P cross connection
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen 7b7b201785 tests: Additional P2P_PEER coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-10 00:46:11 +02:00
Jouni Malinen 2fc4749c91 tests: Verify that EAP-FAST PAC and TLS session ticket was used
This provides a regression test that would have caught the recent
issue with tls_openssl.c change breaking EAP-FAST.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-09 23:47:47 +02:00
Jouni Malinen bccbd51a80 tests: Additional P2P_GROUP_ADD coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-09 23:03:27 +02:00
Jouni Malinen 1ede3d2268 tests: Invitation Request retry and duplicated response
This verifies that the corner case of a duplicated, retransmitted
Invitation Response frame ends up being dropped instead of being
processed twice for the case of Invitation Request getting resend with
social channel as an operating channel in case of no common channels
found.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-09 16:26:54 +02:00
Jouni Malinen c703a1da70 tests: Additional P2P SD coverage
This adds P2P_SERV_DISC_REQ, P2P_SERVICE_ADD, and P2P_SERVICE_DEL error
cases and P2P_SERVICE_FLUSH and P2P_SERC_DISC_EXTERNAL testing.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:23:24 +02:00
Jouni Malinen dd15d44884 tests: P2P_GET_PASSPHRASE in P2P Client mode
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:15:26 +02:00
Jouni Malinen e22335e5db tests: Invalid P2P_INVITE parameters
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:15:26 +02:00
Jouni Malinen edd1dfb2bd tests: Invalid P2P_REJECT command
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:15:26 +02:00
Jouni Malinen ca9b78add8 tests: Additional coverage for P2P_PROV_DISC
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:13:17 +02:00
Jouni Malinen 6da4a0af92 tests: P2P_LISTEN while interface is disabled
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:13:17 +02:00
Jouni Malinen 450e584f04 tests: Additional P2P_CONNECT coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 18:21:48 +02:00
Jouni Malinen 7457c63538 tests: Additional P2P_FIND parameter coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 17:56:47 +02:00
Jouni Malinen 5b2f1e2456 tests: Additional BSS and BSS_FLUSH ctrl_iface command coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 17:49:39 +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 934d5b0403 tests: P2P_GET_PASSPHRASE
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:07 +02:00
Jouni Malinen a5c43328d9 tests: Additional GET_CAPABILITY coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:07 +02:00
Jouni Malinen 80cb463463 tests: SAVE_CONFIG error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:07 +02:00
Jouni Malinen 76b7694177 tests: Multiple networks and cred removal
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:07 +02:00
Jouni Malinen 8c020b0f05 tests: Additional DUP_NETWORK coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:07 +02:00
Jouni Malinen 146374019a tests: Add missing test descriptions
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:06 +02:00
Jouni Malinen 5e2a8ec9e7 tests: wpa_supplicant ctrl_iface mesh command error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:06 +02:00
Jouni Malinen d463c5566f tests: Additional coverage for SCAN_RESULTS and BSS entry flags
This increases wpa_supplicant_ie_txt(), print_bss_info(), and
wpa_supplicant_ctrl_iface_scan_result() testing coverage to include the
previously missing key management options.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:06 +02:00
Jouni Malinen feb795d6d3 tests: wpa_supplicant ctrl_iface BSSID command error case
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:07:56 +02:00
Jouni Malinen 061c55a232 tests: Check STATUS mode field during P2P group formation
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:07:56 +02:00
Jouni Malinen 67966089a6 tests: wpa_supplicant ctrl_iface CTRL-RSP-
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:07:56 +02:00
Jouni Malinen ed685e43ab tests: IBSS_RSN control interface command
This verifies that IBSS_RSN <peer> return OK for the case where a valid
and already connection peer address is given.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:07:56 +02:00
Jouni Malinen 8e33f9c67f tests: wpa_supplicant WPS_AP_PIN random PIN timeout and error caes
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:07:56 +02:00
Jouni Malinen 1490eff500 tests: More coverage for WPS NFC error and uncommon cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:07:56 +02:00
Jouni Malinen e946c8e682 tests: Fix a typo in an error message
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:07:56 +02:00
Jouni Malinen b54f697019 tests: Remove test names from VM command with parallel-vm.py
There is no need to pass the test case names to the VMs when using
parallel-vm.py. Removing those from the command line helps in avoiding
kernel panic if maximum number of kernel parameters limit is hit.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-07 15:33:22 +02:00
Jouni Malinen 2f816c212c tests: Optimize FT test cases
Use single channel scan instead of full scan to save time. In addition,
use EAP-GPSK which takes significantly less CPU that EAP-EKE with
default parameters.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 17:12:30 +02:00
Jouni Malinen c337d07a1b tests: FT_DS with unknown target
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 17:05:46 +02:00
Jouni Malinen 7fd5fd03ac tests: TDLS teardown using wildcard address
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 16:56:14 +02:00
Jouni Malinen e61f90875b tests: Disabling WNM keep-alive and hostapd doing client poll
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 16:51:21 +02:00
Jouni Malinen 19ef208640 tests: wpa_supplicant ctrl_iface SET operations
This adds more test coverage for wpa_supplicant SET ctrl_iface command.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 16:29:08 +02:00
Jouni Malinen 556408940e tests: SET disallow_aps in P2P GO mode
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 16:21:10 +02:00
Jouni Malinen c1e33588b8 tests: Optimize WFD connect_cli() calls
There is no need to run full scan in these test cases, so use single
channel scan to save time.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 15:47:21 +02:00
Jouni Malinen f8fee78879 tests: WFD_SUBELEM_SET/GET with all parameter
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 15:47:20 +02:00
Jouni Malinen ceb767d501 tests: More coverage for WMM-AC
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 14:08:24 +02:00
Jouni Malinen acc9a635c8 tests: EAP Re-authentication Protocol (ERP)
This tests RP EAP-Initiate/Re-auth-Start transmission, ERP key
derivation, and EAP-Initiate/Re-auth + EAP-Finish/Re-auth exchange and
rMSK derivation.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-04 12:16:29 +02:00
Jouni Malinen 8201054da6 tests: Huge number of network blocks and LIST_NETWORKS LAST_ID
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-02 23:47:34 +02:00
Jouni Malinen c7f35a9e96 tests: Make scan_for_auth more robust
It was apparently possible for this test case not to do what it was
supposed to do, i.e., get nl80211 Authenticate command failing due to
cfg80211 BS entry missing. With the external radio work blocking fixed,
this can be cleaned up by explicitly waiting for the scan event. In
addition, a less used channel can be selected to avoid finding other BSS
entries.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-01 20:17:08 +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 6ef319f4ea tests: AddressSanitizer (ASan) build options
Add example build options that can be used to enable ASan for hwsim test
cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-30 15:53:11 +02:00
Jouni Malinen faa907389b tests: Stop connection at the end of monitor_iface_unknown_sta
Do not leave the station trying to connect at the end of the test case
since that can have an effect to the following test case. Such sequences
should be tested in test cases that are specifically designed for that
rather than randomly between test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-30 15:53:11 +02:00
Jouni Malinen ee27f6737b tests: Increase WEXT coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-30 01:05:44 +02:00
Jouni Malinen dc4c3dc4a2 tests: Simplify Michael MIC test file writing
Since run-tests.py is now required to run as root, there is no need to
use the somewhat awkward "sudo tee" construction; instead, just write
directly to the file.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-30 01:05:39 +02:00
Jouni Malinen ae13ad6413 tests: Make go_neg_with_bss_on_disallowed_chan more robust
Clear scan results to avoid PBC overlap issues caused by earlier test
cases. For example, go_neg_with_bss_connected followed by
go_neg_with_bss_on_disallowed_chan resulted in failure before this
change.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-29 15:22:43 +02:00
Jouni Malinen 8969bad521 tests: Monitor interface with hostapd
This increases testing coverage for nl80211 AP mode with monitor
interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-29 13:33:50 +02:00
Jouni Malinen 73a2f82887 tests: Increase retry limit and timeout for wpas_mesh_open_no_auto
This test case was failing every now and then due to dev1
(no_auto_peer=1) not receiving the new-peer-candidate event in time
before dev0 has already stopped retries on mesh peering open message.
This sounds somewhat expected with the default 4 * 40 ms = 160 ms
retries and 1000 TU beacon interval. Use maximum timeout 16 * 255 ms =
4080 ms to make this test case less likely to fail.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 23:02:30 +02:00
Jouni Malinen d9fee38658 tests: P2P invitation resend on no-common-channels
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 23:02:30 +02:00
Jouni Malinen cff6eed75b tests: Re-enable wext_open
driver_wext.c is again able to configure open network, so re-enable the
test case for it.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 23:02:30 +02:00
Johannes Berg b67cdbc162 tests: Allow wext in configuration
Both the wpa_supplicant and kernel configuration need wext to
run the wext testcase, enable those in the default/example
configurations.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-11-28 23:02:29 +02:00
Jouni Malinen ee3f9f3837 tests: Optimize autogo test cases by removing unnecessary scans
Keep full channel scans in autogo for test coverage, but use single
channel scan in all other autogo* test cases to remove unnecessary
waiting that does not add any test coverage. This removes more than one
minute from the total test execution time.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 23:02:29 +02:00
Jouni Malinen 5a631ad2c2 tests: Optimize ap_open_unexpected_assoc_event
Replace fixed sleep with waiting for a disconnection event. In addition,
remove unnecessary use of sudo.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 23:02:29 +02:00
Jouni Malinen 2005cb87e5 tests: Hide unnecessary wlantest_cli output
Unnecessary and confusing "OK" output from wlantest_cli got sent to
stdout.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 23:02:29 +02:00
Jouni Malinen e4d7b5134e tests: Move hessid and access_network_type reset to test case
This removes unnecessary reset() steps from between every test case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 23:02:29 +02:00
Jouni Malinen 47dcb1186f tests: Move external_sim reset to test cases that change this
This removes unnecessary reset() step from between every test case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 23:02:29 +02:00
Jouni Malinen a0559aa5ba tests: Make go_neg_forced_freq_diff_than_bss_freq more robust
It was possible for this test case to fail due to PBC overlap that was
detected based on previous test case having used PBC. Make that false
positive less likely to happen by explicitly clearing the scan cache on
the device.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 23:02:29 +02:00
Jouni Malinen 6ea5e19898 tests: Fix p2p_channel_random_social_with_op_class_change cleanup
p2p_oper_reg_class and p2p_oper_channel need to be restored to 0, not an
arbitrary 2.4 GHz channel to avoid issues for following test cases. For
example, p2p_channel_random_social_with_op_class_change followed by
p2p_autogo_pref_chan_not_in_regulatory ended up with the latter test
case failing.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 23:02:29 +02:00
Jouni Malinen 4b57af2aaa tests: Remove duplicated connectivity test from mesh
hwsim_utils.test_connectivity() is already bidirectional test, so there
is no need to run it twice with the devices swapped for the second
iteration.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 23:02:29 +02:00
Jouni Malinen 882f894831 tests: Make hidden SSID test cases more robust
Clear wpa_supplicant and cfg80211 scan results at the end of hidden SSID
test cases to avoid potential issues for following test cases. For
example, ap_hs20_session_info could fail if executed immediately after
ssid_hidden due to the AP configuration change from open to RSN was not
noticed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 23:02:29 +02:00
Jouni Malinen a712282bc1 tests: proxyarp with DHCP snooping
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 23:02:29 +02:00
Jouni Malinen 356a497d39 tests: ProxyARP with DGAF disabled and multicast-to-unicast conversion
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 22:41:26 +02:00
Jouni Malinen 67aeee118a tests: Convert proxyarp tests to use DATA_TEST_FRAME
This is more robust and extensible than configuring IPv6 addresses on
the interfaces and trying to use ping6 or some other external tools to
generate suitable IPv6 frames.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 20:00:14 +02:00
Jouni Malinen 54fe526ac4 tests: Make p2p_messages tests more robust under load
The 50 ms wait time for Action frame response was not sufficient when
the tests are run under heavy load (e.g., multiple VMs in parallel).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-27 21:44:01 +02:00
Jouni Malinen 0e02a557d3 tests: Make p2p_msg_invitation_req_to_go more robust
Wait for GO to start before sending invitation frames in the protocol
test. Without this, it was possible to hit the 5 second timeout on
management frame RX under load.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-27 21:22:31 +02:00
Jouni Malinen 4d7cc3961f tests: Make go_neg_with_bss_connected more robust
It was possible for this test case to fail due to PBC overlap that was
detected based on previous test case having used PBC. Make that false
positive less likely to happen by explicitly clearing the scan cache on
the devices.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-27 21:06:18 +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
Johannes Berg 6bb9d861f9 tests: Ignore status responses without =
There are valid status (and possibly status-driver) responses
that don't have a name=value format, ignore those in the test
framework parser.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-11-27 20:15:51 +02:00
Jouni Malinen 9363f5e065 tests: Optimize run-tests.py --prefill-tests startup time
It took significant part of the startup latency to prefill the database
with test cases due to the SQL COMMIT operation between each added row.
Move COMMIT to outside the loop to speed startup significantly.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-27 20:08:15 +02:00
Jouni Malinen 499c5e9dc6 tests: Follow test sequence from run-tests.py command line
It can be useful to specify an exact order of test cases and also to
allow the same test case to be run multiple times when the list of tests
is provided on the command line.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-27 19:48:41 +02:00
Johannes Berg 7ee6ec7aec tests: Create new radios for MCC tests
For tests that require a radio with multi-channel concurrency,
create a new one on the fly that does have more than 1 channel.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-11-27 18:25:25 +02:00
Johannes Berg 788dc17f8c tests: Use tshark -Y instead of tshark -R
Newer versions of tshark don't like the -R (read filter) argument
for filtering and just show a deprecation warning. Use -Y (display
filter) instead, which hopefully also works on older versions.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-11-27 18:24:26 +02:00
Jouni Malinen 1131a1c8d2 tests: Replace last remaining hwsim_test uses with DATA_TEST
External tool is not needed anymore to run the data connectivity tests
since hostapd test mode now allows the possible bridge or VLAN interface
to be specified.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-27 14:09:07 +02:00
Jouni Malinen 5f7b07de91 tests: ProxyARP
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-26 01:37:54 +02:00
Jouni Malinen 17ffdf3951 tests: Clear sae_groups to default value in forgotten cases
It was possible for some of the SAE test cases (e.g., ap_ft_sae) to fail
if they were run after the sae_groups test case that left the SAE group
configuration to a value that is not enabled by default. Fix this by
clearing sae_groups setting in the couple of test cases that were not
yet doing this.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-25 15:19:19 +02:00
Jouni Malinen 7c8f5ea6a0 tests: WPA2-PSK with RADIUS for passphrase
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-25 01:28:34 +02:00
Jouni Malinen df4733dff9 tests: WNM BSS TM Req with non-global operating class table
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-24 10:58:33 +02:00
Jouni Malinen 986ed3a9ca tests: NEIGHBOR_REP_REQUEST failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-22 21:49:45 +02:00
Jouni Malinen 13f8d51e2d tests: BSS Transition Management
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-22 20:17:47 +02:00
Jouni Malinen 73360424d9 tests: Fix a typo in function name
except_ack() was supposed to be verifying that the frame was ACK'ed,
i.e., it was really supposed to be called expect_ack().

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-22 18:40:03 +02:00
Jouni Malinen ab4ee34306 tests: Fix wnm_bss_tm_req status code expectation
The implementation of WNM BSS transition management was extended to be
able to return a reject status code based on whether a matching entry is
found. The test case wnm_bss_tm_req was trying to enforce a different
status code to be used here based on old implementation.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-22 18:40:03 +02:00
Jouni Malinen 64d04af5cc tests: Authenticator processing for various EAPOL-Key key info values
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-22 00:49:25 +02:00
Jouni Malinen a52fd1c338 tests: WPA EAPOL 4-way handshake protocol testing
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-22 00:34:20 +02:00
Jouni Malinen 53b9bedb7a tests: WPA2 EAPOL-Key with incorrect type
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-22 00:16:41 +02:00
Jouni Malinen 821490f55f tests: Authenticator 4-way handshake protocol testing
This implements minimal RSN 4-way handshake Supplicant in Python and
uses that to test hostapd Authenticator implementation in various
possible protocol sequencies.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-21 20:50:41 +02:00
Jason Mobarak f54b926baa tests: Mesh HT mode
Change the mesh tests to check for the presence of HT in the scan
results.

[original implementation by Chun-Yeow Yeoh <yeohchunyeow@gmail.com>]
[some fixes by Masashi Honma <masashi.honma@gmail.com>]
Signed-off-by: Ashok Nagarajan <ashok.dragon@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Jason Mobarak <x@jason.mobarak.name>
2014-11-20 17:01:43 +02:00