]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/vm: use kselftest skip code for skipped tests
authorPo-Hsu Lin <po-hsu.lin@canonical.com>
Mon, 23 Aug 2021 23:59:18 +0000 (09:59 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Aug 2021 23:33:54 +0000 (09:33 +1000)
commit3d32d8de91ff84c836f44ed2be33854b53811e6d
treee2de3293d9f8a488712128d4c5d6c4818648dafd
parent280b08005af54c262abf5bbb0f9603a0302bc2f8
selftests/vm: use kselftest skip code for skipped tests

There are several test cases in the vm directory are still using exit 0
when they need to be skipped.  Use the kselftest framework to skip code
instead so it can help us to distinguish the return status.

Criterion to filter out what should be fixed in vm directory:
  grep -r "exit 0" -B1 | grep -i skip

This change might cause some false-positives if people are running these
test scripts directly and only checking their return codes, which will
change from 0 to 4.  However I think the impact should be small as most of
our scripts here are already using this skip code.  And there will be no
such issue if running them with the kselftest framework.

Link: https://lkml.kernel.org/r/20210823073433.37653-1-po-hsu.lin@canonical.com
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
tools/testing/selftests/vm/charge_reserved_hugetlb.sh
tools/testing/selftests/vm/hugetlb_reparenting_test.sh