From fe011a59a4b6fe2879f2c2354e8771c3f8aad6aa Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Mon, 16 Dec 2013 13:13:14 -0600 Subject: sptests/spcpuset*: Add tests for fixed size cpu_set_t operations. This adds five tests for . It does not include tests for CPU_XXX_S methods. The autotools should be able to avoid enabling the tests unless the toolset has . --- testsuites/sptests/spcpuset01/init.c | 155 +++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 testsuites/sptests/spcpuset01/init.c (limited to 'testsuites/sptests/spcpuset01/init.c') diff --git a/testsuites/sptests/spcpuset01/init.c b/testsuites/sptests/spcpuset01/init.c new file mode 100644 index 0000000000..fa0e6a8d7c --- /dev/null +++ b/testsuites/sptests/spcpuset01/init.c @@ -0,0 +1,155 @@ +/* + * Fully exercise CPU_SET() methods + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#define CONFIGURE_INIT +#include +#include +#include +#include + +#include +#include "system.h" + +static void test_cpu_zero_case_1(void) +{ + size_t i; + + /* + * Set to all zeros and verify + */ + puts( "Exercise CPU_ZERO, CPU_ISSET, and CPU_COUNT" ); + CPU_ZERO(&set3); + + /* test if all bits clear */ + for (i=0 ; i