Commit graph

38 commits

Author SHA1 Message Date
Jouni Malinen
003716ec7b tests: Clear regdom changes more robustly in FST test cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 11:35:43 +02:00
Jouni Malinen
670d5eba05 tests: Fix FST scanning for non-FST APs
The sta2.scan() calls were performing full scan of all channels and
reporting only the BSS entry that happened to be the first one in the
wpa_supplicant list. This is problematic since it is possible that the
target AP was not found and incorrect BSS was selected and used for
setting scan_freq which made the connection fail. Furthermore, there is
no need to use full scan for these test cases, so use a single channel
scan instead.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-15 14:17:14 +02:00
Jouni Malinen
bc6e32880f tests: Remove extra semicolons from python scripts
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Janusz Dziedzic
8b8a1864ff tests: Pass full apdev to add_ap() function (1)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (1) converts the cases where apdev[#]['ifname'] was used as
the argument to hostapd.add_ap().

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:45:57 +03:00
Jouni Malinen
07a1e90487 tests: Fix FST cleanup if alloc_fail is not supported
The test cases fst_ap_start_session_oom and fst_setup_mbie_diff did not
clean up FST sessions properly in case alloc_fail failed due to missing
support for it in the build. This could result in abandoning attached
hostapd global control interface monitors and test case failures due to
the global control interface socket running out of output buffer.

Fix this by going through the cleanup steps even if alloc_fail raises
HwsimSkip exception.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-26 22:53:58 +02:00
Jouni Malinen
4bc2ffaaf8 tests: Use logger.info() instead of print in FST test cases
It is better to get these messages into the actual debug log instead of
hoping they will be noticed from stdout.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-30 13:40:58 +02:00
Anton Nayshtut
81822ce688 tests: Make FST tests aware of unconditional station's MB IE exposure
This syncs the test cases with the implementation change in station's MB
IE creation. FST tests should expect MB IE regardless of the station
connection state and whether the current connection is FST-enabled or
not. This fixes the follow test cases that started reporting failures
with the previous commit change in src/fst/fst_group.c:
fst_disconnect_1_of_2_stas_from_non_fst_ap
fst_sta_connect_to_non_fst_ap
fst_second_sta_connect_to_non_fst_ap
fst_disconnect_2_of_2_stas_from_non_fst_ap
fst_second_sta_connect_to_fst_ap
fst_disconnect_1_of_2_stas_from_fst_ap

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-23 20:36:54 +02:00
Jouni Malinen
119562cfdf tests: Clear FST sessions at the end of fst_setup_mbie_diff
This avoids issues with following test cases failing due to unexpected
starting state. This issue showed up with the following hwsim test case
sequence:
fst_setup_mbie_diff fst_dynamic_iface_attach

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-19 17:33:34 +02:00
Jouni Malinen
a8fd08f7fc tests: Fix FST tests to remove hostapd instance
These test cases added a new radio for the non-FST AP and while they
removed the radio itself, they did not remove the hostapd instance for
that radio. Remove that to avoid leaving behind invalid instances.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-16 22:42:55 +03:00
Jouni Malinen
d8aa603d53 tests: Skip fst_attach_wpas_error if no FST support
This check for FST testing support was forgotten from one of the new FST
test cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-28 18:56:33 +03:00
Jouni Malinen
898b33095e tests: FST SESSION_INITIATE and SESSION_RESPOND error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:45:14 +03:00
Jouni Malinen
78ca254237 tests: More FST GET_PEER_MBIES coverage
The case of valid but unknown peer address was not covered previously.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:45:13 +03:00
Jouni Malinen
54b227a1ff tests: Use a shared FST setup function
This removes quite a bit of duplicated code. In addition, this starts
using different FST group names to get additional coverage.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:45:13 +03:00
Jouni Malinen
5994658309 tests: FST attach errors in wpa_supplicant
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:12:09 +03:00
Jouni Malinen
6e2536fc79 tests: FST Setup Request processing and OOM during MBIE update
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:12:09 +03:00
Jouni Malinen
2fffbd4db8 tests: FST setup multiple times
This verifies FST group dialog_token wrap-around and behavior with large
number of session setups and teardowns.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:12:09 +03:00
Jouni Malinen
3aa1ca9aec tests: Additional FST Setup test coverage
This adds a test case that goes through session initialization through
separate commands that can be modified more easily for special case. The
first such special case is using special FST Setup Request frames with
non-standard MBIE contents to hit different code paths for finding the
interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:12:08 +03:00
Jouni Malinen
9162eed42b tests: Extend fst_ap_ctrl_iface to support existing groups
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:12:08 +03:00
Jouni Malinen
6c247100e8 tests: FST protocol tests to verify invalid STIE header
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 11:22:21 +03:00
Jouni Malinen
3b765ea545 tests: FST-MANAGER TEST_REQUEST error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 19:29:39 +03:00
Jouni Malinen
7ba240b90f tests: FST protocol testing for Ack Response
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 19:08:06 +03:00
Jouni Malinen
ca73f7d2d0 tests: FST protocol testing for Setup Response
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 19:06:31 +03:00
Jouni Malinen
6b294e57a5 tests: Speed up fst_proto by waiting for MGMT-TX-STATUS event
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 19:05:31 +03:00
Jouni Malinen
4390030a51 tests: FST-MANAGER TEST_REQUEST GET_FSTS_ID and ID not found
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 17:23:55 +03:00
Jouni Malinen
e84297a8e6 tests: FST-MANAGER SESSION_RESPOND failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 17:23:55 +03:00
Jouni Malinen
feb64551d9 tests: FST-MANAGER SESSION_ADD OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 17:23:55 +03:00
Jouni Malinen
f067a05589 tests: FST-MANAGER SESSION_SET parameter parsing error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 17:23:55 +03:00
Jouni Malinen
a248e29dac tests: FST-ATTACH OOM in fst_iface_create()
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 11:13:20 +03:00
Jouni Malinen
3da112c5af tests: Use direct fst_test_common access
There is no need to go through fst_module_aux to reach fst_test_common
since both of these get imported here.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 11:02:46 +03:00
Jouni Malinen
febd7a4c40 tests: FST attach with llt=0
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 11:01:44 +03:00
Jouni Malinen
f752fd9264 tests: FST session create OOM
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-17 19:14:15 +03:00
Jouni Malinen
19a0602d86 tests: FST send action OOM
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-17 19:14:15 +03:00
Jouni Malinen
d99ed42a15 tests: FST AP configuration and OOM
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-17 19:14:15 +03:00
Jouni Malinen
5e2ad41da3 tests: FST protocol testing
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-17 19:14:15 +03:00
Jouni Malinen
85eb89fe56 tests: FST with RSN
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-16 18:26:16 +03:00
Jouni Malinen
86ba832cf2 tests: FST AP setup failing due to OOM
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-16 18:26:16 +03:00
Jouni Malinen
d6d549c47c tests: FST control interface behavior
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-16 18:26:16 +03:00
Anton Nayshtut
41a256ecd9 tests: Add FST module tests
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-16 18:26:16 +03:00