public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] selftest: fix riscv/vector tests
@ 2024-12-20  9:17 Yong-Xuan Wang
  2024-12-20  9:17 ` [PATCH 1/2] tools: selftests: riscv: Add pass message for v_initval_nolibc Yong-Xuan Wang
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Yong-Xuan Wang @ 2024-12-20  9:17 UTC (permalink / raw)
  To: linux-kernel, linux-riscv, linux-kselftest
  Cc: greentime.hu, vincent.chen, andybnac, Yong-Xuan Wang,
	Paul Walmsley, Palmer Dabbelt, Albert Ou

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] tools: selftests: riscv: Add pass message for v_initval_nolibc
  2024-12-20  9:17 [PATCH 0/2] selftest: fix riscv/vector tests Yong-Xuan Wang
@ 2024-12-20  9:17 ` Yong-Xuan Wang
  2024-12-20  9:17 ` [PATCH 2/2] tools: selftests: riscv: Add test count for vstate_prctl Yong-Xuan Wang
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Yong-Xuan Wang @ 2024-12-20  9:17 UTC (permalink / raw)
  To: linux-kernel, linux-riscv, linux-kselftest
  Cc: greentime.hu, vincent.chen, andybnac, Yong-Xuan Wang, Shuah Khan,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Christoph Müllner,
	Alexandre Ghiti, Andrew Jones, Björn Töpel

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;
 }
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] tools: selftests: riscv: Add test count for vstate_prctl
  2024-12-20  9:17 [PATCH 0/2] selftest: fix riscv/vector tests Yong-Xuan Wang
  2024-12-20  9:17 ` [PATCH 1/2] tools: selftests: riscv: Add pass message for v_initval_nolibc Yong-Xuan Wang
@ 2024-12-20  9:17 ` Yong-Xuan Wang
  2024-12-20 15:29 ` [PATCH 0/2] selftest: fix riscv/vector tests Andrew Jones
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Yong-Xuan Wang @ 2024-12-20  9:17 UTC (permalink / raw)
  To: linux-kernel, linux-riscv, linux-kselftest
  Cc: greentime.hu, vincent.chen, andybnac, Yong-Xuan Wang, Shuah Khan,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Andrew Jones,
	Conor Dooley, Christoph Müllner

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) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] selftest: fix riscv/vector tests
  2024-12-20  9:17 [PATCH 0/2] selftest: fix riscv/vector tests Yong-Xuan Wang
  2024-12-20  9:17 ` [PATCH 1/2] tools: selftests: riscv: Add pass message for v_initval_nolibc Yong-Xuan Wang
  2024-12-20  9:17 ` [PATCH 2/2] tools: selftests: riscv: Add test count for vstate_prctl Yong-Xuan Wang
@ 2024-12-20 15:29 ` Andrew Jones
  2025-01-05 16:25 ` Andy Chiu
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Andrew Jones @ 2024-12-20 15:29 UTC (permalink / raw)
  To: Yong-Xuan Wang
  Cc: linux-kernel, linux-riscv, linux-kselftest, greentime.hu,
	vincent.chen, andybnac, Paul Walmsley, Palmer Dabbelt, Albert Ou

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] selftest: fix riscv/vector tests
  2024-12-20  9:17 [PATCH 0/2] selftest: fix riscv/vector tests Yong-Xuan Wang
                   ` (2 preceding siblings ...)
  2024-12-20 15:29 ` [PATCH 0/2] selftest: fix riscv/vector tests Andrew Jones
@ 2025-01-05 16:25 ` Andy Chiu
  2025-01-09 19:40 ` patchwork-bot+linux-riscv
  2025-01-10  0:27 ` Charlie Jenkins
  5 siblings, 0 replies; 7+ messages in thread
From: Andy Chiu @ 2025-01-05 16:25 UTC (permalink / raw)
  To: Yong-Xuan Wang
  Cc: linux-kernel, linux-riscv, linux-kselftest, greentime.hu,
	vincent.chen, Paul Walmsley, Palmer Dabbelt, Albert Ou

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] selftest: fix riscv/vector tests
  2024-12-20  9:17 [PATCH 0/2] selftest: fix riscv/vector tests Yong-Xuan Wang
                   ` (3 preceding siblings ...)
  2025-01-05 16:25 ` Andy Chiu
@ 2025-01-09 19:40 ` patchwork-bot+linux-riscv
  2025-01-10  0:27 ` Charlie Jenkins
  5 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+linux-riscv @ 2025-01-09 19:40 UTC (permalink / raw)
  To: Yong-Xuan Wang
  Cc: linux-riscv, linux-kernel, linux-kselftest, greentime.hu,
	vincent.chen, andybnac, paul.walmsley, palmer, aou

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] selftest: fix riscv/vector tests
  2024-12-20  9:17 [PATCH 0/2] selftest: fix riscv/vector tests Yong-Xuan Wang
                   ` (4 preceding siblings ...)
  2025-01-09 19:40 ` patchwork-bot+linux-riscv
@ 2025-01-10  0:27 ` Charlie Jenkins
  5 siblings, 0 replies; 7+ messages in thread
From: Charlie Jenkins @ 2025-01-10  0:27 UTC (permalink / raw)
  To: Yong-Xuan Wang
  Cc: linux-kernel, linux-riscv, linux-kselftest, greentime.hu,
	vincent.chen, andybnac, Paul Walmsley, Palmer Dabbelt, Albert Ou

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=for-next&id=8fcaf922831887e32c8bdf5ebff76bbd80c971cb

- 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-01-10  0:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-20  9:17 [PATCH 0/2] selftest: fix riscv/vector tests Yong-Xuan Wang
2024-12-20  9:17 ` [PATCH 1/2] tools: selftests: riscv: Add pass message for v_initval_nolibc Yong-Xuan Wang
2024-12-20  9:17 ` [PATCH 2/2] tools: selftests: riscv: Add test count for vstate_prctl Yong-Xuan Wang
2024-12-20 15:29 ` [PATCH 0/2] selftest: fix riscv/vector tests Andrew Jones
2025-01-05 16:25 ` Andy Chiu
2025-01-09 19:40 ` patchwork-bot+linux-riscv
2025-01-10  0:27 ` Charlie Jenkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox