From 33620e68a1ef6966e576d8d7047e1f5a7a7b364a Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan.bosch@open-xchange.com>
Date: Sat, 12 Oct 2024 00:11:12 +0200
Subject: [PATCH] testsuite: cmd-test-config - Fail test_config_reload if the
 extension load function returns error

---
 src/testsuite/cmd-test-config.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/testsuite/cmd-test-config.c b/src/testsuite/cmd-test-config.c
index 6a8c181f7..8392f34d5 100644
--- a/src/testsuite/cmd-test-config.c
+++ b/src/testsuite/cmd-test-config.c
@@ -496,7 +496,12 @@ cmd_test_config_reload_operation_execute(const struct sieve_runtime_env *renv,
 			       str_c(extension));
 			return SIEVE_EXEC_FAILURE;
 		}
-		sieve_extension_reload(ext);
+		if (sieve_extension_reload(ext) < 0) {
+			return testsuite_test_failf(
+				renv, "test_config_reload: "
+				"failed to load extension '%s'",
+				str_c(extension));
+		}
 	}
 	return SIEVE_EXEC_OK;
 }
-- 
GitLab