From: Cyril H. <su...@li...> - 2011-04-19 16:01:49
|
The branch, master, has been updated via 9b1526886f6fe449b564471486ab47e2b87d8881 (commit) from 2722f2d09a3d1ad0debea0072797e3615c1f6d37 (commit) - Log ----------------------------------------------------------------- commit 9b1526886f6fe449b564471486ab47e2b87d8881 Author: Caspar Zhang <cz...@re...> Date: Tue Apr 12 16:13:40 2011 +0800 ksm: mempolicy syscalls not implemented since NUMA is only supported on a few i386 systems, mempolicy syscalls ([gs]et_mempolicy, mbind) may not implemented, thus, an ENOSYS errno should be acceptable. Signed-off-by: Caspar Zhang <cz...@re...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/mem/ksm/ksm02.c | 9 +++++++-- testcases/kernel/mem/ksm/ksm04.c | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/testcases/kernel/mem/ksm/ksm02.c b/testcases/kernel/mem/ksm/ksm02.c index 33ed887..3ae4c08 100644 --- a/testcases/kernel/mem/ksm/ksm02.c +++ b/testcases/kernel/mem/ksm/ksm02.c @@ -102,8 +102,13 @@ int main(int argc, char *argv[]) Tst_count = 0; check_ksm_options(&size, &num, &unit); - if (set_mempolicy(MPOL_BIND, &nmask, MAXNODES) == -1) - tst_brkm(TBROK|TERRNO, cleanup, "set_mempolicy"); + if (set_mempolicy(MPOL_BIND, &nmask, MAXNODES) == -1) { + if (errno != ENOSYS) + tst_brkm(TBROK|TERRNO, cleanup, "set_mempolicy"); + else + tst_resm(TCONF, cleanup, + "set_mempolicy syscall is not implemented on your system."); + } create_same_memory(size, num, unit); write_cpusets(); diff --git a/testcases/kernel/mem/ksm/ksm04.c b/testcases/kernel/mem/ksm/ksm04.c index 8bb791e..5121111 100644 --- a/testcases/kernel/mem/ksm/ksm04.c +++ b/testcases/kernel/mem/ksm/ksm04.c @@ -104,8 +104,13 @@ int main(int argc, char *argv[]) write_memcg(); - if (set_mempolicy(MPOL_BIND, &nmask, MAXNODES) == -1) - tst_brkm(TBROK|TERRNO, cleanup, "set_mempolicy"); + if (set_mempolicy(MPOL_BIND, &nmask, MAXNODES) == -1) { + if (errno != ENOSYS) + tst_brkm(TBROK|TERRNO, cleanup, "set_mempolicy"); + else + tst_resm(TCONF, cleanup, + "set_mempolicy syscall is not implemented on your system."); + } create_same_memory(size, num, unit); write_cpusets(); hooks/post-receive -- ltp |