console-socket: Add an optional component to UNIX socket abstract names
Allows multiple instances of obmc-console-server to run concurrently
without interfering with each other.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I7ef9c14e554c687e8d606e1eaaed82a7f1c06d98
diff --git a/test/test-client-escape.c b/test/test-client-escape.c
index 76e9c15..eeae015 100644
--- a/test/test-client-escape.c
+++ b/test/test-client-escape.c
@@ -18,11 +18,12 @@
#include <stdint.h>
#include <stdio.h>
-#define main __main
#define read __read
+#include "console-socket.c"
+#define main __main
#include "console-client.c"
-#undef main
#undef read
+#undef main
struct test {
enum esc_type esc_type;
@@ -153,11 +154,6 @@
struct test_ctx ctxs[ARRAY_SIZE(tests)];
-/* stubs for console socket */
-const char *console_socket_path = "";
-const size_t console_socket_path_len = 1;
-const char *console_socket_path_readable = 0;
-
int write_buf_to_fd(int fd, const uint8_t *buf, size_t len)
{
struct test_ctx *ctx = &ctxs[fd];