From fd71be5b22fd9d6e9bdcd2cb9628c9a266bcfa09 Mon Sep 17 00:00:00 2001
From: Eric Long <i@hack3r.moe>
Date: Fri, 7 Mar 2025 01:26:15 +0800
Subject: [PATCH] ML-DSA: properly skip RVV tests conditionally
Content-type: text/plain

`return -77` should be `return 77`, as everywhere else.

Signed-off-by: Eric Long <i@hack3r.moe>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
---
 ml-dsa/tests/dilithium_tester_iuf_riscv64_rvv.c | 2 +-
 ml-dsa/tests/dilithium_tester_riscv64_rvv.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ml-dsa/tests/dilithium_tester_iuf_riscv64_rvv.c b/ml-dsa/tests/dilithium_tester_iuf_riscv64_rvv.c
index 9d58fb522f15de36569a88170baec854b8b73e5b..8b257ac899558b4f53ef47e2cb2dc200f998eded 100644
--- a/ml-dsa/tests/dilithium_tester_iuf_riscv64_rvv.c
+++ b/ml-dsa/tests/dilithium_tester_iuf_riscv64_rvv.c
@@ -59,7 +59,7 @@ LC_TEST_FUNC(int, main, int argc, char *argv[])
 	(void)argv;
 
 	if (!(lc_cpu_feature_available() & LC_CPU_FEATURE_RISCV_ASM_RVV))
-		return -77;
+		return 77;
 
 	if (argc != 2)
 		return dilithium_tester_iuf_riscv64_rvv();
diff --git a/ml-dsa/tests/dilithium_tester_riscv64_rvv.c b/ml-dsa/tests/dilithium_tester_riscv64_rvv.c
index c9503a9b9d72ca8a3ec9154a0497513ff1e19b1d..df7d32fec556e9aee34424a43d655bc85238d53b 100644
--- a/ml-dsa/tests/dilithium_tester_riscv64_rvv.c
+++ b/ml-dsa/tests/dilithium_tester_riscv64_rvv.c
@@ -56,7 +56,7 @@ LC_TEST_FUNC(int, main, int argc, char *argv[])
 	(void)argv;
 
 	if (!(lc_cpu_feature_available() & LC_CPU_FEATURE_RISCV_ASM_RVV))
-		return -77;
+		return 77;
 
 	if (argc != 2)
 		return dilithium_tester_riscv64_rvv();
-- 
2.49.0

