diff options
author | Palmer Dabbelt <palmer@rivosinc.com> | 2025-01-09 18:35:42 +0100 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2025-01-09 18:35:42 +0100 |
commit | 89726fb01a12d639fbf1172f74f8215b1c2ebf24 (patch) | |
tree | ca6018652870dd6b71bed763a3890da05b88eb5a /tools | |
parent | riscv: use local label names instead of global ones in assembly (diff) | |
parent | tools: selftests: riscv: Add test count for vstate_prctl (diff) | |
download | linux-89726fb01a12d639fbf1172f74f8215b1c2ebf24.tar.xz linux-89726fb01a12d639fbf1172f74f8215b1c2ebf24.zip |
Merge patch series "selftest: fix riscv/vector tests"
This contains a pair of fixes for the vector self tests, which avoids
some warnings and provides proper status messages.
* b4-shazam-merge:
tools: selftests: riscv: Add test count for vstate_prctl
tools: selftests: riscv: Add pass message for v_initval_nolibc
Link: https://lore.kernel.org/r/20241220091730.28006-1-yongxuan.wang@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/riscv/vector/v_initval_nolibc.c | 4 | ||||
-rw-r--r-- | tools/testing/selftests/riscv/vector/vstate_prctl.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/riscv/vector/v_initval_nolibc.c b/tools/testing/selftests/riscv/vector/v_initval_nolibc.c index 1dd94197da30..6174ffe016dc 100644 --- a/tools/testing/selftests/riscv/vector/v_initval_nolibc.c +++ b/tools/testing/selftests/riscv/vector/v_initval_nolibc.c @@ -25,6 +25,8 @@ int main(void) unsigned long vl; char *datap, *tmp; + ksft_set_plan(1); + datap = malloc(MAX_VSIZE); if (!datap) { ksft_test_result_fail("fail to allocate memory for size = %d\n", MAX_VSIZE); @@ -63,6 +65,8 @@ int main(void) } free(datap); + + ksft_test_result_pass("tests for v_initval_nolibc pass\n"); ksft_exit_pass(); return 0; } diff --git a/tools/testing/selftests/riscv/vector/vstate_prctl.c b/tools/testing/selftests/riscv/vector/vstate_prctl.c index 895177f6bf4c..40b3bffcbb40 100644 --- a/tools/testing/selftests/riscv/vector/vstate_prctl.c +++ b/tools/testing/selftests/riscv/vector/vstate_prctl.c @@ -76,6 +76,8 @@ int main(void) long flag, expected; long rc; + ksft_set_plan(1); + pair.key = RISCV_HWPROBE_KEY_IMA_EXT_0; rc = riscv_hwprobe(&pair, 1, 0, NULL, 0); if (rc < 0) { |