vm: use arch_map2str to print pagefault info, to properly display code addrs
[minix.git] / test / test39.c
blob9287761536bf35a8ce87950390ecf89f71f4778c
2 #include <stdio.h>
3 #include <minix/endpoint.h>
4 #include <minix/sys_config.h>
6 int main(int argc, char *argv[])
8 int g, p;
10 printf("Test 39 ");
12 for(g = 0; g <= _ENDPOINT_MAX_GENERATION; g++) {
13 for(p = -MAX_NR_TASKS; p < _NR_PROCS; p++) {
14 endpoint_t e;
15 int mg, mp;
16 e = _ENDPOINT(g, p);
17 mg = _ENDPOINT_G(e);
18 mp = _ENDPOINT_P(e);
19 if(mg != g || mp != p) {
20 printf("%d != %d || %d != %d\n", mg, g, mp, p);
21 return 1;
23 if(g == 0 && e != p) {
24 printf("%d != %d and g=0\n", e, p);
25 return 1;
27 if(e == ANY || e == SELF || e == NONE) {
28 printf("endpoint (%d,%d) is %d; ANY, SELF or NONE\n",
29 g, p, e);
30 return 1;
35 printf("ok\n");
37 return 0;