Commit graph

915 commits

Author SHA1 Message Date
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
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