syscalls/set_mempolicy04: Fix mistake
PATCH 1/1 syscalls/set_mempolicy04: Fix mistake
I've accidentally left the number of numa nodes hardcoded in the computation so this test was failing on anything but machines with three nodes.
Signed-off-by Cyril Hrubis <[email protected]>
--- testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c +2 -2
@@ -77,8 +77,8 @@ static void alloc_and_check(void)for (i =0 ; i < nodes->cnt; i++) {float treshold =1.00 * total_pages /60 ;/* five percents */ -float min_pages =1.00 * total_pages /3 - treshold; -float max_pages =1.00 * total_pages /3 + treshold; +float min_pages =1.00 * total_pages / nodes->cnt - treshold; +float max_pages =1.00 * total_pages / nodes->cnt + treshold;if (nodes->counters[i] > min_pages && nodes->counters[i] < max_pages) { tst_res(TPASS, "Node %u allocated %u <%.2f,%.2f>",
Signature · 1 line
2.19.2