From: Ben Gras Date: Tue, 7 Mar 2006 15:44:00 +0000 (+0000) Subject: Improved test constant X-Git-Tag: v3.1.2a~291 X-Git-Url: http://zhaoyanbai.com/repos/icons/valid-xhtml10.png?a=commitdiff_plain;h=18df4cb859e2e0d991c723e3fd8560b42b68a0c5;p=minix.git Improved test constant --- diff --git a/test/test41.c b/test/test41.c index 8d44a5c65..bfd8cdab3 100644 --- a/test/test41.c +++ b/test/test41.c @@ -1,6 +1,7 @@ #include #include +#include int main(int argc, char *argv[]) { @@ -9,7 +10,7 @@ int main(int argc, char *argv[]) printf("Test 41 "); for(g = 0; g <= _ENDPOINT_MAX_GENERATION; g++) { - for(p = -NR_TASKS; p <= _ENDPOINT_MAX_PROC; p++) { + for(p = -NR_TASKS; p < _NR_PROCS; p++) { int e, mg, mp; e = _ENDPOINT(g, p); mg = _ENDPOINT_G(e); @@ -18,9 +19,14 @@ int main(int argc, char *argv[]) printf("%d != %d || %d != %d\n", mg, g, mp, p); return 1; } + if(g == 0 && e != p) { + printf("%d != %d and g=0\n", e, p); + return 1; + } if(e == ANY || e == SELF || e == NONE) { - printf("endpoint is %d; ANY, SELF or NONE\n", - e); + printf("endpoint (%d,%d) is %d; ANY, SELF or NONE\n", + g, p, e); + return 1; } } }