test: add explicit test cases for cpu_set_add() and cpu_set_add_range()
cpu_set_add_range() is used in parse_cpu_set(), hence already tested. But it is better to test these functions explicitly. For CID#1611787 and CID#1611788, that should be false-positive.
This commit is contained in:
@@ -179,7 +179,7 @@ int cpu_set_add_set(CPUSet *c, const CPUSet *src) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int cpu_set_add_range(CPUSet *c, size_t start, size_t end) {
|
||||
int cpu_set_add_range(CPUSet *c, size_t start, size_t end) {
|
||||
int r;
|
||||
|
||||
assert(c);
|
||||
|
||||
@@ -24,6 +24,7 @@ void cpu_set_done(CPUSet *c);
|
||||
int cpu_set_realloc(CPUSet *c, size_t n);
|
||||
int cpu_set_add(CPUSet *c, size_t i);
|
||||
int cpu_set_add_set(CPUSet *c, const CPUSet *src);
|
||||
int cpu_set_add_range(CPUSet *c, size_t start, size_t end);
|
||||
int cpu_set_add_all(CPUSet *c);
|
||||
|
||||
char* cpu_set_to_string(const CPUSet *c);
|
||||
|
||||
Reference in New Issue
Block a user