diff options
| author | Dmitry Shmidt <dimitrysh@google.com> | 2014-02-21 11:22:49 -0800 |
|---|---|---|
| committer | Dmitry Shmidt <dimitrysh@google.com> | 2014-02-21 11:22:49 -0800 |
| commit | 7f93d6fa14a343127754c33a03cf2f641b6ff6e4 (patch) | |
| tree | edf8a93f73c45c8bfa9beae9d470224f3bcf72e9 /hostapd | |
| parent | 745be3f298f4a0899238a99d96b7ed804edd3329 (diff) | |
| download | android_external_wpa_supplicant_8-7f93d6fa14a343127754c33a03cf2f641b6ff6e4.tar.gz android_external_wpa_supplicant_8-7f93d6fa14a343127754c33a03cf2f641b6ff6e4.tar.bz2 android_external_wpa_supplicant_8-7f93d6fa14a343127754c33a03cf2f641b6ff6e4.zip | |
Cumulative patch from commit aef5047acc971c97622c85236f0cd84d169221e6
aef5047 P2P: Fix missing eloop_cancel_timeout in invitation trigger
3cdcb34 tests: Add module tests for WPS attribute parsing
da179bd WPS: Fix parsing of 0-length WFA vendor extension subelement
211d7ab P2P: Add even more debug prints for Probe Request in non-Listen state
Change-Id: Ifbdb1c8aa74906aaf60cb5be025dd7f02bb07c6e
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'hostapd')
| -rw-r--r-- | hostapd/Makefile | 5 | ||||
| -rw-r--r-- | hostapd/ctrl_iface.c | 6 | ||||
| -rw-r--r-- | hostapd/hapd_module_tests.c | 17 |
3 files changed, 28 insertions, 0 deletions
diff --git a/hostapd/Makefile b/hostapd/Makefile index 111e8c30..25c560f2 100644 --- a/hostapd/Makefile +++ b/hostapd/Makefile @@ -70,6 +70,11 @@ NEED_SHA1=y OBJS += ../src/drivers/drivers.o CFLAGS += -DHOSTAPD +ifdef CONFIG_MODULE_TESTS +CFLAGS += -DCONFIG_MODULE_TESTS +OBJS += hapd_module_tests.o +endif + ifdef CONFIG_WPA_TRACE CFLAGS += -DWPA_TRACE OBJS += ../src/utils/trace.o diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index 4a9da5f6..7f5de625 100644 --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c @@ -1650,6 +1650,12 @@ static void hostapd_global_ctrl_iface_receive(int sock, void *eloop_ctx, } else if (os_strncmp(buf, "REMOVE ", 7) == 0) { if (hostapd_ctrl_iface_remove(interfaces, buf + 7) < 0) reply_len = -1; +#ifdef CONFIG_MODULE_TESTS + } else if (os_strcmp(buf, "MODULE_TESTS") == 0) { + int hapd_module_tests(void); + if (hapd_module_tests() < 0) + reply_len = -1; +#endif /* CONFIG_MODULE_TESTS */ } else { wpa_printf(MSG_DEBUG, "Unrecognized global ctrl_iface command " "ignored"); diff --git a/hostapd/hapd_module_tests.c b/hostapd/hapd_module_tests.c new file mode 100644 index 00000000..f7887ebf --- /dev/null +++ b/hostapd/hapd_module_tests.c @@ -0,0 +1,17 @@ +/* + * hostapd module tests + * Copyright (c) 2014, Jouni Malinen <j@w1.fi> + * + * This software may be distributed under the terms of the BSD license. + * See README for more details. + */ + +#include "utils/includes.h" + +#include "utils/common.h" + +int hapd_module_tests(void) +{ + wpa_printf(MSG_INFO, "hostapd module tests"); + return 0; +} |
