aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/libwpa_test.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-11-23 21:55:33 (GMT)
committerJouni Malinen <j@w1.fi>2015-11-23 22:00:21 (GMT)
commit39c3c9b7dcde6f425a9a811a9c2dfcad89d8ead7 (patch)
tree51240465df68e5d2890201316dddd37c97a4fdee /wpa_supplicant/libwpa_test.c
parent1fff13a9cb21f13ddfefe8b4502daa0103a907dd (diff)
downloadhostap-39c3c9b7dcde6f425a9a811a9c2dfcad89d8ead7.zip
hostap-39c3c9b7dcde6f425a9a811a9c2dfcad89d8ead7.tar.gz
hostap-39c3c9b7dcde6f425a9a811a9c2dfcad89d8ead7.tar.bz2
Remove wpa_supplicant/tests
There was only a single file remaining in this directory. All the other old test functionality has been moved under the top level tests directory. Move the remaining file to the wpa_supplicant directory to get rid of the subdirectory. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/libwpa_test.c')
-rw-r--r--wpa_supplicant/libwpa_test.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/wpa_supplicant/libwpa_test.c b/wpa_supplicant/libwpa_test.c
new file mode 100644
index 0000000..e51ab72
--- /dev/null
+++ b/wpa_supplicant/libwpa_test.c
@@ -0,0 +1,32 @@
+/*
+ * libwpa_test - Test program for libwpa_client.* library linking
+ * Copyright (c) 2015, Jouni Malinen <j@w1.fi>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#include "includes.h"
+
+#include "common/wpa_ctrl.h"
+
+int main(int argc, char *argv[])
+{
+ struct wpa_ctrl *ctrl;
+
+ ctrl = wpa_ctrl_open("foo");
+ if (!ctrl)
+ return -1;
+ if (wpa_ctrl_attach(ctrl) == 0)
+ wpa_ctrl_detach(ctrl);
+ if (wpa_ctrl_pending(ctrl)) {
+ char buf[10];
+ size_t len;
+
+ len = sizeof(buf);
+ wpa_ctrl_recv(ctrl, buf, &len);
+ }
+ wpa_ctrl_close(ctrl);
+
+ return 0;
+}