Commit graph

1276 commits

Author SHA1 Message Date
Jouni Malinen f4cd0f6454 tests: EAP-PEAP/MSCHAPv2 password failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-01 17:37:35 +02:00
Jouni Malinen 54f2cae2e6 tests: Make *_key_lifetime_in_memory more robust
It was possible for the GTK-found-in-memory case to be triggered due to
a retransmission of EAPOL-Key msg 3/4 especially when running test cases
under heavy load (i.e., timeout on hostapd due to not receiving the 4/4
response quickly enough). Make this false failure report less likely by
waiting a bit longer after the connection has been completed before
fetching the process memory.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-31 18:06:06 +02:00
Jouni Malinen a1512a0cc7 tests: wpa_supplicant and station interface in a bridge
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-31 17:28:08 +02:00
Jouni Malinen db5f6b2ca3 tests: RSN pre-authentication OOM in wpa_supplicant
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-31 13:45:52 +02:00
Jouni Malinen 7afa678033 tests: RSN pre-authentication timeout
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-31 13:35:31 +02:00
Jouni Malinen d2432b8b7e tests: PMKSA cache size limit in wpa_supplicant
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-31 13:26:46 +02:00
Jouni Malinen 19879b4572 tests: Invalid NFC NDEF record handling
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-31 02:00:02 +02:00
Jouni Malinen 55c430b63c tests: Add capture file validation for IPv6 in proxyarp_open
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-30 21:55:46 +02:00
Jouni Malinen efd0a6fbf1 tests: Add capture file validation for IPv4 in proxyarp_open
Verify that the expected frames were seend and unexpected frames
weren't.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-30 18:55:22 +02:00
Jouni Malinen 210a4f6a13 tests: Add another bridge port to proxyarp_open
Use another AP instance as a separate bridge port in the proxyarp_open
test cases to increase testing coverage for kernel proxyarp
functionality.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-30 18:55:22 +02:00
Jouni Malinen 87f0ede914 tests: Add brctl showmacs output to proxyarp_open test cases
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-30 18:55:22 +02:00
Jouni Malinen 9934ee1967 tests: Run the proxyarp_open test case both with and without ebtables
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-30 18:55:22 +02:00
Jouni Malinen 2076846cc4 tests: Fix tshark refactoring
Commit 2e1d7386e2 ('tests: Refactor tshark
running') added a helper function for running tshark. However, it did
not use the filter argument correctly, added an extra -Tfields on the
command line, and failed to use global variable. In practice, this ended
up disabling all the tshark sniffer checks. Fix that by using the filter
argument from the caller and marking the _tshark_filter_arg global.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-30 18:55:22 +02:00
Jouni Malinen 3a4bace428 tests: RADIUS server changing VLAN ID assignment
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-30 01:11:56 +02:00
Jouni Malinen 3b86e9d52c tests: PMKSA caching OOM error cases
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-30 00:14:57 +02:00
Jouni Malinen 915135e055 tests: hostapd OOM loop tests for WPA2-PSK and WPA2-EAP connection
These verify number of previously uncovered error paths.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-29 22:33:25 +02:00
Jouni Malinen cdebd24db6 tests: OLBC AP table error cases
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-29 21:11:41 +02:00
Jouni Malinen 496a7a6ff9 tests: hostapd OOM loop targeting RADIUS accounting
The hostapd_oom_wpa2_eap test case did not always catch these code
paths, so add a variant of that test case explicitly targeting RADIUS
functions.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-29 20:52:30 +02:00
Jouni Malinen 2c528e9690 tests: cfg80211 DEL_STATION issued externally to hostapd
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-29 16:26:31 +02:00
Jouni Malinen 4a4cd04cad tests: RADIUS MAC ACL and accounting enabled
This ends up using the special User-Name = STA MAC address case for
Accounting-Request. In addition, add Chargeable-User-Identity for one of
the STAs.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-29 15:55:48 +02:00
Jouni Malinen ef318402f6 tests: EAP-MSCHAPv2 server out-of-memory cases
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-28 16:17:25 +02:00
Jouni Malinen 95a15d793e tests: EAP-GTC server error cases
In addition, no-password-configured coverage extended to EAP-MD5 and
EAP-MSCHAPv2 as well.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-28 15:59:36 +02:00
Jouni Malinen 467775c5ac tests: Pending EAP peer processing with VENDOR-TEST
This extends the VENDOR-TEST EAP method peer implementation to allow
pending processing case to be selected at run time. The
ap_wpa2_eap_vendor_test test case is similarly extended to include this
option as the second case for full coverage.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-28 13:09:31 +02:00
Jouni Malinen a08fdb17aa tests: EAPOL supplicant invalid frame handling
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-28 13:09:31 +02:00
Jouni Malinen 48bb2e68c0 tests: STATUS-VERBOSE
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-28 13:09:31 +02:00
Jouni Malinen 37551fe374 tests: Suite B 192-bit profile
This adds a Suite B test case for 192-bit level.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-27 01:43:55 +02:00
Jouni Malinen 4113a96bba tests: Complete Suite B 128-bit coverage
Enable BIP-GMAC-128 and enforce Suite B profile for TLS.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-27 01:43:55 +02:00
Jouni Malinen f918b95b9d tests: Fix ft_psk_key_lifetime_in_memory with new PTK derivation debug
PTK is not printed out anymore as a single entry, so fetch KCK, KEK, and
TK separately.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-27 01:43:55 +02:00
Jouni Malinen 287eb3f9d7 tests: Group management frame cipher suites
This extends testing coverage of PMF group management cipher suites to
include all the cases supported by the driver (existing BIP =
AES-128-CMAC and the new BIP-GMAC-128, BIP-GMAC-256, BIP-CMAC-256).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-24 19:37:42 +02:00
Jouni Malinen fba25c99a5 tests: Make ap_wps_er_pbc_overlap more robust
Reorder scanning in a way that allows the ER behavior to be more
predictable. The first Probe Request report is for a previously received
frame on the AP and this new sequence avoids leaving either of the PBC
test STAs to be that one.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-23 00:52:56 +02:00
Jouni Malinen 90ad11e625 tests: Make active scans more robust
This makes testing under very heavy load or under extensive kernel
debugging options more robust by allowing number of test cases to scan
multiple times before giving up on active scans. The main reason for
many of the related test failures is in Probe Response frame from
hostapd not getting out quickly enough especially when multiple BSSes
are operating.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-23 00:52:40 +02:00
Jouni Malinen 1f53fe0310 tests: P2P group formation using PBC multiple times in a row
This verifies that PBC session overlap detection does not get indicated
when forming the group with the same peer multiple times.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-22 20:53:03 +02:00
Jouni Malinen 180a858f76 tests: P2P_SERV_DISC_CANCEL_REQ during query
This is a regression test case for a specific sequence that could result
in wpa_supplicant NULL dereference when a SD request is cancelled before
the SD Request TX status callback has been processed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-22 15:55:36 +02:00
Jouni Malinen a60dbbce44 tests: ANQP-QUERY-DONE event
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-20 02:26:21 +02:00
Jouni Malinen 31b7ecb6c8 tests: P2P NFC invitiation with driver using cfg80211 P2P Device
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-20 01:57:59 +02:00
Jouni Malinen 2dc18e9a26 tests: Error handling for scan trigger failure cases
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-19 20:25:22 +02:00
Jouni Malinen e60be3b3d4 tests: WPS registrar learning configuration from WPA+WPA2 AP
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-19 18:39:13 +02:00
Jouni Malinen 059bcc4782 tests: Increase hostapd out-of-memory loop coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-19 02:35:43 +02:00
Jouni Malinen 214457de15 tests: WPA + WEP configuration getting rejected
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-19 01:11:36 +02:00
Jouni Malinen 9eadcfbf06 tests: Add step-by-step guide for setting up test framework
This set of notes provides information on how virtual guess OS can be
used to run the mac80211_hwsim test cases under any host OS. The
specific example here uses Ubuntu 14.04.1 server as the starting point
and lists the additional packages that need to be installed and commands
that can be used to fetch and build the test programs.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-18 18:11:11 +02:00
Jouni Malinen a66d2248a0 tests: Close wlan5 control interface monitor more explicitly
There were couple of common cases where the control interface for the
dynamic wpa_supplicant instance could have been left in attached state
until Python ends up cleaning up the instance. This could result in
issues if many monitor interface events were queued for that attached
socket. Make this less likely to cause issues by explicitly detaching
and closing control interfaces before moving to the next test case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-18 17:13:55 +02:00
Jouni Malinen 7f08b2f91d tests: Make WNM Sleep Mode tests more robust
It was possible for the Action frame used for entring WNM Sleep Mode to
get dropped on the AP side due to it arriving prior to having processed
EAPOL-Key message 4/4 due to a race condition between Data and
Management frame processing paths. Avoid this by waiting for
AP-STA-CONNECTED event from hostapd prior to trying to enter WNM Sleep
Mode. In addition, make the check for the STA flag change more robust by
allowing the wait to be a bit longer with a loop that terminates as soon
as the flag has changed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-18 15:58:05 +02:00
Jouni Malinen 7cc9a81f1e tests: Make PMKSA caching tests more robust
When the STA is forced to disconnect immediately after completion of
4-way handshake, there is a race condition on the AP side between the
reception of EAPOL-Key msg 4/4 and the following Deauthentication frame.
It is possible for the deauthentication notification to be processed
first since that message uses different path from kernel to user space.

If hostapd does not receive EAPOL-Key msg 4/4 prior to deauthentication,
no PMKSA cache entry is added. This race condition was making the test
cases expecting PMKSA caching to work to fail every now and then. Avoid
this issue by waiting for AP-STA-CONNECTED event from hostapd. This
makes sure the PMKSA cache entry gets added on the AP side.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-18 15:47:56 +02:00
Jouni Malinen d4155eb78a tests: Add some more time for olbc_ht update in olbc_5ghz
It looks like this test case is failing every now and then, so add some
more time for the olbc_ht value to get updated before reporting a
failure.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-18 12:55:49 +02:00
Jouni Malinen b4de353c85 tests: Import gobject in a way that allows failures
It looks like the gobject module does not get installed by default for
Python at least on Ubuntu server, so modify the D-Bus test case files to
import this in a way that allows other test cases to be run even without
gobject module being installed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-18 12:50:20 +02:00
Jouni Malinen 57f08b3f3a tests: Make ap_anqp_sharing more robust
This test case uses get_bss() with a BSSID to find a BSS entry. That can
result in failures if there are multiple BSS entries in wpa_supplicant
BSS table for the same BSSID, e.g., due to an earlier hidden SSID test
case. Explicitly clear the cfg80211 and wpa_supplicant scan caches at
the beginning of this test case to make it less likely for earlier test
cases to trigger a failure here.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-18 12:50:20 +02:00
Jouni Malinen 296186c006 tests: Make ap_mixed_security more robust
This test case uses get_bss() with a BSSID to find a BSS entry. That can
result in failures if there are multiple BSS entries in wpa_supplicant
BSS table for the same BSSID, e.g., due to an earlier hidden SSID test
case. Explicitly clear the cfg80211 and wpa_supplicant scan caches at
the beginning of this test case to make it less likely for earlier test
cases to trigger a failure here.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-18 12:50:20 +02:00
Jouni Malinen 092ac7bb0e tests: Hotspot 2.0 ANQP fetch with hidden SSID BSS entry
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-18 12:50:20 +02:00
Jouni Malinen 3dacd58b0d tests: Write BSS table to debug log in ap_mixed_security
This makes it easier to debug test failures in BSS entry flags field.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-17 17:22:38 +02:00
Jouni Malinen 7e3a6c9e21 tests: Mark proxyarp_open as skip if traffic test fails
This step requires kernel changes that are not yet in upstream Linux
tree, so mark this as skip rather than failure for now.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-17 17:15:42 +02:00