From: Lucas De Marchi Date: Sat, 7 Sep 2024 06:19:24 +0000 (-0500) Subject: testsuite: Check return value of underscores() X-Git-Tag: v34~396 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5202ebabf6931ba1bc58bd48a7f393c1f1116533;p=thirdparty%2Fkmod.git testsuite: Check return value of underscores() Error returned from underscores() shouldn't be ignored. Signed-off-by: Lucas De Marchi --- diff --git a/testsuite/test-util.c b/testsuite/test-util.c index 6122999e..9c662a20 100644 --- a/testsuite/test-util.c +++ b/testsuite/test-util.c @@ -121,7 +121,7 @@ static int test_underscores(const struct test *t) for (iter = &teststr[0]; iter->val != NULL; iter++) { _cleanup_free_ char *val = iter->val; - underscores(val); + assert_return(!underscores(val), EXIT_FAILURE); assert_return(streq(val, iter->res), EXIT_FAILURE); }