Add the bytes field in the mptp_dest structure.
[swifty.git] / src / kernel / test / test_recvmsg.c
1 /*
2  * Test 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_types.h"
15
16 #include "debug.h"
17 #include "util.h"
18
19 #include "test_sw.h"
20 #include "test.h"
21
22 static void recvmsg_dummy(void);
23 static void recvmsg_invalid_descriptor(void);
24 static void recvmsg_descriptor_is_not_a_socket(void);
25 static void recvmsg_socket_is_not_bound(void);
26 static void recvmsg_after_sendto_ok(void);
27 static void recvmsg_after_sendmsg_ok(void);
28
29 void recvmsg_test_suite(void)
30 {
31         start_suite();
32         recvmsg_dummy();
33
34         recvmsg_invalid_descriptor();
35         recvmsg_descriptor_is_not_a_socket();
36         recvmsg_socket_is_not_bound();
37         recvmsg_after_sendto_ok();
38         recvmsg_after_sendmsg_ok();
39 }
40
41 static void recvmsg_dummy(void) 
42 {
43         test(1 == 1);
44 }
45
46 static void recvmsg_invalid_descriptor(void)
47 {
48         test (1 == 0);
49 }
50 static void recvmsg_descriptor_is_not_a_socket(void)
51 {
52         test (1 == 0);
53 }
54 static void recvmsg_socket_is_not_bound(void)
55 {
56         test (1 == 0);
57 }
58 static void recvmsg_after_sendto_ok(void)
59 {
60         test (1 == 0);
61 }
62 static void recvmsg_after_sendmsg_ok(void)
63 {
64         test (1 == 0);
65 }