Commit Graph

10 Commits (vlan_per_psk)

Author SHA1 Message Date
Johannes Berg fde38cac8a tests: test_fst_config: Convert FstLauncher to context manager
Using __del__ for any kind of cleanup is not a good idea
as it's not guaranteed to be called at any particular time,
it's only called whenever the next garbage collect cycle
kicks in.

Use a context manager instead, which basically removes the
need for the try/finally and fixes the reliance on __del__.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years ago
Jouni Malinen fab49f6145 tests: Python coding style cleanup (pylint3 bad-whitespace)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years ago
Jouni Malinen e50c58e585 tests: Replace file() with open() to work with python3
Signed-off-by: Jouni Malinen <j@w1.fi>
5 years ago
Masashi Honma bab493b904 tests: Use python3 compatible "except" statement
This patch is made by using 2to3 command.

$ find . -name *.py | xargs 2to3 -f except -w -n

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
5 years ago
Jouni Malinen 003716ec7b tests: Clear regdom changes more robustly in FST test cases
Signed-off-by: Jouni Malinen <j@w1.fi>
5 years ago
Jouni Malinen d952f02136 tests: Make FST kill_pid() more robust
It looks like the attempt to read the process id from a PID file can
return empty data. This resulted in kill_pid() failing to kill the
process and all the following FST test cases using the extra interface
failing. While the PID file is really supposed to have a valid PID value
when we get this far, it is better to try multiple times to avoid
failing large number of test cases.

The current os_daemonize() implementation ends up calling daemon() first
and then writing the PID file from the remaining process that is running
in the background. This leaves a short race condition where an external
process that started hostapd/wpa_supplicant could end up trying to read
the PID file before it has been written.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen f27b9277d5 tests: Make FST config tests more robust and easier to debug
It looks like it is possible for the separate started wpa_supplicant
process to remain running after a test case like fst_sta_config_default.
This would result in failures to run any following test case that uses
the wlan5 interface. Try to kill the process more thoroughly by waiting
for the PID file to show up and write more details into the logs to make
it easier to debug issues in this area.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen bc6e32880f tests: Remove extra semicolons from python scripts
Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago
Jouni Malinen 7b7e8a2ee7 tests: Use codecov build hostapd/wpa_supplicant in FST tests
Try to use the special build for --codecov purposes, if present, instead
of hardcoding the hostapd/wpa_supplicant binary to the default location.
This is needed to collect code coverage correctly.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years ago
Anton Nayshtut 41a256ecd9 tests: Add FST module tests
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years ago