tests: Make RELOG command use global control interface
This allows RELOG to be used even if a wpa_supplicant process does not have any interfaces configured. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
ce9c8c4097
commit
5f797376f2
3 changed files with 5 additions and 2 deletions
|
@ -382,7 +382,7 @@ def main():
|
||||||
logger.info(e)
|
logger.info(e)
|
||||||
result = "FAIL"
|
result = "FAIL"
|
||||||
try:
|
try:
|
||||||
wpas = WpaSupplicant("wlan5", "/tmp/wpas-wlan5")
|
wpas = WpaSupplicant("/tmp/wpas-wlan5")
|
||||||
d.dump_monitor()
|
d.dump_monitor()
|
||||||
rename_log(args.logdir, 'log5', name, wpas)
|
rename_log(args.logdir, 'log5', name, wpas)
|
||||||
if not args.no_reset:
|
if not args.no_reset:
|
||||||
|
|
|
@ -834,7 +834,7 @@ class WpaSupplicant:
|
||||||
raise Exception("Association with the AP timed out")
|
raise Exception("Association with the AP timed out")
|
||||||
|
|
||||||
def relog(self):
|
def relog(self):
|
||||||
self.request("RELOG")
|
self.global_request("RELOG")
|
||||||
|
|
||||||
def wait_completed(self, timeout=10):
|
def wait_completed(self, timeout=10):
|
||||||
for i in range(0, timeout * 2):
|
for i in range(0, timeout * 2):
|
||||||
|
|
|
@ -7739,6 +7739,9 @@ char * wpa_supplicant_global_ctrl_iface_process(struct wpa_global *global,
|
||||||
if (wpas_module_tests() < 0)
|
if (wpas_module_tests() < 0)
|
||||||
reply_len = -1;
|
reply_len = -1;
|
||||||
#endif /* CONFIG_MODULE_TESTS */
|
#endif /* CONFIG_MODULE_TESTS */
|
||||||
|
} else if (os_strncmp(buf, "RELOG", 5) == 0) {
|
||||||
|
if (wpa_debug_reopen_file() < 0)
|
||||||
|
reply_len = -1;
|
||||||
} else {
|
} else {
|
||||||
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
|
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
|
||||||
reply_len = 16;
|
reply_len = 16;
|
||||||
|
|
Loading…
Reference in a new issue