Commit graph

1847 commits

Author SHA1 Message Date
Jouni Malinen
7e40a8812b tests: Verify SIGNAL_POLL values in ap_vht80
This confirms that the station recognized and negotiated 80 MHz
channel use with VHT.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-17 21:20:02 +02:00
Jouni Malinen
138903f91f tests: Run OCSP test cases with internal TLS library
There is no sufficient OCSP support to go through these test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-17 21:19:59 +02:00
Jouni Malinen
58a406202a tests: OCSP certificate signed OCSP response using key ID
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-17 00:49:26 +02:00
Jouni Malinen
8e416cecdb tests: Make key-lifetime-in-memory more robust for GTK check
The decrypted copy of a GTK from EAPOL-Key is cleared from memory only
after having sent out CTRL-EVENT-CONNECTED. As such, there was a race
condition on the test case reading the wpa_supplicant process memory
after the connection. This was unlikely to occur due to the one second
sleep, but even with that, it would be at least theorically possible to
hit this race under heavy load (e.g., when using large number of VMs to
run parallel testing). Avoid this by running a PING command to make sure
wpa_supplicant has returned to eloop before reading the process memory.
This should make it less likely to report false positives on GTK being
found in memory.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-14 17:23:47 +02:00
Jouni Malinen
f089cdf98e tests: Add more memory details on key-lifetime-in-memory
This makes it easier to see where in memory the key was found and what
there is in memory around that location.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-14 15:49:01 +02:00
Jouni Malinen
16c43d2a8f tests: Run PKCS#12 tests with internal TLS crypto
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-14 15:49:01 +02:00
Jouni Malinen
ca27ee0998 tests: External server certificate chain validation
This tests tls_ext_cert_check=1 behavior with EAP-TLS, EAP-TTLS,
EAP-PEAP, and EAP-FAST.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-13 21:12:20 +02:00
Jouni Malinen
be90370bd5 tests: Fix wpas_ctrl_country and dbus_country with valid db.txt
init=CORE was previously used due to invalid db.txt data for 00. For
now, allow both it and the new init=USER after fixed db.txt.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-12 12:45:30 +02:00
Jouni Malinen
5b7784a89c tests: EAP-FAST local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-12 12:42:44 +02:00
Jouni Malinen
1025603b3f tests: FT PTK rekeying triggered by AP/station after roam
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-10 00:14:36 +02:00
Jouni Malinen
cc02fd3eff tests: Make pmksa_cache_opportunistic_connect more robust
This test case could fail if the cfg80211 scan cache brought in a BSS
entry from an earlier test case and a new scan did not get executed
prior to the ROAM command. Fix this by forcing the scan to go through
prior to roaming to AP2

