Commit graph

1368 commits

Author SHA1 Message Date
Jouni Malinen
eb9c155498 tests: P2P autonomous GO and many clients (P2P IE fragmentation)
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-14 10:58:17 +02:00
Jouni Malinen
d0cd00de6f tests: Verify wpa_supplicant AP mode events
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-14 10:14:47 +02:00
Jouni Malinen
f584b5a196 tests: Document dependency on python-crypto
Crypto.Cipher module is now needed to be able to run the 4-way handshake
protocol tests.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-07 23:47:02 +02:00
Jouni Malinen
e0c46c8e44 tests: Protocol testing for EAPOL-Key supplicant processing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-07 17:18:33 +02:00
Jouni Malinen
0860b2199f tests: Make ap_acs_40mhz more robust
Explicitly clear cached scan results on the AP interface before starting
ACS. This avoids issues where conflicting BSS entries from previously
executed test cases could affect channel selection.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-07 17:02:40 +02:00
Jouni Malinen
68baa82cd2 tests: Add --short option for parallel-vm.py
This can be used to filter out test cases that take significantly longer
time to execute (15 seconds or longer). While this reduces testing
coverage, this can be useful to get a pretty quick coverage in
significantly faster time.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-07 12:23:39 +02:00
Johannes Berg
d2002f8334 tests: Allow running with arbitrary working directory
It's somewhat annoying that you can only run parallel-vm.py as
./parallel-vm.py, not from elsewhere by giving the full path,
so fix that by resolving the paths correctly in the scripts where
needed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-03-07 12:23:07 +02:00
Johannes Berg
4f06261bd9 tests: parallel-vm.py: Use argparse module
Instead of hand-writing a (positional) parser, use the argparse module.
This also gets us nice help output.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-03-07 12:23:04 +02:00
Jouni Malinen
4e979d9de6 tests: Make ap_remove_during_acs* more robust
These test cases need to use the previous-AP-on-correct-band workaround
similarly to test_ap_acs.py test cases for now to work with
mac80211_hwsim limitations on channel survey.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-07 00:00:08 +02:00
Jouni Malinen
d970337da7 tests: Make suite_b* test cases more robust
Explicitly clear the cfg80211 BSS cache at the beginning of these test
cases to avoid matching BSS flags against incorrect AP.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-06 23:18:46 +02:00
Jouni Malinen
45de328602 tests: More thorough cache clearing in ap_hs20_hidden_ssid_in_scan_res
It looked like cfg80211 BSS entry for the zero-length SSID could remain
after this test case. Stop the AP and scan twice with flush-cache option
to make this less likely to occur and cause issues to following test
cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-06 23:17:12 +02:00
Jouni Malinen
9cc223c2f5 tests: Make offchannel_tx_roc_gas more robust
It was possible for this test case to fail if cfg80211 BSS cache
included an entry for the same BSSID on another channel from an earlier
test case. Fix this by epxlicitly flushing the cache. In addition, use
scan_for_bss() to make the test less likely to fail in case of heavy CPU
load.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-03-06 17:03:06 +02: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
50c3825c6d tests: DFS with wpa_supplicant AP mode
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-03-05 17:25:16 +02:00
Jouni Malinen
19ec6070ff tests: Fix workaround for limited channel survey in mac80211_hwsim
The way the current channel survey is implemented in mac80211_hwsim
requires for the ACS test cases to be run immediately after the same
radio has been on the expected operating band. This was worked around in
one of the test cases and errors ignored in couple. Extend this
workaround to cover all the test cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-03-03 16:01:52 +02:00
Jouni Malinen
9416e47f47 tests: Fix ap_vlan_wpa2_radius_id_change exception
This was supposed to be Exception("string") not "string".

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-03-03 15:40:19 +02:00
Johannes Berg
cba262e39b tests: Fix python typo
Clearly that should spell Exception.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-03-03 15:38:01 +02:00
Jouni Malinen
00c35673fd tests: Allow --shuffle-tests to be used with parallel-vm.py
This can be used to get more random sequence of test case execution
into use when running multiple VMs.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-03 09:47:25 +02:00
Jouni Malinen
fb7e0998b0 tests: P2P GO start with only 5 GHz band allowed
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-03-02 17:01:15 +02:00
Jouni Malinen
96cbb7b561 tests: Skip radius_acct_unreachable3 when not running under VM
It looks like the IP routing table changes used here to trigger
unreachability and following reachability of the server do not work very
well with full IP routing configuration, so run this test case only when
executed under vm-run.sh.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-03-02 16:30:13 +02:00
Jouni Malinen
bfc048b48f tests: P2P autonomous GO with large number of GO instances
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-01 22:36:53 +02:00
Jouni Malinen
58980654af tests: RADIUS server failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-01 22:36:52 +02:00
Jouni Malinen
5d695df5d1 tests: hostapd and get_station in multi-BSS configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-01 22:36:52 +02:00
Jouni Malinen
5ff53fd6dd tests: RADIUS failover and failed attempt to return to primary server
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-01 22:36:52 +02:00
Jouni Malinen
7c5658c661 tests: RADIUS client address specified
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-01 22:36:52 +02:00
Jouni Malinen
1b5664f0fb tests: RADIUS Accounting server unreachable and multiple STAs
This verifies behavior on reaching RADIUS_CLIENT_MAX_ENTRIES.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-01 22:36:52 +02:00
Jouni Malinen
48d9065f7d tests: RADIUS Accounting server initially unreachable, but then available
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-01 22:36:52 +02:00
Jouni Malinen
ec1c483de0 tests: Not ready for GO Negotiation (listen/search)
These test cases verify that P2P_FIND and P2P_LISTEN operation continues
after having replied to GO Negotiation Request frame for which we are
not yet ready (i.e., GO Negotiation Response with status=1).

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-01 22:36:52 +02:00
Jouni Malinen
7041c16d5a tests: Open mode connection and SELECT_NETWORK to change network
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-01 15:56:11 +02:00
Jouni Malinen
6acca70536 tests: cfg80211 P2P Device and P2P_* command on incorrect interface
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-01 12:07:23 +02:00
Jouni Malinen
5de945fcc0 tests: cfg80211 P2P Device misuses
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-01 11:24:41 +02:00
Jouni Malinen
6d0b447464 tests: P2P_FIND with freq parameter to scan a single channel
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-28 22:06:24 +02:00
Jouni Malinen
dcd378ed2e tests: Make grpform_no_wsc_done more robust
It was possible for this test case to start a new group formation on
dev[1] while the first round was still going through the process of
processing group termination indication. That could result in the second
round failing unexpectedly.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-28 16:57:03 +02:00
Jouni Malinen
abeea374a4 tests: RADIUS server connect() failing during startup
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-28 15:45:17 +02:00
Jouni Malinen
8412dd52d1 tests: Increase default VM memory from 128M to 192M
It looks like the 128M default memory size for the hwsim test setup was
not large enough to cover all the needs anymore. Some of the test cases
using tshark could hit OOM with that size. Increase the default
allocation to 192M to avoid this type of issues.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-25 19:02:43 +02:00
Jouni Malinen
0f74bd41c5 tests: 4-way handshake and the first msg 4/4 getting lost
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-23 15:36:49 +02:00
Jouni Malinen
52352802ee tests: Linux packet socket workaround and EAPOL RX in operational state
This verifies that the packet socket workaround does not get disabled if
EAPOL frames are processed during operation state (i.e., when processing
reauthentication/rekeying on a functional association).

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-22 16:06:23 +02:00
Jouni Malinen
528a7d22d0 tests: VHT/HT preference in BSS selection
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-22 11:47:28 +02:00
Jouni Malinen
cfb5576d93 tests: Rename dmesg files to a unique name
This allows multiple dmesg files to be saved if a test case is executed
multiple times similarly to the other logfiles.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-21 16:07:53 +02:00
Johannes Berg
d0007ac9d7 tests: Add test to check disconnect in powersave
The kernel had two bugs (one in hwsim and one more important one in
mac80211) in this area, add a test to make sure we can disconnect
without any kernel issues while in powersave.

