On Sat, Jun 27, 2026 at 10:52:42AM +0300, Mike Rapoport wrote:
> Hi Breno,
>
> On Fri, Jun 26, 2026 at 08:33:20AM -0700, Breno Leitao wrote:
> > Add a destructive selftest that verifies
> > vm.panic_on_unrecoverable_memory_failure actually panics when a
> > hwpoison error hits a kernel-owned page.
>
> > +ksft_skip=4
>
> ...
>
> > +ksft_print() { echo "# $*"; }
> > +ksft_exit_skip() { ksft_print "$*"; exit "$ksft_skip"; }
> > +ksft_exit_fail() { echo "not ok 1 $*"; exit 1; }
>
> There is tools/testing/selftests/kselftest/ktap_helpers.sh that already
> implements this :)
Ack, let me source that file in my selftest.
DIR="$(dirname "$(readlink -f "$0")")"
source "${DIR}"/../kselftest/ktap_helpers.sh
I will update, thanks for the review,
--breno