net_tests_SOURCES = \
$(common_SOURCES) \
net.tests.c \
+ $(top_srcdir)/src/net/cache.c \
$(top_srcdir)/src/net/send.c \
- $(top_srcdir)/src/net/wait.c
+ $(top_srcdir)/src/net/wait.c \
+ $(top_srcdir)/src/peer/init.c
opt_tests_SOURCES = \
$(common_SOURCES) \
static void net_send_basic_test();
static void net_wait_basic_test();
+static int read_socket;
+static int write_socket;
+
int main() {
setup_env();
net_send_basic_test();
+ net_wait_basic_test();
clean_env();
close(sock);
}
-static int setup_socket() {
- return -1;
+static int setup_sockets() {
+ int sock = socket(AF_UNIX,SOCK_STREAM,0);
+ assert(sock!=-1);
+
+ assert(0==bind(sock,
+
+ return sock;
}