[PATCH] test: Fix expected hash error value

7 views
Skip to first unread message

Bastian Germann

unread,
Jul 29, 2026, 5:56:29 AM (7 days ago) Jul 29
to swup...@googlegroups.com, Bastian Germann
The do_concrete_hash function expects the wrong return.
It should expect no error, which is encoded as 0 by the crypto
implementations.

Signed-off-by: Bastian Germann <ba...@debian.org>
---
test/test_hash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test_hash.c b/test/test_hash.c
index 895dcf4c..606c3796 100644
--- a/test/test_hash.c
+++ b/test/test_hash.c
@@ -80,7 +80,7 @@ static void do_concrete_hash(const char* algo, const char* input, const char* ex
assert_true(!error);

error = swupdate_HASH_final(dgst, result, &len);
- assert_int_equal(error, 1);
+ assert_int_equal(error, 0);
assert_int_equal(len, strlen(expected_hex) / 2);

swupdate_HASH_cleanup(dgst);
Reply all
Reply to author
Forward
0 new messages