Commit graph

1354 commits

Author SHA1 Message Date
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
Jouni Malinen 9177b0a8c9 tests: Successful P2P_CONNECT-auto cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-08 13:59:57 +02:00
Jouni Malinen d2b84e430c tests: P2P_CONNECT-auto not finding GO
This is a regression test for an earlier bug that resulted in using
freed memory after a P2P group interface was removed as part of
fallback-to-GO-Negotiation in P2P_CONNECT-auto.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-08 13:35:49 +02:00
Jouni Malinen 874057da4e tests: Make wpas_ctrl_many_networks more robust under valgrind
It is possible for a low powered CPU to take excessively long time to
delete 1000 network blocks when running under valgrind. This would have
resulted in the test case failing and the following reset operation
timing out which would then stop the test sequence completely.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-08 13:25:35 +02:00
Jouni Malinen f77d6d4bd8 tests: Mesh authentication failure events
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-08 13:25:35 +02:00
Jouni Malinen a0b3f8e2ff tests: Remove forgottend debug print from p2ps_connect_adv_go_persistent
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-07 16:29:22 +02:00
Jouni Malinen c62bd5e44d tests: Remove forgotten debug print from grpform_pbc_overlap
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-07 15:38:29 +02:00
Ilan Peer d821e2f294 tests: Use the global control interface in test_nfc_p2p.py
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-02-07 15:37:13 +02:00
David Spinadel bbcbbd3701 tests: Modify autogo_bridge test to use group interface
1. Add get_group_ifname() to wpasupplicant.py
2. Use the function to get the interface name for the bridge.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
2015-02-07 15:37:13 +02:00
Ilan Peer 4ef05faf43 tests: Modify test_p2p_discovery to use global and group interfaces
Modify the tests in test_p2p_discovery to use the global
control interface and group interface.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-02-07 15:37:13 +02:00
Ilan Peer da749dc579 tests: Use the group control interface in p2p_channel_avoid
Use the group control interface to wait for P2P-REMOVE-AND-REFORM-GROUP
as the event is a group event.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-02-07 15:37:13 +02:00
Ilan Peer d4f2ba749e tests: Use group control interface in autogo
P2P-PRESENCE-RESPONSE is a group event, and thus need
to use the group control interface.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-02-07 15:37:13 +02:00
Ilan Peer 75826fc6e6 tests: Use global control interface in wpas_ctrl_global
Use the global control interface to set/get the status of the
P2P Device.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-02-07 15:37:13 +02:00
Jouni Malinen c4668009d0 tests: Remove unnecessary use of sudo from test cases
run-tests.py is running as root, so sudo does not need to be used
anymore from within each test case.

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

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-07 15:37:13 +02:00