This issue showed up with the following test case sequence:
connect_cmd_roam pmksa_cache_opportunistic_connect

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-06 20:31:18 +02:00
Jouni Malinen
0ceff76e7b tests: WPA2 AP processing of RSN IE differences
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-06 20:00:10 +02:00
Jouni Malinen
8eb45bde38 tests: Write GTK locations into debug log in key_lifetime_in_memory
It looks like it is possible for the GTK to be found from memory every
now and then. This makes these test cases fail. Write the memory
addresses in which the GTK was found to the log to make it somewhat
easier to try to figure out where the key can be left in memory.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-06 17:48:43 +02:00
Jouni Malinen
1d32bc2c1c tests: Make dbus_wps_oom more robust
It was possible for the BSSs object property change signal to be
generated during the OOM test case for Get(). If that happened, the
signal was not sent out, but the following Get(BSSs) operation succeeded
unexpectedly which resulted in a test failure. Make this less likely to
happen by waiting 50 ms between the scan and Get(BSSs) operation. This
should be sufficient to cover most cases since wpa_supplicant uses 5 ms
timeout for D-Bus property changed updates.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-06 17:10:06 +02:00
Jouni Malinen
bc321e1597 tests: Make ap_max_num_sta_no_probe_resp more robust
It was possible for the AP's Beacon frame to be seen by dev[0] when
running a scan. This is not an error case. Make this test case more
robust by verifying with a sniffer whether a Probe Response frame was
sent to unexpected STA.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-06 13:38:18 +02:00
Jouni Malinen
ce96e65cb7 tests: D-Bus vendor element operations
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-06 12:50:41 +02:00
Jouni Malinen
b4e1e99577 tests: EAP-PSK local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-06 11:13:12 +02:00
Jouni Malinen
4073ef22ae tests: EAP-IKEv2 local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-06 00:39:27 +02:00
Jouni Malinen
d1341917ce tests: WPS and fragment ack OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-05 21:35:45 +02:00
Jouni Malinen
96bf8fe104 tests: PKCS #8 private key with PKCS #5 v1.5 and v2.0 format
This verifies client private key use in encrypted PKCS #8 format with
PKCS #5 v1.5 format using pbeWithMD5AndDES-CBC and PKCS #5 v2.0 format
using PBES2 with des-ede3-cbc.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-05 20:27:27 +02:00
Jouni Malinen
b134397b11 tests: P2P persistent group formation, re-invocation, and cancel
Verify that P2P_CANCEL gets rejected on fully re-invoked persistent
group. This did not work properly before the last couple of commits and
before this week, the P2P_CANCEL on a separate group interface in P2p
Client role could result in use of freed memory and process termination.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-04 23:15:11 +02:00
Jouni Malinen
f98b0e5806 tests: Make tests using multi_check() more robust
It was possible for a cached scan entry in cfg80211 from an earlier test
case to show up while verifying that the disabled AP does not show up in
scan results. This could result in invalid test failures, e.g., when
running test cases "ap_require_ht ap_multi_bss_config" multiple times
(depends a bit on timing). Make this less likely to occur by explicitly
clearing the scan cache and by stopping wlan1 from trying to associate
before stopping ap_required_ht* test cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-04 21:03:43 +02:00
Jouni Malinen
d887ed3f95 tests: Fix ap_wps_er_multi_add_enrollee cleanup steps
Only one of the ERs was stopped at the end of the test case and this
could result in the following test case failing, e.g., when executing
this test case sequence: ap_wps_er_multi_add_enrollee ap_wps_upnp.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-02 18:19:39 +02:00
Jouni Malinen
2c68ae2b21 tests: Remove forgotten print from gas_anqp_oom_hapd
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-02 13:32:59 +02:00
Jouni Malinen
be4a0d0d5a tests: Make autogo_join_auto_go_neg more robust
It was possible for this test case to fail if the single attempt of
discovering the peer as part of the scan for join failed. This test case
was useful in combination with another test case:
ap_hs20_fetch_osu autogo_join_auto_go_neg

However, there is now an explicit test case (discovery_after_gas) for
this, so autogo_join_auto_go_neg can be made more robust without losing
testing coverage.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-02 12:37:12 +02:00
Jouni Malinen
3bba9c71c5 tests: P2P device discovery after fragmented GAS/ANQP exchange
This verifies cfg80211/mac80211 offchannel TX cancellation steps.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-02 12:37:12 +02:00
Jouni Malinen
850e054c0f tests: EAP-EKE local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-01 01:09:28 +02:00
Jouni Malinen
34b164dd25 tests: Fix p2p_go_move_scm_peer_does_not_support to clear avoid freqs
The P2P channel list on dev[1] at the end of
p2p_go_move_scm_peer_does_not_support was empty because all of the 2.4
GHz band got disabled by the simulated avoid frequencies driver event.
That channel list needs to be cleared prior to resetting regulatory
domain back to world roaming to get the P2P channel list updated
properly for the following test cases.

This was triggered by the following test case sequence:
p2p_go_move_scm_peer_does_not_support persistent_group_and_role_change

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-30 22:06:54 +02:00
Jouni Malinen
53b2100a3f tests: P2P group formation timeout with cfg80211 P2P Device
Verify that both the GO and P2P Client processing of P2P group formation
timeout removes the correct group.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-30 21:38:23 +02:00
Jouni Malinen
5549bead85 Revert "tests: Dynamic hwsim p2ps_channel_active_go_and_station_different_mcc"
This reverts commit 78fdab307e. This test
case needs MCC support on two stations, so the earlier attempt to handle
this with one dynamic interface is not sufficient.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-30 19:58:07 +02:00
Jouni Malinen
45e8a45bb5 tests: Show vm-run.sh command line for re-running failure sequences
Now that vm-run.sh supports a long list of test cases without crashing
the VM kernel, there is no need to use the "parallel-vm.py -1 1 <tests>"
workaround. Print the re-run example commands with vm-run.sh instead. In
addition, add the --long argument if it was specified for the test run
to avoid skipping test cases in the re-run case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-30 19:42:56 +02:00
Jouni Malinen
6a5f578cac tests: Force concurrent exchange in ap_wps_er_multi_add_enrollee
This makes it more likely for the two ERs to go through WPS UPnP
exchange in parallel. This was already happening every now and then and
resulted in failures. However, now that there is support for multiple
concurrent exchanges, it is useful to have this test case hit that
possibility more frequently.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-30 16:58:47 +02:00
Jouni Malinen
c00f19061c tests: wpa_supplicant sched_scan_plans parsing
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-30 14:03:29 +02:00
Johannes Berg
23fcfd6004 tests: Allow passing more arguments to vm-run.sh
The script is currently limited by the maximum kernel command line
length and if that's exceeded the kernel panics at boot. Fix this by
writing the arguments to a file and reading it in the VM.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-30 14:03:28 +02:00
Jouni Malinen
f0154bf434 tests: Extend scan_dfs to cover US-disallowed channels 12 and 13
Verify that active scanning is not used in US regulatory domain on 2.4
GHz channels 12 and 13.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-30 14:03:23 +02:00
Jouni Malinen
d6ba709aa3 tests: EAP-TLS with SHA512/SHA384 signature
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-30 00:39:38 +02:00
Jouni Malinen
cc71035f6c tests: ap_wpa2_eap_fast_prf_oom with internal TLS implementation
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 23:57:39 +02:00
Jouni Malinen
404597e630 tests: Skip ap_wpa2_eap_ttls_dh_params_dsa with internal TLS
DH DSA parameters are not yet supported.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 21:09:44 +02:00
Jouni Malinen
686eee77d2 tests: Skip PKCS#12 tests with internal TLS client implementation
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 21:07:39 +02:00
Jouni Malinen
089e7ca372 tests: Skip dbus_connect_eap if altsubject_match is not supported
This test case fails with the current internal TLS client implementation
since the needed altsubject_match parameter is not yet supported.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 20:57:26 +02:00
Jouni Malinen
c5ef7bbfa5 tests: Fix wpas_ctrl_oom with the internal TLS implementation
One of the OOM cases does not apply for internal crypto implementation.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 20:43:44 +02:00
Jouni Malinen
c675f669c3 tests: Fix wpas_ctrl_network without SAE
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 20:38:34 +02:00
Jouni Malinen
e78eb40442 tests: Skip domain_match and domain_suffix_match with internal TLS
The internal TLS client in wpa_supplicant does not yet support the
functionality needed for these test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 20:35:05 +02:00
Jouni Malinen
2286578fe0 tests: TLS v1.2 check in ap_wpa2_eap_tls_versions for internal TLS
The internal TLS implementation in wpa_supplicant supports TLS v1.2, so
verify that this version can be disabled.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 20:04:26 +02:00
Jouni Malinen
bb0a72ab46 tests: Skip OCSP test cases with the internal TLS implementation
The internal TLS client implementation does not yet support OCSP.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 19:32:45 +02:00
Jouni Malinen
0fc1b583e2 tests: ap_wpa2_eap_ttls_server_cert_hash with internal TLS client
Since the internal TLS client implementation in wpa_supplicant now has
sufficient support for this functionality, allow the test case to be
executed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 19:02:04 +02:00
Jouni Malinen
9b35afd6ac tests: Fix OOM eloop_register_sock() test cases with new gcc
gcc 4.8 vs 5.2 seem to compile eloop_register_sock() differently. With
5.2, that function name does not show up in the backtrace since
eloop_sock_table_add_sock() is used without a separate function call.
This broke the memory allocation failure checking in this test case. Fix
this by matching against the eloop_sock_table_add_sock() function which
shows up in the backtrace for both gcc versions.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 20:48:16 +02:00
Jouni Malinen
d36ae37679 tests: EAP-SIM/AKA/AKA' error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 20:46:36 +02:00
Jouni Malinen
288b6f8b85 tests: Extended coverage for the EAP-SAKE attribute parser
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 12:25:22 +02:00
Jouni Malinen
ab4ea0e948 tests: EAP-SAKE local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 11:53:31 +02:00