]>
git.proxmox.com Git - mirror_lxcfs.git/blob - tests/cpusetrange.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
7 #ifndef FUSE_USE_VERSION
8 #define FUSE_USE_VERSION 26
11 #define _FILE_OFFSET_BITS 64
18 #include "../src/cpuset_parse.h"
20 static void verify(bool condition
) {
37 verify(cpu_in_cpuset(1, a
));
39 verify(cpu_in_cpuset(2, a
));
40 printf("NOT 4 in %s", a
);
41 verify(!cpu_in_cpuset(4, a
));
43 verify(cpu_in_cpuset(1, b
));
44 printf("NOT 4 in %s", b
);
45 verify(!cpu_in_cpuset(4, b
));
47 verify(cpu_in_cpuset(5, b
));
49 verify(cpu_in_cpuset(1, c
));
51 verify(cpu_in_cpuset(5, c
));
52 printf("NOT 6 in %s", c
);
53 verify(!cpu_in_cpuset(6, c
));
54 printf("NOT 6 in empty set");
55 verify(!cpu_in_cpuset(6, d
));
56 printf("NOT 6 in empty set(2)");
57 verify(!cpu_in_cpuset(6, e
));