Skip to content

Commit 01d0eec

Browse files
Avineshacerv
authored andcommitted
set_mempolicy: require CONFIG_NUMA
On kernels without CONFIG_NUMA=y set_mempolicy() returns ENOSYS, which the test misreports as TFAIL. set_mempolicy05.c:105: TFAIL: set_mempolicy should fail with EFAULT or EINVAL, instead returned 38 remaining of these tests (set_mempolicy[01-04]) checks for minimum two NUMA nodes and reports TCONF, but those also should exit on CONFIG_NUMA check. tse_numa.c:200: TINFO: Found 1 NUMA memory nodes tse_numa.c:141: TINFO: File '/sys/devices/system/node/node0/meminfo' does not exist! NUMA not enabled? get_mempolicy02.c:60: TCONF: test requires at least one NUMA memory node Add .needs_kconfigs with CONFIG_NUMA=y Signed-off-by: Avinesh Kumar <avinesh.kumar@suse.com> Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
1 parent f7a5c86 commit 01d0eec

5 files changed

Lines changed: 20 additions & 0 deletions

File tree

testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ static struct tst_test test = {
120120
.forks_child = 1,
121121
.needs_checkpoints = 1,
122122
.timeout = 600,
123+
.needs_kconfigs = (const char *const[]){
124+
"CONFIG_NUMA=y",
125+
NULL
126+
}
123127
};
124128

125129
#else

testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ static struct tst_test test = {
109109
.tcnt = 2,
110110
.forks_child = 1,
111111
.needs_checkpoints = 1,
112+
.needs_kconfigs = (const char *const[]){
113+
"CONFIG_NUMA=y",
114+
NULL
115+
}
112116
};
113117

114118
#else

testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ static struct tst_test test = {
103103
.mntpoint = MNTPOINT,
104104
.forks_child = 1,
105105
.needs_checkpoints = 1,
106+
.needs_kconfigs = (const char *const[]){
107+
"CONFIG_NUMA=y",
108+
NULL
109+
}
106110
};
107111

108112
#else

testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ static struct tst_test test = {
134134
.all_filesystems = 1,
135135
.mntpoint = MNTPOINT,
136136
.needs_checkpoints = 1,
137+
.needs_kconfigs = (const char *const[]){
138+
"CONFIG_NUMA=y",
139+
NULL
140+
}
137141
};
138142

139143
#else

testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ static struct tst_test test = {
115115
"ppc",
116116
NULL
117117
},
118+
.needs_kconfigs = (const char *const[]){
119+
"CONFIG_NUMA=y",
120+
NULL
121+
},
118122
.tags = (const struct tst_tag[]) {
119123
{"linux-git", "cf01fb9985e8"},
120124
{"CVE", "2017-7616"},

0 commit comments

Comments
 (0)