Re: [PATCH v3 1/4] selftests/arm64: Print missing MTE TAP headers
From: Vincenzo Frascino
Date: Wed Aug 26 2026 - 04:26:53 EST
On 25/08/2026 12:18, Muhammad Usama Anjum wrote:
> Most MTE tests set a TAP plan and emit results without first printing
> the TAP version header. Direct execution therefore starts with a plan
> such as "1..20" instead of "TAP version 13".
>
> The problem is particularly visible in the GCR_EL1 context-switch test.
> It prints its plan before forking 1,024 child processes. When stdout is
> fully buffered, the plan remains in the stdio buffer. Each child inherits
> the pending "1..1" line and flushes its copy from exit(), producing
> repeated plan lines.
>
> ksft_print_header() prints the TAP header and enables line buffering.
> Call it in every MTE test that is missing it. In the GCR_EL1 test, call
> it before the plan so the plan is flushed before the children are
> forked. In the remaining tests, call it before setup and prerequisite
> checks so early failures and whole-test skips also retain the header.
>
> Fixes: 29f080881601 ("kselftest/arm64: check GCR_EL1 after context switch")
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@xxxxxxx>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@xxxxxxx>
...