Commit graph

948 commits

Author SHA1 Message Date
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
Javier Lopez 68157c0674 tests: Add test_wpas_mesh test cases
This wpa_supplicant tests include basic tests for:

- Mesh scan
- Mesh group add/remove
- Mesh peer connected/disconnected
- Add/Set/Remove to test mesh mode network
- Open mesh connectivity test
- Secure mesh connectivity test
- no_auto_peer

Signed-off-by: Jason Mobarak <x@jason.mobarak.name>
[no_auto_peer test by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Javier Lopez <jlopex@gmail.com>
2014-11-20 16:31:12 +02:00
Jouni Malinen f6d1c5d9f8 tests: Fix regression in START line total count
The previous changes to enable stdin control broke the previous case of
showing the total number of test cases in the START lines. Fix that by
using a separate variable for the total number of test casess instead of
using length of the list of remaining test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-19 22:02:08 +02:00
Jouni Malinen 41aa4bd739 tests: WEP Shared Key index change without deauth
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-19 17:57:49 +02:00
Jouni Malinen 168d4b097c tests: WEP with non-zero key index
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-19 17:37:54 +02:00
Jouni Malinen 3e473674f7 tests: P2P_FIND continuing after GO Negotiation failure
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-19 16:59:11 +02:00
Jouni Malinen 077f13c3e1 tests: Move parallel-vm.py test control to the host
This allows all VMs to be used at the end of a test sequence by
assigning test cases to VMs based on which VM is available for a new
test case rather than splitting the full task at the beginning and
potentially getting stuck with the last VM running long test cases for
significantly longer than another VM that gets shorter duration tests
assigned to it.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-19 15:20:53 +02:00
Jouni Malinen 0d7456e9fd tests: Add run-tests.py -i to control execution from stdin
The new -i command line argument can be used to control test case
execution from stdin to run-tests.py and vm-run.sh. This can be used,
e.g., to run multiple repeated test sequences in a virtual machine
without havign to restart the VM between each iteration.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-19 15:20:53 +02:00
Jouni Malinen cb8cb33e55 tests: Allow run-tests.py to be run from the vm directory
Some of the paths in run-tests.py are hardcoded and could not handle
tests/hwsim/vm as the working directory. Modify the design enough to
allow ../run-tests.py -L to be used from the vm directory.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-19 15:20:53 +02:00
Jouni Malinen 5e3c0b02a7 tests: Make run-tests.py process test case selection arguments
This allows a list of matching test cases to be produced without having
to run the test cases. Previously, -L output included all defined test
cases regardless of what else was included on the command line.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-19 15:20:52 +02:00
Jouni Malinen 44ac019c96 tests: Report kernel panic clearly in parallel-vm.py
Previously, it was possible for a kernel panic to be missed since the
only sign of it in stdout was reduced number of passed test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-16 22:34:54 +02:00
Jouni Malinen 7e6942253c tests: Use a single timestamp in all vm-run.sh instances
This avoids possible mismatches in directory and log file timestamps if
the UNIX timestamp (seconds) changes during the startup sequence.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-16 22:24:18 +02:00
Eliad Peller 7613345814 tests: Add wpa_supplicant WMM-AC test
Add basic wpa_supplicant tests for WMM-AC TSPEC addition/deletion.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
2014-11-16 21:40:57 +02:00
Jouni Malinen b652daca84 tests: Suite B
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-16 17:09:11 +02:00
Jouni Malinen eec0cc8da2 tests: Clear ignore_old_scan_res setting
This parameter was used in some of the NFC test cases to make scanning
more robust in case of changing AP configuration. However, the parameter
was not cleared anywhere, so it could have been left in use for other
test cases as well. To get more consistent behavior, clear the value
back to its default between test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-15 12:56:02 +02:00
Jouni Malinen 9128f520c3 tests: PMF required with SHA1-based AKM
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-14 20:56:43 +02:00
Jouni Malinen 2a6cce3842 tests: DFS with chanlist
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-01 19:56:44 +02:00
Ilan Peer 006a1c4d3b tests: Make vm-run.sh arguments non-positional
This was currently breaking parallel-run.*, as it was passing
--split num/num parameters (intended for rnu-tests.py)
to vm-run.sh which broke the --codecov and --timewrap options.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2014-11-01 17:55:23 +02:00
Ilan Peer 40c57fa88f tests: Update vm README
Update the code coverage documentation to also specify the
source base directory for the code coverage generation.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2014-11-01 17:08:29 +02:00
Ilan Peer 6e04f41168 tests: Add usage() to run-all.sh
The -h or --help command line arguments can now be used to request usage
information for run-all.sh.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2014-11-01 17:08:29 +02:00
Ilan Peer 5d60296ea7 tests: Add option to build before running all tests
Add an option --build to run-all.sh to build before starting to run all
the tests. In addition, add an option --codecov to extract the code
coverage data at the end of the run.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2014-11-01 17:08:29 +02:00
Ilan Peer a7fe868dae tests: Make run-all.sh arguments non-positional
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2014-11-01 17:08:29 +02:00
Jouni Malinen 96a6c4c098 tests: Concurrent station mode scan and p2p_find with P2P Device
This verifies that station mode interface SCAN command gets executed if
P2P Device instance is running p2p_find.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-31 00:50:01 +02:00
Jouni Malinen 70892f697f tests: P2P_STOP_FIND/P2P_FLUSH to ignore new results
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-31 00:50:01 +02:00
Jouni Malinen 0ee41e866c tests: GO Negotiation and timeout while waiting for peer
grpform_cred_ready_timeout2 is similar to the grpform_cred_ready_timeout
test case with the difference being in initiating a P2P_FIND operation
during the wait.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-29 12:52:51 +02:00
Jouni Malinen 4fb26cee95 tests: Remove ap_ht40_csa and ap_ht40_csa3 workarounds
The issue in mac80211 was identified and proposed fix is now available,
so remove the workaround here and start reporting failures from
unexpected disconnection during CSA.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-28 14:01:16 +02:00
Jouni Malinen 5e29a90079 tests: Scan result update changing last_scan_res and connect_work
This verifies that last_scan_res and connect work pointers to BSS
entries get updated when scan result update ends up removing or
reallocating a BSS entry.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-28 00:43:58 +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
Ilan Peer 3bfa5f10a9 tests: Add support for reading modules list from a file
The new run-tests.py argument "-l <file>" can now be used to specify the
test modules using a text file.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2014-10-26 23:27:26 +02:00
Ilan Peer 6492a9cada tests: Add usage() to build.sh
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2014-10-26 19:21:04 +02:00
Ilan Peer 2593aadb3b tests: Add an option to force copy config files
"./build.sh --force-config" can be used to force copying configuration
files before building. This will overwrite any changes in .config files.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2014-10-26 19:19:39 +02:00
Ilan Peer 102c2bf461 tests: Add an option to build with code coverage
"./build.sh --codecov" can now be used to request CONFIG_CODE_COVERAGE=y
to be added to hostapd and wpa_supplicant .config files.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2014-10-26 19:18:34 +02:00
Jouni Malinen 412d764727 tests: cfg80211 connect command for WEP connection
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-26 17:01:37 +02:00
Jouni Malinen 8619c33420 tests: External bridge control for hostapd interface
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-26 11:29:16 +02:00
Jouni Malinen cded555f06 tests: hostapd rfkill
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-26 10:53:37 +02:00
Jouni Malinen ac69c33297 tests: Print failure exeception if logger output goes to file
This makes it more convenient to determine failure reasons during test
case development and VM testing.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-26 10:39:32 +02:00
Jouni Malinen 9d3d2dbdcb tests: IP address in STATUS
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-26 10:21:48 +02:00
Jouni Malinen 85b60adddd tests: Make ap_ht40_csa and ap_ht40_csa3 less likely to fail
It looks like cfg80211 can trigger disconnection even without disabling
HT, so the same issue may be hit with both of the channel switches in
these test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-25 23:19:48 +03:00
Jouni Malinen 42a4ba2865 tests: Group formation wait for peer with driver increasing ROC duration
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-25 21:46:39 +03:00
Jouni Malinen 99e5f0e616 tests: Channel switch with HT40
ap_ht40_csa and ap_ht40_csa3 seem to show a cfg80211/mac80211 issue
where a CSA from HT40+ to HT40- channel results in HT getting disabled
due to cfg80211_chandef_compatible() check on c1->width == c2->width
claiming that the new channel is not compatible. For now, comment out
the FAIL case for these known issues to avoid constant failure for cases
that are not wpa_supplicant/hostapd issues. Once the kernel side design
has been reviewed, these error cases can be enabled here.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-25 12:09:02 +03:00
Jouni Malinen d4792c0cb7 tests: Channel switch with VHT80
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-25 11:29:28 +03:00
Jouni Malinen bd5a7691bf tests: Radar detection on HT40 channel
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-25 10:52:06 +03:00
Jouni Malinen fbb79f94eb tests: Allow time for go_neg_pbc() GO Neg Resp to go out
It was possible for the not-pre-authorized GO Negotiation case to end up
starting new GO Negotiation before the GO Negotiation Response frame
with status=1 was transmitted. While this works for group formation, it
could reduce test coverage for the common case where that response is
received. At a small sleep to make it less likely for this unexpected
sequence to happen during testing.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-23 16:33:25 +03:00
Johannes Berg 1e3c7e82b5 tests: Disable support_p2p_device by default
When loading the hwsim module, disable support_p2p_device by default.
This will also become the default in the kernel, but until then it
makes sure it's not turned on by default.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-10-22 10:53:52 +03:00
Johannes Berg 5a8d165cd8 tests: Use dynamic radio for P2P_DEVICE tests
Use dynamic radios for P2P_DEVICE tests to be able to test
support when the default in hwsim is to not support it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-10-22 10:53:45 +03:00