Also make sure that the TIM bit gets set and cleared again (by checking
with tshark.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-02-21 16:07:52 +02:00
Jouni Malinen
04bb845273 tests: Re-association to same BSS to toggle PMF status
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-19 16:37:12 +02:00
Jouni Malinen
4bcedaa400 tests: Re-sign expired test certificates
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-19 14:18:57 +02:00
Jouni Malinen
792eafa047 tests: Make wpas_mesh_password_mismatch more robust
It seems to be possible for dev2 (the one with incorrect password) to
stop retries before either dev0 or dev1 reports the authentication
failure event. For now, allow the test case pass if either dev0 or dev1
reports the event rather than requiring both to report this. The
expected behavior can be fine-tuned in the future if the reporting
behavior is modified to be more consistent.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-12 15:50:52 +02:00
Jouni Malinen
f245b45075 tests: Fix ap_{open,wpa2_psk}_wpas_in_bridge cleanup
Due to a copy-paste error, these test cases left 4addr mode enabled on
wlan5. This resulted in number of connect_cmd_* test cases failing if
executed after the wpas_in_bridge tests.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-11 16:50:06 +02:00
Jouni Malinen
1c9838b388 tests: Remove temporary config file in wpas_config_file
The new wpa_supplicant configuration file writing style leaves behind
the temporary file (<filename>.tmp) if renaming fails. Clean that up in
the test case execution.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-11 14:57:30 +02:00
Jouni Malinen
eb88a5ba74 tests: hostapd and external ifconfig down + up
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-11 10:31:12 +02:00
Jouni Malinen
380f3a8ba1 tests: Make autogo_join_auto_go_neg more robust
This test cases used to fail if dev1 had seen dev0 as a GO in an earlier
test case, e.g., when running it after autogo_fail. Fix this by clearing
scan results on dev1 at the beginning of the test case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-10 12:09:07 +02:00
Jouni Malinen
c5b535ed1d tests: hostapd and start_disabled=1
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-09 19:57:46 +02:00
Jouni Malinen
7ebc7e8fa6 tests: wpa_supplicant DUMP/GET global parameter
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-08 22:49:58 +02:00
Jouni Malinen
2265376271 tests: INTERWORKING_ADD_NETWORK
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-08 22:49:58 +02:00