If HAVE_DECL_MPOL_F_MEMS_ALLOWED is not defined, test 15 and 16, returns -1, which is evaluted as failure.
Treat it as TCONF, but don't break the execution, cpuset_syscall_testset.sh script is expecting to handle stopping/waiting for children by itself. Signed-off-by: Jan Stancek <jstan...@redhat.com> --- .../cpuset_syscall_test/cpuset_syscall_test.c | 6 ++-- .../cpuset_syscall_test/cpuset_syscall_testset.sh | 26 ++++++++++++++++++- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c index e202295..407b8c9 100644 --- a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c +++ b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c @@ -128,7 +128,7 @@ void sigint_handler(int __attribute__ ((unused)) signo) void test_setaffinity(void) { cpu_set_t tmask; - int i; + unsigned int i; CPU_ZERO(&tmask); for (i = 0; i < 8 * sizeof(mask); i++) { if ((1 << i) & mask) @@ -140,7 +140,7 @@ void test_setaffinity(void) void test_getaffinity(void) { cpu_set_t tmask; - int i; + unsigned int i; CPU_ZERO(&tmask); ret = sched_getaffinity(0, sizeof(tmask), &tmask); for (i = 0; i < 8 * sizeof(mask); i++) { @@ -190,7 +190,7 @@ void test_get_mempolicy(void) ret = get_mempolicy(NULL, bitmask_mask(nmask), bitmask_nbits(nmask), 0, MPOL_F_MEMS_ALLOWED); #else - ret = -1; + tst_resm(TCONF, "don't have MPOL_F_MEMS_ALLOWED"); #endif bitmask_displaylist(str, 256, nmask); diff --git a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh index 561c3b9..a32a9b0 100755 --- a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh +++ b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh @@ -299,7 +299,18 @@ test14() test15() { - do_syscall_test 0 0 --get_mempolicy 0 || return 1 + do_syscall_test 0 0 --get_mempolicy 0 + ret=$? + + grep "TCONF" "$TEST_OUTPUT" + if [ $? -eq 0 ]; then + return 0 + fi + + if [ $ret -ne 0 ]; then + return 1 + fi + allowed_list="$(awk '/Mems_allowed_list:/{print $2}' $TEST_PROCSTATUS )" test "$(cat "$TEST_OUTPUT")" = "0" if [ $? -ne 0 ]; then @@ -316,7 +327,18 @@ test15() test16() { - do_syscall_test 0 0-1 --get_mempolicy 0 || return 1 + do_syscall_test 0 0-1 --get_mempolicy 0 + ret=$? + + grep "TCONF" "$TEST_OUTPUT" + if [ $? -eq 0 ]; then + return 0 + fi + + if [ $ret -ne 0 ]; then + return 1 + fi + allowed_list="$(awk '/Mems_allowed_list:/{print $2}' $TEST_PROCSTATUS )" test "$(cat "$TEST_OUTPUT")" = "0-1" if [ $? -ne 0 ]; then -- 1.7.1 ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list