Skip to content

Commit 89726fb

Browse files
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>
2 parents 5cd900b + ebdc22c commit 89726fb

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tools/testing/selftests/riscv/vector/v_initval_nolibc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ int main(void)
2525
unsigned long vl;
2626
char *datap, *tmp;
2727

28+
ksft_set_plan(1);
29+
2830
datap = malloc(MAX_VSIZE);
2931
if (!datap) {
3032
ksft_test_result_fail("fail to allocate memory for size = %d\n", MAX_VSIZE);
@@ -63,6 +65,8 @@ int main(void)
6365
}
6466

6567
free(datap);
68+
69+
ksft_test_result_pass("tests for v_initval_nolibc pass\n");
6670
ksft_exit_pass();
6771
return 0;
6872
}

tools/testing/selftests/riscv/vector/vstate_prctl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ int main(void)
7676
long flag, expected;
7777
long rc;
7878

79+
ksft_set_plan(1);
80+
7981
pair.key = RISCV_HWPROBE_KEY_IMA_EXT_0;
8082
rc = riscv_hwprobe(&pair, 1, 0, NULL, 0);
8183
if (rc < 0) {

0 commit comments

Comments
 (0)