Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kselftest/arm64: Fix check_user_mem test

The check_user_mem test reports the error below because the test
plan is not declared correctly:

# Planned tests != run tests (0 != 4)

Fix the test adding the correct test plan declaration.

Fixes: 4dafc08d0ba4 ("kselftest/arm64: Check mte tagged user address in kernel")
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Gabor Kertesz <gabor.kertesz@arm.com>
Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
Link: https://lore.kernel.org/r/20201026121248.2340-7-vincenzo.frascino@arm.com
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Vincenzo Frascino and committed by
Will Deacon
493b35db cbb268af

+4
+4
tools/testing/selftests/arm64/mte/check_user_mem.c
··· 92 92 err = mte_default_setup(); 93 93 if (err) 94 94 return err; 95 + 95 96 /* Register signal handlers */ 96 97 mte_register_signal(SIGSEGV, mte_default_handler); 98 + 99 + /* Set test plan */ 100 + ksft_set_plan(4); 97 101 98 102 evaluate_test(check_usermem_access_fault(USE_MMAP, MTE_SYNC_ERR, MAP_PRIVATE), 99 103 "Check memory access from kernel in sync mode, private mapping and mmap memory\n");