tests: internal: stream_processor: added config initialization to
prevent macos crashes.
*/
#include <fluent-bit/flb_info.h>
+#include <fluent-bit/flb_config.h>
#include <fluent-bit/flb_mem.h>
#include <fluent-bit/flb_pack.h>
#include <fluent-bit/flb_error.h>
#define MP_UOK MSGPACK_UNPACK_SUCCESS
+static void initialization_crutch()
+{
+ struct flb_config *config;
+
+ config = flb_config_init();
+
+ if (config == NULL) {
+ return;
+ }
+
+ flb_config_exit(config);
+}
+
int flb_sp_fd_event_test(int fd, struct flb_sp_task *task, struct sp_buffer *out_buf)
{
char *tag = NULL;
@@ -199,6 +213,8 @@ static void invalid_queries()
struct flb_sp *sp;
struct flb_sp_task *task;
+ initialization_crutch();
+
/* Total number of checks for invalid queries */
checks = sizeof(invalid_query_checks) / sizeof(char *);
@@ -243,6 +259,8 @@ static void test_select_keys()
WSADATA wsa_data;
#endif
+ initialization_crutch();
+
config = flb_calloc(1, sizeof(struct flb_config));
if (!config) {
flb_errno();
@@ -329,6 +347,8 @@ static void test_select_subkeys()
WSADATA wsa_data;
#endif
+ initialization_crutch();
+
config = flb_calloc(1, sizeof(struct flb_config));
if (!config) {
flb_errno();
@@ -457,6 +477,8 @@ static void test_window()
WSADATA wsa_data;
#endif
+ initialization_crutch();
+
config = flb_calloc(1, sizeof(struct flb_config));
if (!config) {
flb_errno();
@@ -608,6 +630,8 @@ static void test_snapshot()
WSADATA wsa_data;
#endif
+ initialization_crutch();
+
config = flb_calloc(1, sizeof(struct flb_config));
if (!config) {
flb_errno();
