diff options
| author | Song Hu <husong@kylinos.cn> | 2026-08-25 16:57:55 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-06 17:38:53 -0700 |
| commit | fb2f274a79c7e6ba91c111ed6d92fe128f6b5772 (patch) | |
| tree | e777cbff2fc0bb95ab2df048c26c7a5ee0791bf2 /kernel | |
| parent | 36b0ee4aac60e8bf394c359a0a988319289c9f66 (diff) | |
selftests/mm: emit TAP header and use TAP skip in mremap_test
mremap_test calls ksft_set_plan() without ksft_print_header(), and its
get_mmap_min_addr() skip path uses a bare exit(KSFT_SKIP) that prints no
TAP line, so its output is not valid KTAP. Add the header and switch the
skip to ksft_exit_skip().
Also fix two more KTAP compliance issues spotted in review:
- get_mmap_min_addr() calls strerror(errno) after fclose(), which may
clobber errno; save errno before fclose() instead.
- Some ksft_*() messages embed "\n\t", so the text after each embedded
newline is printed without the "# " prefix. Split those into separate
messages.
And cache mmap_min_addr in main() before ksft_set_plan(), so that the skip
paths in get_mmap_min_addr() are taken before the plan is set; a skip
after the plan leaves the run with fewer tests than planned.
Link: https://lore.kernel.org/20260825085756.63030-3-husong@kylinos.cn
Signed-off-by: Song Hu <husong@kylinos.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Sarthak Sharma <sarthak.sharma@arm.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@arm.com>
Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com>
Acked-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
