diff mbox series

[v2,06/30] crypto/af_alg02: Convert to runtime.

Message ID 20220503174718.21205-7-chrubis@suse.cz
State Superseded
Headers show
Series Introduce runtime and conver tests | expand

Commit Message

Cyril Hrubis May 3, 2022, 5:46 p.m. UTC
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
 testcases/kernel/crypto/af_alg02.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Richard Palethorpe May 5, 2022, 8:33 a.m. UTC | #1
Hello,

"Cyril Hrubis" <chrubis@suse.cz> writes:

> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
> ---
>  testcases/kernel/crypto/af_alg02.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/kernel/crypto/af_alg02.c b/testcases/kernel/crypto/af_alg02.c
> index 9894ffacd..b96b8b341 100644
> --- a/testcases/kernel/crypto/af_alg02.c
> +++ b/testcases/kernel/crypto/af_alg02.c
> @@ -65,7 +65,7 @@ static void run(void)
>  	TST_CHECKPOINT_WAIT(0);
>  
>  	while (!completed) {
> -		if (tst_timeout_remaining() <= 10) {
> +		if (tst_remaining_runtime()) {
>  			pthread_cancel(thr);
>  			tst_brk(TBROK,
>  				"Timed out while reading from request socket.");
> @@ -77,7 +77,7 @@ static void run(void)
>  
>  static struct tst_test test = {
>  	.test_all = run,
> -	.timeout = 20,
> +	.runtime_per_iteration = 20,

Isn't this the argument name to a function to set the runtime not the
tst_test member?

Probably they should be given the same name.

>  	.needs_checkpoints = 1,
>  	.tags = (const struct tst_tag[]) {
>  		{"linux-git", "ecaaab564978"},
diff mbox series

Patch

diff --git a/testcases/kernel/crypto/af_alg02.c b/testcases/kernel/crypto/af_alg02.c
index 9894ffacd..b96b8b341 100644
--- a/testcases/kernel/crypto/af_alg02.c
+++ b/testcases/kernel/crypto/af_alg02.c
@@ -65,7 +65,7 @@  static void run(void)
 	TST_CHECKPOINT_WAIT(0);
 
 	while (!completed) {
-		if (tst_timeout_remaining() <= 10) {
+		if (tst_remaining_runtime()) {
 			pthread_cancel(thr);
 			tst_brk(TBROK,
 				"Timed out while reading from request socket.");
@@ -77,7 +77,7 @@  static void run(void)
 
 static struct tst_test test = {
 	.test_all = run,
-	.timeout = 20,
+	.runtime_per_iteration = 20,
 	.needs_checkpoints = 1,
 	.tags = (const struct tst_tag[]) {
 		{"linux-git", "ecaaab564978"},