Commit graph

1144 commits

Author SHA1 Message Date
Jouni Malinen 558ac77c58 tests: setband and scans
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-19 23:08:10 +02:00
Jouni Malinen 7749b1c982 tests: Additional coverage for filter_ssids=1
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-19 20:26:07 +02:00
Jouni Malinen 91cc6f918a tests: AP_SCAN 2 operation
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-19 20:08:58 +02:00
Jouni Malinen 83e80d32f1 tests: SCAN requests while in non-scan radio work
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-19 15:23:07 +02:00
Jouni Malinen 7c5c1ba7b4 tests: P2P_LISTEN behavior with offchannel TX
This verifies that offchannel TX (PD in this specific case) does not
stop ongoing long P2P_LISTEN operation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen 89cd4355bb tests: Fix proxyarp_open IPv4-from-bridge
There were couple of typos in the IP addresses and there was no coverage
for the normal unicast ARP response from the bridge (since non-wireless
device does not get proxied by the AP). In addition, it is better to
change the IP address used here to be unique to make the sniffer logs
easier to interpret.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-18 16:41:40 +02:00
Jouni Malinen 6d5332948c tests: Use send_ns() helper for the earlier proxyarp_open NS packets
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen 40e4c9c8b0 tests: Add traffic test to proxyarp_open
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen 5a3ce80265 tests: ProxyARP behavior with IPv6 frames
This adds transmission of number of NS/NA frames to test ProxyARP
behavior. The actual validation of the AP behavior is still manual,
i.e., a separate inspectation of the capture files is needed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen 19cbe06238 tests: Add ebtables rules for ProxyARP
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen a95c6973aa tests: Use non-promiscuous mode and packet-buffered tcpdump capture
This helps in avoiding truncated capture files in the proxyarp_open test
case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen 1d0b5a04e6 tests: Dump monitor messages before hwsim_utils test
This may be needed in some corner cases where broadcast frames with two
associated stations are received by both devices.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen db1d66d879 tests: Fix wifi_display_persistent_group event checks
The final invitation case in this test was verified incorrectly. The GO
was already operatign in that case, so there was not supposed to be a
new P2P-GROUP-STARTED message from GO. That happened to be show up in
the pending event messages from the last instance, but that was just by
accident and any additional dump_monitor() operation added here would
cause this test to fail. Fix this by handling the final invitation
separately and verifying that only the client side indicates
P2P-GROUP-STARTED.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:41:40 +02:00
Jouni Malinen c8836a4f03 tests: Allow dump_monitor() to be used without global monitor interface
It is possible for WpaSupplicant instance to be used without the global
control socket, so allow dump_monitor() to handle this case cleanly.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-18 16:01:41 +02:00
Jouni Malinen 9d7fdac5b3 tests: Try to clear scan results after regulatory domain changes
It was possible for regulatory domain changes to "leak" into following
test cases in number of cases where the cfg80211 BSS table remained
after regulatory domain had been restored to world roaming. Try to make
this less likely to occur by explicitly clearing BSS table at the end of
test cases that use different regulatory domain. This makes P2P test
cases that verify channel selection based on world roaming rules more
robust.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-15 01:32:01 +02:00
Jouni Malinen 970a23f665 tests: Make flush_scan_cache() more robust
It was possible for BSS entries on the scanned channel (2412 MHz) to be
left behind after flush_scan_cache() call. Use a less likely channel
2417 MHz as the default channel to scan. This will hopefully get rid of
most problematic BSS entries from previous test cases. For example,
ap_hs20_oen followed by ap_hs20_random_mac could fail due to
INTERWORKING_CONNECT seeing non-RSN scan result from the previous test
case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-15 01:13:03 +02:00
Jouni Malinen d48b64ba6c tests: Use helper function for adding open mesh network
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 23:34:43 +02:00
Jouni Malinen 7e3614df5c tests: Mesh with dynamic interface
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 23:28:36 +02:00
Jouni Malinen 5881873b86 tests: Make pmksa_cache_opportunistic_connect more robust
Use scan_for_bss() instead of scan(freq) to avoid false positives due to
active scan failing under heavy load.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 19:15:48 +02:00
Jouni Malinen acb63c753b tests: SAE with missing password
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 17:09:14 +02:00
Jouni Malinen 0e40d7daa4 tests: ERP when server has dropped the keys
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 15:47:04 +02:00
Jouni Malinen 777bbe7a3c tests: P2P_PRESENCE_REQ on group interface
This ends up using the special offchannel.c code path where a different
interface is selected for TX. In addition, the P2P-PRESENCE-RESPONSE
event is verified to be delivered on the group interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 15:47:04 +02:00
Jouni Malinen 11ace2ed1f tests: Mesh and missing SAE password
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 15:47:04 +02:00
Jouni Malinen fba65f7240 tests: Mesh BSS data
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 12:55:43 +02:00
Jouni Malinen 54cacef5eb tests: Mesh sae_groups configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 12:55:40 +02:00
Jouni Malinen e9026725f7 tests: Extra coverage for command line arguments
The results for these are not currently verified, but this allows
--codecov runs to get more coverage for the command line argument
parsers.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 12:24:15 +02:00
Jouni Malinen e869f812d3 tests: DEAUTHENTICATE/DISASSCIATE/CHAN_SWITCH error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen 69f9912310 tests: Additional FETCH_OSU and CANCEL_FETCH_OSU coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen ea27f66292 tests: STOP_FETCH_ANQP
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen 1eaeb7fbaa tests: P2P_UNAUTHORIZE to unauthorize a peer
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen 909f13cc52 tests: Move 'SET pmf 0' from reset() to test cases
This avoids one more cleanup step between most test cases by clearing
the default PMF behavior change only in case it was actually modified
during a test.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen be9f156200 tests: Move WPS_ER_STOP from reset() to test cases
This avoids one more cleanup step between most test cases by stopping ER
only in case it was actually used during a test.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen d6b916c9db tests: WPS_ER_PBC error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen 8f8c2fe8b2 tests: WPS ER restart and stop
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen b37dac50a2 tests: wpa_supplicant AP mode and PBC session overlap
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:02 +02:00
Jouni Malinen 6eae42f98f tests: Additional coverage for miscellaneous ctrl_iface commands
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:02 +02:00
Jouni Malinen 70d29ec946 tests: Extend RRM neighbor request testing
This uses a new testing mode in hostapd to allow RRM neighbor request
transmittion to be tested. For the second part of the test case to be
executed, mac80211_hwsim needs to be modified to claim support for the
required RRM capabilities (that change is not yet in Linux kernel).

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 21:09:32 +02:00
Jouni Malinen 357edd386f tests: Additional VENDOR_ELEM coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 20:12:24 +02:00
Jouni Malinen d655bbc797 tests: DATA_TEST_* error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 19:33:54 +02:00
Jouni Malinen b854d3c85d tests: EAPOL_RX failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 19:16:34 +02:00
Jouni Malinen f157078c13 tests: DRIVER_EVENT failure case
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 19:08:24 +02:00
Jouni Malinen 3d9848967a tests: Additional MGMT_TX coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 19:05:00 +02:00
Jouni Malinen cbdfff0a73 tests: A single BSS with multiple key management options
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-12 14:05:43 +02:00
Jouni Malinen 9446f3c253 tests: SCAN error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 01:13:35 +02:00
Jouni Malinen 530b519f78 tests: RADIO_WORK error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 00:27:06 +02:00
Jouni Malinen 9c1be553c8 tests: Invalid VENDOR command
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-12 00:10:52 +02:00
Jouni Malinen c2bf6d3afc tests: SIGNAL_POLL in 160 and 80+80 MHz channels
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 23:37:02 +02:00
Jouni Malinen f8423317b3 tests: WNM_SLEEP error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 23:03:10 +02:00
Jouni Malinen 08ba008c62 tests: AUTOSCAN reconfiguration while in SCANNING state
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 22:57:36 +02:00
Jouni Malinen 44c41cdf47 tests: Additional HS20_ICON_REQUEST coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 16:14:24 +02:00
Jouni Malinen ea215c54d0 tests: Additional coverage for HS20_GET_NAI_HOME_REALM_LIST
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 16:12:59 +02:00
Jouni Malinen 5e80b502ee tests: Additiona GAS_REQUEST/GAS_RESPONSE_GET coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen 1ca6d13dac tests: Make wep_open_auth less likely to fail due to old scan entry
Flush cfg80211 cached scan results to avoid getting any non-WEP matches
for the BSS.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-11 15:18:11 +02:00
Jouni Malinen ea68ed56b9 tests: Additional ANQP_GET and HS20_ANQP_GET error coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen 7e71fbc169 tests: INTERWORKING_CONNECT with invalid parameter
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen c62438b822 tests: Optimize p2p_persistent test cases
Number of unnecessary scan iterations can removed from these test cases
by specifying a single channel.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen c93b6706d2 tests: Additional P2P_REMOVE_CLIENT coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen 7387532549 tests: Additional coverage for P2P_EXT_LISTEN
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen bf1b59731a tests: Additional P2P_PRESENCE_REQ coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen d9f3bb1ad6 tests: ProxyARP ARP processing
This verifies processing of various ARP messages at an AP that enables
ProxyARP. All the validation steps have not yet been scripted, i.e., the
sniffer traces need manual analysis for full coverage.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-11 15:18:11 +02:00
Jouni Malinen 1872c52b8e tests: Additional P2P_SET coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen 25057d9227 tests: P2P cross connection
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen 7b7b201785 tests: Additional P2P_PEER coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-10 00:46:11 +02:00
Jouni Malinen 2fc4749c91 tests: Verify that EAP-FAST PAC and TLS session ticket was used
This provides a regression test that would have caught the recent
issue with tls_openssl.c change breaking EAP-FAST.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-09 23:47:47 +02:00
Jouni Malinen bccbd51a80 tests: Additional P2P_GROUP_ADD coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-09 23:03:27 +02:00
Jouni Malinen 1ede3d2268 tests: Invitation Request retry and duplicated response
This verifies that the corner case of a duplicated, retransmitted
Invitation Response frame ends up being dropped instead of being
processed twice for the case of Invitation Request getting resend with
social channel as an operating channel in case of no common channels
found.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-09 16:26:54 +02:00
Jouni Malinen c703a1da70 tests: Additional P2P SD coverage
This adds P2P_SERV_DISC_REQ, P2P_SERVICE_ADD, and P2P_SERVICE_DEL error
cases and P2P_SERVICE_FLUSH and P2P_SERC_DISC_EXTERNAL testing.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:23:24 +02:00
Jouni Malinen dd15d44884 tests: P2P_GET_PASSPHRASE in P2P Client mode
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:15:26 +02:00
Jouni Malinen e22335e5db tests: Invalid P2P_INVITE parameters
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:15:26 +02:00
Jouni Malinen edd1dfb2bd tests: Invalid P2P_REJECT command
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:15:26 +02:00
Jouni Malinen ca9b78add8 tests: Additional coverage for P2P_PROV_DISC
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:13:17 +02:00
Jouni Malinen 6da4a0af92 tests: P2P_LISTEN while interface is disabled
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:13:17 +02:00
Jouni Malinen 450e584f04 tests: Additional P2P_CONNECT coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 18:21:48 +02:00
Jouni Malinen 7457c63538 tests: Additional P2P_FIND parameter coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 17:56:47 +02:00
Jouni Malinen 5b2f1e2456 tests: Additional BSS and BSS_FLUSH ctrl_iface command coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 17:49:39 +02:00
Jouni Malinen 33d0b1579b tests: Optimize WPS tests by avoiding full scan
A single channel scan just before WPS_REG, WPS_PBC, and WPS_PIN commands
can be used to avoid having to run a full scan. This saves significant
amount of time in the WPS test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:07 +02:00
Jouni Malinen 934d5b0403 tests: P2P_GET_PASSPHRASE
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:07 +02:00
Jouni Malinen a5c43328d9 tests: Additional GET_CAPABILITY coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:07 +02:00
Jouni Malinen 80cb463463 tests: SAVE_CONFIG error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:07 +02:00
Jouni Malinen 76b7694177 tests: Multiple networks and cred removal
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:07 +02:00
Jouni Malinen 8c020b0f05 tests: Additional DUP_NETWORK coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:07 +02:00
Jouni Malinen 146374019a tests: Add missing test descriptions
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:06 +02:00
Jouni Malinen 5e2a8ec9e7 tests: wpa_supplicant ctrl_iface mesh command error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:06 +02:00
Jouni Malinen d463c5566f tests: Additional coverage for SCAN_RESULTS and BSS entry flags
This increases wpa_supplicant_ie_txt(), print_bss_info(), and
wpa_supplicant_ctrl_iface_scan_result() testing coverage to include the
previously missing key management options.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:06 +02:00
Jouni Malinen feb795d6d3 tests: wpa_supplicant ctrl_iface BSSID command error case
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:07:56 +02:00
Jouni Malinen 061c55a232 tests: Check STATUS mode field during P2P group formation
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:07:56 +02:00
Jouni Malinen 67966089a6 tests: wpa_supplicant ctrl_iface CTRL-RSP-
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:07:56 +02:00
Jouni Malinen ed685e43ab tests: IBSS_RSN control interface command
This verifies that IBSS_RSN <peer> return OK for the case where a valid
and already connection peer address is given.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:07:56 +02:00
Jouni Malinen 8e33f9c67f tests: wpa_supplicant WPS_AP_PIN random PIN timeout and error caes
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:07:56 +02:00
Jouni Malinen 1490eff500 tests: More coverage for WPS NFC error and uncommon cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:07:56 +02:00
Jouni Malinen e946c8e682 tests: Fix a typo in an error message
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:07:56 +02:00
Jouni Malinen b54f697019 tests: Remove test names from VM command with parallel-vm.py
There is no need to pass the test case names to the VMs when using
parallel-vm.py. Removing those from the command line helps in avoiding
kernel panic if maximum number of kernel parameters limit is hit.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-07 15:33:22 +02:00
Jouni Malinen 2f816c212c tests: Optimize FT test cases
Use single channel scan instead of full scan to save time. In addition,
use EAP-GPSK which takes significantly less CPU that EAP-EKE with
default parameters.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 17:12:30 +02:00
Jouni Malinen c337d07a1b tests: FT_DS with unknown target
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 17:05:46 +02:00
Jouni Malinen 7fd5fd03ac tests: TDLS teardown using wildcard address
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 16:56:14 +02:00
Jouni Malinen e61f90875b tests: Disabling WNM keep-alive and hostapd doing client poll
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 16:51:21 +02:00
Jouni Malinen 19ef208640 tests: wpa_supplicant ctrl_iface SET operations
This adds more test coverage for wpa_supplicant SET ctrl_iface command.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 16:29:08 +02:00
Jouni Malinen 556408940e tests: SET disallow_aps in P2P GO mode
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 16:21:10 +02:00
Jouni Malinen c1e33588b8 tests: Optimize WFD connect_cli() calls
There is no need to run full scan in these test cases, so use single
channel scan to save time.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 15:47:21 +02:00
Jouni Malinen f8fee78879 tests: WFD_SUBELEM_SET/GET with all parameter
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 15:47:20 +02:00