Add test counts and pass message to remove warning of riscv/vector tests.
Yong-Xuan Wang (2): tools: selftests: riscv: Add pass message for v_initval_nolibc tools: selftests: riscv: Add test count for vstate_prctl
tools/testing/selftests/riscv/vector/v_initval_nolibc.c | 4 ++++ tools/testing/selftests/riscv/vector/vstate_prctl.c | 2 ++ 2 files changed, 6 insertions(+)
Add the pass message after we successfully complete the test.
Fixes: 5c93c4c72fbc ("selftests: Test RISC-V Vector's first-use handler") Signed-off-by: Yong-Xuan Wang yongxuan.wang@sifive.com --- tools/testing/selftests/riscv/vector/v_initval_nolibc.c | 4 ++++ 1 file changed, 4 insertions(+)
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; }
Add the test count to drop the warning message. "Planned tests != run tests (0 != 1)"
Fixes: 7cf6198ce22d ("selftests: Test RISC-V Vector prctl interface") Signed-off-by: Yong-Xuan Wang yongxuan.wang@sifive.com --- tools/testing/selftests/riscv/vector/vstate_prctl.c | 2 ++ 1 file changed, 2 insertions(+)
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) {
On Fri, Dec 20, 2024 at 05:17:25PM +0800, Yong-Xuan Wang wrote:
Add test counts and pass message to remove warning of riscv/vector tests.
Yong-Xuan Wang (2): tools: selftests: riscv: Add pass message for v_initval_nolibc tools: selftests: riscv: Add test count for vstate_prctl
tools/testing/selftests/riscv/vector/v_initval_nolibc.c | 4 ++++ tools/testing/selftests/riscv/vector/vstate_prctl.c | 2 ++ 2 files changed, 6 insertions(+)
-- 2.17.1
For the series,
Reviewed-by: Andrew Jones ajones@ventanamicro.com
Thanks, drew
Yong-Xuan Wang yongxuan.wang@sifive.com 於 2024年12月20日 週五 下午5:17寫道:
Add test counts and pass message to remove warning of riscv/vector tests.
Yong-Xuan Wang (2): tools: selftests: riscv: Add pass message for v_initval_nolibc tools: selftests: riscv: Add test count for vstate_prctl
tools/testing/selftests/riscv/vector/v_initval_nolibc.c | 4 ++++ tools/testing/selftests/riscv/vector/vstate_prctl.c | 2 ++ 2 files changed, 6 insertions(+)
-- 2.17.1
For the series,
Reviewed-by: Andy Chiu AndybnAC@gmail.com
Thanks, Andy
Hello:
This series was applied to riscv/linux.git (fixes) by Palmer Dabbelt palmer@rivosinc.com:
On Fri, 20 Dec 2024 17:17:25 +0800 you wrote:
Add test counts and pass message to remove warning of riscv/vector tests.
Yong-Xuan Wang (2): tools: selftests: riscv: Add pass message for v_initval_nolibc tools: selftests: riscv: Add test count for vstate_prctl
tools/testing/selftests/riscv/vector/v_initval_nolibc.c | 4 ++++ tools/testing/selftests/riscv/vector/vstate_prctl.c | 2 ++ 2 files changed, 6 insertions(+)
Here is the summary with links: - [1/2] tools: selftests: riscv: Add pass message for v_initval_nolibc https://git.kernel.org/riscv/c/503465d4dc40 - [2/2] tools: selftests: riscv: Add test count for vstate_prctl https://git.kernel.org/riscv/c/ebdc22c51ace
You are awesome, thank you!
On Fri, Dec 20, 2024 at 05:17:25PM +0800, Yong-Xuan Wang wrote:
Add test counts and pass message to remove warning of riscv/vector tests.
A similar patch has been staged on Palmers for-next tree that I sent out a long time ago. I also reworked these tests so that they use the kselftest_harness [1].
[1] https://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git/commit/?h=f...
- Charlie
Yong-Xuan Wang (2): tools: selftests: riscv: Add pass message for v_initval_nolibc tools: selftests: riscv: Add test count for vstate_prctl
tools/testing/selftests/riscv/vector/v_initval_nolibc.c | 4 ++++ tools/testing/selftests/riscv/vector/vstate_prctl.c | 2 ++ 2 files changed, 6 insertions(+)
-- 2.17.1
linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv
linux-kselftest-mirror@lists.linaro.org