aboutsummaryrefslogtreecommitdiff
path: root/posix/tst-cpuset.c
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2017-06-08 15:39:03 -0400
committerZack Weinberg <zackw@panix.com>2017-06-08 15:39:03 -0400
commit5046dbb4a7eba5eccfd258f92f4735c9ffc8d069 (patch)
tree4470480d904b65cf14ca524f96f79eca818c3eaf /posix/tst-cpuset.c
parent199fc19d3aaaf57944ef036e15904febe877fc93 (diff)
downloadglibc-zack/build-layout-experiment.tar
glibc-zack/build-layout-experiment.tar.gz
glibc-zack/build-layout-experiment.tar.bz2
glibc-zack/build-layout-experiment.zip
Prepare for radical source tree reorganization.zack/build-layout-experiment
All top-level files and directories are moved into a temporary storage directory, REORG.TODO, except for files that will certainly still exist in their current form at top level when we're done (COPYING, COPYING.LIB, LICENSES, NEWS, README), all old ChangeLog files (which are moved to the new directory OldChangeLogs, instead), and the generated file INSTALL (which is just deleted; in the new order, there will be no generated files checked into version control).
Diffstat (limited to 'posix/tst-cpuset.c')
-rw-r--r--posix/tst-cpuset.c82
1 files changed, 0 insertions, 82 deletions
diff --git a/posix/tst-cpuset.c b/posix/tst-cpuset.c
deleted file mode 100644
index d736793222..0000000000
--- a/posix/tst-cpuset.c
+++ /dev/null
@@ -1,82 +0,0 @@
-#include <sched.h>
-#include <stdio.h>
-
-static int
-do_test (void)
-{
- int result = 0;
-
- cpu_set_t s1;
- cpu_set_t s2;
- cpu_set_t s3;
-
- CPU_ZERO (&s1);
- CPU_SET (0, &s1);
-
- CPU_ZERO (&s2);
- CPU_SET (0, &s2);
- CPU_SET (1, &s2);
-
- CPU_AND (&s3, &s1, &s2);
- if (! CPU_EQUAL (&s3, &s1))
- {
- puts ("result of CPU_AND wrong");
- result = 1;
- }
-
- CPU_OR (&s3, &s1, &s2);
- if (! CPU_EQUAL (&s3, &s2))
- {
- puts ("result of CPU_OR wrong");
- result = 1;
- }
-
- CPU_XOR (&s3, &s1, &s2);
- if (CPU_COUNT (&s3) != 1)
- {
- puts ("result of CPU_XOR wrong");
- result = 1;
- }
-
- cpu_set_t *vs1 = CPU_ALLOC (2048);
- cpu_set_t *vs2 = CPU_ALLOC (2048);
- cpu_set_t *vs3 = CPU_ALLOC (2048);
- size_t vssize = CPU_ALLOC_SIZE (2048);
-
- CPU_ZERO_S (vssize, vs1);
- CPU_SET_S (0, vssize, vs1);
-
- CPU_ZERO_S (vssize, vs2);
- CPU_SET_S (0, vssize, vs2);
- CPU_SET_S (2047, vssize, vs2);
-
- CPU_AND_S (vssize, vs3, vs1, vs2);
- if (! CPU_EQUAL_S (vssize, vs3, vs1))
- {
- puts ("result of CPU_AND_S wrong");
- result = 1;
- }
-
- CPU_OR_S (vssize, vs3, vs1, vs2);
- if (! CPU_EQUAL_S (vssize, vs3, vs2))
- {
- puts ("result of CPU_OR_S wrong");
- result = 1;
- }
-
- CPU_XOR_S (vssize, vs3, vs1, vs2);
- if (CPU_COUNT_S (vssize, vs3) != 1)
- {
- puts ("result of CPU_XOR_S wrong");
- result = 1;
- }
-
- CPU_FREE (vs1);
- CPU_FREE (vs2);
- CPU_FREE (vs3);
-
- return result;
-}
-
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"