2005-09-19 15:44:31 +02:00
|
|
|
|
2005-04-21 16:53:53 +02:00
|
|
|
#include <stdio.h>
|
2008-10-01 17:09:33 +02:00
|
|
|
#include <minix/endpoint.h>
|
|
|
|
#include <minix/sys_config.h>
|
2011-08-26 15:16:16 +02:00
|
|
|
#define MAX_ERROR 1
|
|
|
|
#include "common.c"
|
|
|
|
|
|
|
|
_PROTOTYPE( void test39a, (void) );
|
2008-10-01 17:09:33 +02:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2011-08-26 15:16:16 +02:00
|
|
|
start(39);
|
2011-11-28 11:07:55 +01:00
|
|
|
test39a();
|
2011-08-26 15:16:16 +02:00
|
|
|
quit();
|
2011-11-28 11:07:55 +01:00
|
|
|
return(-1); /* Unreachable */
|
2011-08-26 15:16:16 +02:00
|
|
|
}
|
2008-10-01 17:09:33 +02:00
|
|
|
|
2011-08-26 15:16:16 +02:00
|
|
|
void test39a()
|
|
|
|
{
|
|
|
|
int g, p;
|
2005-09-19 15:44:31 +02:00
|
|
|
|
2011-08-26 15:16:16 +02:00
|
|
|
subtest = 1;
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2011-08-26 15:16:16 +02:00
|
|
|
for (g = 0; g <= _ENDPOINT_MAX_GENERATION; g++) {
|
|
|
|
for (p = -MAX_NR_TASKS; p < _NR_PROCS; p++) {
|
|
|
|
endpoint_t ept;
|
|
|
|
int mg, mp;
|
|
|
|
ept = _ENDPOINT(g, p);
|
|
|
|
mg = _ENDPOINT_G(ept);
|
|
|
|
mp = _ENDPOINT_P(ept);
|
|
|
|
if (mg != g || mp != p) e(1);
|
|
|
|
if (g == 0 && ept != p) e(2);
|
|
|
|
if (ept == ANY || ept == SELF || ept == NONE) e(3);
|
|
|
|
}
|
|
|
|
}
|
2005-04-21 16:53:53 +02:00
|
|
|
}
|