Replace previous change by different test
[minix.git] / test / test39.c
blobf8b3f4fedfe2a858e01c167c6f34af9396cfae67
2 #include <stdio.h>
3 #include <minix/endpoint.h>
4 #include <minix/sys_config.h>
5 #define MAX_ERROR 1
6 #include "common.c"
8 void test39a(void);
10 int main(int argc, char *argv[])
12 start(39);
13 test39a();
14 quit();
15 return(-1); /* Unreachable */
18 void test39a()
20 int g, p;
22 subtest = 1;
24 for (g = 0; g <= _ENDPOINT_MAX_GENERATION; g++) {
25 for (p = -MAX_NR_TASKS; p < _NR_PROCS; p++) {
26 endpoint_t ept;
27 int mg, mp;
28 ept = _ENDPOINT(g, p);
29 mg = _ENDPOINT_G(ept);
30 mp = _ENDPOINT_P(ept);
31 if (mg != g || mp != p) e(1);
32 if (g == 0 && ept != p) e(2);
33 if (ept == ANY || ept == SELF || ept == NONE) e(3);