20 CPU_AND (&s3
, &s1
, &s2
);
21 if (! CPU_EQUAL (&s3
, &s1
))
23 puts ("result of CPU_AND wrong");
27 CPU_OR (&s3
, &s1
, &s2
);
28 if (! CPU_EQUAL (&s3
, &s2
))
30 puts ("result of CPU_OR wrong");
34 CPU_XOR (&s3
, &s1
, &s2
);
35 if (CPU_COUNT (&s3
) != 1)
37 puts ("result of CPU_XOR wrong");
41 cpu_set_t
*vs1
= CPU_ALLOC (2048);
42 cpu_set_t
*vs2
= CPU_ALLOC (2048);
43 cpu_set_t
*vs3
= CPU_ALLOC (2048);
44 size_t vssize
= CPU_ALLOC_SIZE (2048);
46 CPU_ZERO_S (vssize
, vs1
);
47 CPU_SET_S (0, vssize
, vs1
);
49 CPU_ZERO_S (vssize
, vs2
);
50 CPU_SET_S (0, vssize
, vs2
);
51 CPU_SET_S (2047, vssize
, vs2
);
53 CPU_AND_S (vssize
, vs3
, vs1
, vs2
);
54 if (! CPU_EQUAL_S (vssize
, vs3
, vs1
))
56 puts ("result of CPU_AND_S wrong");
60 CPU_OR_S (vssize
, vs3
, vs1
, vs2
);
61 if (! CPU_EQUAL_S (vssize
, vs3
, vs2
))
63 puts ("result of CPU_OR_S wrong");
67 CPU_XOR_S (vssize
, vs3
, vs1
, vs2
);
68 if (CPU_COUNT_S (vssize
, vs3
) != 1)
70 puts ("result of CPU_XOR_S wrong");
81 #define TEST_FUNCTION do_test ()
82 #include "../test-skeleton.c"