Test fixes
Added test41, for endpoint macros
This commit is contained in:
parent
7d83ef196d
commit
7475a433bb
|
@ -7,7 +7,7 @@ OBJ= test1 test2 test3 test4 test5 test6 test7 test8 test9 \
|
|||
test10 test12 test13 test14 test15 test16 test17 test18 test19 \
|
||||
test21 test22 test23 test25 test26 test27 test28 test29 \
|
||||
test30 test31 test32 test34 test35 test36 test37 test38 test39 \
|
||||
test40 t10a t11a t11b
|
||||
test40 test41 t10a t11a t11b
|
||||
|
||||
BIGOBJ= test20 test24
|
||||
ROOTOBJ= test11 test33
|
||||
|
@ -75,3 +75,4 @@ test37: test37.c
|
|||
test38: test38.c
|
||||
test39: test39.c
|
||||
test40: test40.c
|
||||
test41: test41.c
|
||||
|
|
4
test/run
4
test/run
|
@ -12,14 +12,14 @@ badones= # list of tests that failed
|
|||
|
||||
# Print test welcome message
|
||||
clr
|
||||
echo "Running POSIX compliance test suite. There are 42 tests in total."
|
||||
echo "Running POSIX compliance test suite. There are 43 tests in total."
|
||||
echo "The last few tests may take up to 15 minutes each, even on fast"
|
||||
echo "systems."
|
||||
echo " "
|
||||
|
||||
# Run all the tests, keeping track of who failed.
|
||||
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 \
|
||||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 \
|
||||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 \
|
||||
sh1.sh sh2.sh
|
||||
do total=`expr $total + 1`
|
||||
if ./test$i
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
int iteration, cumsig, subtest, errct = 0, sig1, sig2;
|
||||
|
||||
int sigarray[SIGS] = {SIGHUP, SIGILL, SIGTRAP, SIGABRT, SIGIOT, SIGUNUSED,
|
||||
int sigarray[SIGS] = {SIGHUP, SIGILL, SIGTRAP, SIGABRT, SIGIOT,
|
||||
SIGFPE, SIGUSR1, SIGSEGV, SIGUSR2, SIGPIPE, SIGALRM,
|
||||
SIGTERM};
|
||||
|
||||
|
@ -123,7 +123,6 @@ void test37a()
|
|||
if (sigismember(&s, SIGTRAP) != 0) e(6);
|
||||
if (sigismember(&s, SIGABRT) != 0) e(7);
|
||||
if (sigismember(&s, SIGIOT) != 0) e(8);
|
||||
if (sigismember(&s, SIGUNUSED) != 0) e(9);
|
||||
if (sigismember(&s, SIGFPE) != 0) e(10);
|
||||
if (sigismember(&s, SIGKILL) != 0) e(11);
|
||||
if (sigismember(&s, SIGUSR1) != 0) e(12);
|
||||
|
@ -144,7 +143,6 @@ void test37a()
|
|||
if (sigismember(&s, SIGTRAP) != 1) e(26);
|
||||
if (sigismember(&s, SIGABRT) != 1) e(27);
|
||||
if (sigismember(&s, SIGIOT) != 1) e(28);
|
||||
if (sigismember(&s, SIGUNUSED) != 1) e(29);
|
||||
if (sigismember(&s, SIGFPE) != 1) e(30);
|
||||
if (sigismember(&s, SIGKILL) != 1) e(31);
|
||||
if (sigismember(&s, SIGUSR1) != 1) e(32);
|
||||
|
@ -172,7 +170,6 @@ void test37a()
|
|||
/* The others should be turned off. */
|
||||
if (sigismember(&s, SIGABRT) != 0) e(50);
|
||||
if (sigismember(&s, SIGIOT) != 0) e(51);
|
||||
if (sigismember(&s, SIGUNUSED) != 0) e(52);
|
||||
if (sigismember(&s, SIGFPE) != 0) e(53);
|
||||
if (sigismember(&s, SIGKILL) != 0) e(54);
|
||||
if (sigismember(&s, SIGUSR1) != 0) e(55);
|
||||
|
@ -196,7 +193,6 @@ void test37a()
|
|||
if (sigismember(&s, SIGTRAP) != 0) e(71);
|
||||
if (sigismember(&s, SIGABRT) != 0) e(72);
|
||||
if (sigismember(&s, SIGIOT) != 0) e(73);
|
||||
if (sigismember(&s, SIGUNUSED) != 0) e(74);
|
||||
if (sigismember(&s, SIGFPE) != 0) e(75);
|
||||
if (sigismember(&s, SIGKILL) != 0) e(76);
|
||||
if (sigismember(&s, SIGUSR1) != 0) e(77);
|
||||
|
|
32
test/test41.c
Normal file
32
test/test41.c
Normal file
|
@ -0,0 +1,32 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <minix/endpoint.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int g, p;
|
||||
|
||||
printf("Test 41 ");
|
||||
|
||||
for(g = 0; g <= _ENDPOINT_MAX_GENERATION; g++) {
|
||||
for(p = -NR_TASKS; p <= _ENDPOINT_MAX_PROC; p++) {
|
||||
int e, mg, mp;
|
||||
e = _ENDPOINT(g, p);
|
||||
mg = _ENDPOINT_G(e);
|
||||
mp = _ENDPOINT_P(e);
|
||||
if(mg != g || mp != p) {
|
||||
printf("%d != %d || %d != %d\n", mg, g, mp, p);
|
||||
return 1;
|
||||
}
|
||||
if(e == ANY || e == SELF || e == NONE) {
|
||||
printf("endpoint is %d; ANY, SELF or NONE\n",
|
||||
e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
printf("ok\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in a new issue