Add counters for MPTP buffers and syscalls.
[swifty.git] / src / raw / test / test_sw_recvmsg.c
1 /*
2  * Test sw_recvmsg "syscall".
3  */
4
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include <string.h>
8 #include <sys/types.h>
9 #include <unistd.h>
10 #include <sys/socket.h>
11 #include <netinet/in.h>
12 #include <errno.h>
13
14 #include "swift_raw.h"
15 #include "swift_types.h"
16
17 #include "debug.h"
18 #include "util.h"
19
20 #include "test_sw.h"
21 #include "test.h"
22
23 static void recvmsg_dummy(void);
24 static void recvmsg_invalid_descriptor(void);
25 static void recvmsg_descriptor_is_not_a_socket(void);
26 static void recvmsg_socket_is_not_bound(void);
27 static void recvmsg_after_sendto_ok(void);
28 static void recvmsg_after_sendmsg_ok(void);
29
30 void recvmsg_test_suite(void)
31 {
32         start_suite();
33         recvmsg_dummy();
34
35         recvmsg_invalid_descriptor();
36         recvmsg_descriptor_is_not_a_socket();
37         recvmsg_socket_is_not_bound();
38         recvmsg_after_sendto_ok();
39         recvmsg_after_sendmsg_ok();
40 }
41
42 static void recvmsg_dummy(void) 
43 {
44         test(1 == 1);
45 }
46
47 static void recvmsg_invalid_descriptor(void)
48 {
49         test (1 == 0);
50 }
51 static void recvmsg_descriptor_is_not_a_socket(void)
52 {
53         test (1 == 0);
54 }
55 static void recvmsg_socket_is_not_bound(void)
56 {
57         test (1 == 0);
58 }
59 static void recvmsg_after_sendto_ok(void)
60 {
61         test (1 == 0);
62 }
63 static void recvmsg_after_sendmsg_ok(void)
64 {
65         test (1 == 0);
66 }