test: filter_stdout: Ensure TLS initialization on macOS.
This is because macOS requests surely initialization for pthread stuffs.
In our code base, flb_init_env() should initialize thread local storage
stuffs.
Otherwise, FLB_TLS_GET returns invalid values.
@@ -34,6 +34,13 @@ void flb_test_filter_stdout_case_insensitive(void)
TEST_MSG("%s should be valid\n", filter_name);
}
+ /* Initialize thread local storage (FLB_TLS) properly when without calling flb_start().
+ * Then, FLB_TLS_GET working on macOS.
+ * In general, macOS requests surely initialization for pthread stuffs.
+ */
+ flb_init_env();
+
+ flb_stop(ctx);
flb_destroy(ctx);
}
