Repository navigation
Commit 85a2720
hmp: selftests: add on-target test script for K3 HMP
Add hmp-test.sh under tools/testing/selftests/spacemit/, a shell-only test
script that validates the Spacemit HMP support on real K3 hardware (x100 =
cpu0-7, a100 = cpu8-15). It is written for BusyBox ash and needs no tooling
beyond taskset, awk and dmesg.
Test cases:
hotplug (DISRUPTIVE) cpu offline restrictions: the last regular cpu
is refused, the last AI cpu is refused while an AI task is
alive, and the last AI cpu does go offline once no AI task
remains. The full cpu layout is restored afterwards.
all env + baseline + bind + restrict.
The directory is wired into the selftests build so that the script is
installed by 'make kselftest-install' and run by run_kselftest.sh; it adds
a TARGETS entry and a four-line Makefile using TEST_PROGS. The script exits
4 when /proc/set_ai_thread is absent, so a kernel without
CONFIG_SPACEMIT_HMP is reported as a skip rather than a failure.
No build step is involved: the script is copied directly to the board
and run there, so a target rootfs with a shell is all it needs.
Expected results on K3: "all" reports 21 passed, "hotplug" reports 7
passed, with no failures and no skips.
Signed-off-by: Chunyan Zhang <chunyan.zhang@linux.spacemit.com>1 parent 06e7f26 commit 85a2720
3 files changed
Lines changed: 537 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments