summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2022-04-19 15:56:37 +0300
committerZorro Lang <zlang@kernel.org>2022-05-02 12:15:52 +0800
commit28c52b15c6e245734d7f375bc04e1a71f1578842 (patch)
tree4646c1aaa0f2b8efba598b9a8351ac6dddc62d51 /check
parent6ee5ffa079b978e6369d2bc314655720c14d8b79 (diff)
common: print hints for reasons of test failures
Introduce helpers _fixed_by_{kernel,git}_commit() and _fixed_in_{kernel_,}version() that can be used to hint testers why a test might be failing and aid in auto-generating of expunge lists for downstream kernel testing. A test may be annotated with multiple hints, for example: _fixed_by_kernel_commit 09889695864 xfs: foo _fixed_by_kernel_commit 46464565465 ext4: bar _fixed_in_version xfsprogs v5.15 Annotate fix kernel commits for some overlayfs tests. Annotate fix kernel version for some overlayfs tests testing for legacy behavior whose fixes are not likely to be backported to stable kernels. This is modeled after LTP's 'make filter-known-fails' and print_failure_hints() using struct tst_tag annotations. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'check')
-rwxr-xr-xcheck10
1 files changed, 9 insertions, 1 deletions
diff --git a/check b/check
index a0863121..de11b37e 100755
--- a/check
+++ b/check
@@ -808,7 +808,7 @@ function run_section()
fi
# really going to try and run this one
- rm -f $seqres.out.bad
+ rm -f $seqres.out.bad $seqres.hints
# check if we really should run it
_expunge_test $seqnum
@@ -942,6 +942,14 @@ function run_section()
fi; } | sed -e 's/^\(.\)/ \1/'
err=true
fi
+ if [ -f $seqres.hints ]; then
+ if $err; then
+ echo
+ cat $seqres.hints
+ else
+ rm -f $seqres.hints
+ fi
+ fi
done
# make sure we record the status of the last test we ran.