Commit c7c55fc4 authored by Peter Xu's avatar Peter Xu Committed by Andrew Morton

selftests/mm: dump a summary in run_vmtests.sh

Dump a summary after running whatever test specified.  Useful for human
runners to identify any kind of failures (besides exit code).

Link: https://lkml.kernel.org/r/20230412164117.327720-1-peterx@redhat.comSigned-off-by: default avatarPeter Xu <peterx@redhat.com>
Reviewed-by: default avatarAxel Rasmussen <axelrasmussen@google.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Reviewed-by: default avatarMike Rapoport (IBM) <rppt@kernel.org>
Cc: Dmitry Safonov <0x7f454c46@gmail.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Zach O'Keefe <zokeefe@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent c14ef378
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
# Kselftest framework requirement - SKIP code is 4. # Kselftest framework requirement - SKIP code is 4.
ksft_skip=4 ksft_skip=4
count_pass=0
count_fail=0
count_skip=0
exitcode=0 exitcode=0
usage() { usage() {
...@@ -149,11 +152,14 @@ run_test() { ...@@ -149,11 +152,14 @@ run_test() {
"$@" "$@"
local ret=$? local ret=$?
if [ $ret -eq 0 ]; then if [ $ret -eq 0 ]; then
count_pass=$(( count_pass + 1 ))
echo "[PASS]" echo "[PASS]"
elif [ $ret -eq $ksft_skip ]; then elif [ $ret -eq $ksft_skip ]; then
count_skip=$(( count_skip + 1 ))
echo "[SKIP]" echo "[SKIP]"
exitcode=$ksft_skip exitcode=$ksft_skip
else else
count_fail=$(( count_fail + 1 ))
echo "[FAIL]" echo "[FAIL]"
exitcode=1 exitcode=1
fi fi
...@@ -279,4 +285,6 @@ CATEGORY="soft_dirty" run_test ./soft-dirty ...@@ -279,4 +285,6 @@ CATEGORY="soft_dirty" run_test ./soft-dirty
# COW tests # COW tests
CATEGORY="cow" run_test ./cow CATEGORY="cow" run_test ./cow
echo "SUMMARY: PASS=${count_pass} SKIP=${count_skip} FAIL=${count_fail}"
exit $exitcode exit $exitcode
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment