11 #include <minix/config.h>
12 #include <minix/com.h>
13 #include <minix/type.h>
14 #include <minix/const.h>
15 #include <minix/endpoint.h>
16 #include <minix/safecopies.h>
17 #include <minix/syslib.h>
18 #include <minix/sysutil.h>
21 #define TEST_PAGE_NUM 4
22 #define BUF_SIZE (TEST_PAGE_NUM * CLICK_SIZE)
23 #define BUF_START_REQUESTOR 10
24 #define BUF_START_GRANTOR 20
26 #define FIFO_REQUESTOR "/usr/src/test/safemap/1fifo"
27 #define FIFO_GRANTOR "/usr/src/test/safemap/2fifo"
29 #define FIFO_WAIT(fid) { \
31 if(read(fid, &a, sizeof(a)) != sizeof(a)) \
32 panic( "FIFO_WAIT failed"); \
34 #define FIFO_NOTIFY(fid) { \
36 if(write(fid, &a, sizeof(a)) != sizeof(a)) \
37 panic( "FIFO_NOTIFY failed"); \
40 #define CHECK_TEST(who, result, expected, test_name) { \
41 printf("%-9s: test %s %s\n", who, test_name, \
42 (expected == result ? "succeeded" : "failed")); \
43 if(expected != result) { \
50 # define dprint printf
52 # define dprint (void)