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>
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>
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>
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>
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>
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>
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>
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>
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>
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>