aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-05-26 21:03:06 (GMT)
committerJouni Malinen <j@w1.fi>2014-05-26 21:03:06 (GMT)
commitf347935f0d44cfc27773c4431f32aba893a880eb (patch)
treecc1aec003cc45ffe2b095037360465bb272ca57d /src/utils
parenta3fe74bde154517cd29b6a04785a6cb29af089e2 (diff)
downloadhostap-f347935f0d44cfc27773c4431f32aba893a880eb.zip
hostap-f347935f0d44cfc27773c4431f32aba893a880eb.tar.gz
hostap-f347935f0d44cfc27773c4431f32aba893a880eb.tar.bz2
tests: Unit tests for WPA_TRACE
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/utils_module_tests.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/utils/utils_module_tests.c b/src/utils/utils_module_tests.c
index 1e16090..75b169e 100644
--- a/src/utils/utils_module_tests.c
+++ b/src/utils/utils_module_tests.c
@@ -11,6 +11,7 @@
#include "utils/common.h"
#include "utils/bitfield.h"
#include "utils/ext_password.h"
+#include "utils/trace.h"
struct printf_test_data {
@@ -220,6 +221,17 @@ static int ext_password_tests(void)
}
+static int trace_tests(void)
+{
+ wpa_printf(MSG_INFO, "trace tests");
+
+ wpa_trace_show("test backtrace");
+ wpa_trace_dump_funcname("test funcname", trace_tests);
+
+ return 0;
+}
+
+
int utils_module_tests(void)
{
int ret = 0;
@@ -228,6 +240,7 @@ int utils_module_tests(void)
if (printf_encode_decode_tests() < 0 ||
ext_password_tests() < 0 ||
+ trace_tests() < 0 ||
bitfield_tests() < 0 ||
int_array_tests() < 0)
ret = -1;