diff --git a/tests/runtime/data/tail/out/unicode_be_c_simd.out b/tests/runtime/data/tail/out/unicode_be_c_simd.out new file mode 100644 index 00000000000..80d85da0976 --- /dev/null +++ b/tests/runtime/data/tail/out/unicode_be_c_simd.out @@ -0,0 +1 @@ +{"log":"在 Fluent Bit 中处理汉字,感觉像是在做梦😀。"} diff --git a/tests/runtime/data/tail/out/unicode_be_j_simd.out b/tests/runtime/data/tail/out/unicode_be_j_simd.out new file mode 100644 index 00000000000..02bcf9b4397 --- /dev/null +++ b/tests/runtime/data/tail/out/unicode_be_j_simd.out @@ -0,0 +1 @@ +{"log":"にほんごテストログふぁいる。文字エンコーディングをUnicodeにできる!?☕😀⚪⚫🔴🔵🟠🟡🟢🟣🟤🇺🇸🇯🇵"} diff --git a/tests/runtime/data/tail/out/unicode_c_simd.out b/tests/runtime/data/tail/out/unicode_c_simd.out new file mode 100644 index 00000000000..6cb70070ab6 --- /dev/null +++ b/tests/runtime/data/tail/out/unicode_c_simd.out @@ -0,0 +1 @@ +{"log"=>"用汉字在 Fluent Bit 中处理日志,就像是一个梦一样😀"} \ No newline at end of file diff --git a/tests/runtime/data/tail/out/unicode_j_simd.out b/tests/runtime/data/tail/out/unicode_j_simd.out new file mode 100644 index 00000000000..02bcf9b4397 --- /dev/null +++ b/tests/runtime/data/tail/out/unicode_j_simd.out @@ -0,0 +1 @@ +{"log":"にほんごテストログふぁいる。文字エンコーディングをUnicodeにできる!?☕😀⚪⚫🔴🔵🟠🟡🟢🟣🟤🇺🇸🇯🇵"} diff --git a/tests/runtime/data/tail/out/unicode_subdivision_flags_be_simd.out b/tests/runtime/data/tail/out/unicode_subdivision_flags_be_simd.out new file mode 100644 index 00000000000..30dfc2ab629 --- /dev/null +++ b/tests/runtime/data/tail/out/unicode_subdivision_flags_be_simd.out @@ -0,0 +1 @@ +{"log"=>"🏴󠁧󠁢󠁥󠁮󠁧󠁿🏴󠁧󠁢󠁳󠁣󠁴󠁿🏴󠁧󠁢󠁷󠁬󠁳󠁿"} \ No newline at end of file diff --git a/tests/runtime/data/tail/out/unicode_subdivision_flags_simd.out b/tests/runtime/data/tail/out/unicode_subdivision_flags_simd.out new file mode 100644 index 00000000000..30dfc2ab629 --- /dev/null +++ b/tests/runtime/data/tail/out/unicode_subdivision_flags_simd.out @@ -0,0 +1 @@ +{"log"=>"🏴󠁧󠁢󠁥󠁮󠁧󠁿🏴󠁧󠁢󠁳󠁣󠁴󠁿🏴󠁧󠁢󠁷󠁬󠁳󠁿"} \ No newline at end of file diff --git a/tests/runtime/in_tail.c b/tests/runtime/in_tail.c index 5476dee1ae4..3f5cabbcda5 100644 --- a/tests/runtime/in_tail.c +++ b/tests/runtime/in_tail.c @@ -360,7 +360,7 @@ static int file_to_buf(const char *path, char **out_buf, size_t *out_size) } /* Given a target, lookup the .out file and return it content in a tail_file_lines structure */ -static struct tail_file_lines *get_out_file_content(const char *target) +static struct tail_file_lines *get_out_file_content(const char *target, const char *suffix) { int ret; char file[PATH_MAX]; @@ -370,7 +370,12 @@ static struct tail_file_lines *get_out_file_content(const char *target) struct tail_file_lines *file_lines = flb_malloc(sizeof (struct tail_file_lines)); file_lines->lines_c = 0; - snprintf(file, sizeof(file) - 1, DPATH "/out/%s.out", target); + if (suffix != NULL) { + snprintf(file, sizeof(file) - 1, DPATH "/out/%s_%s.out", target, suffix); + } + else { + snprintf(file, sizeof(file) - 1, DPATH "/out/%s.out", target); + } ret = file_to_buf(file, &out_buf, &out_size); TEST_CHECK_(ret == 0, "getting output file content: %s", file); @@ -410,7 +415,7 @@ static int cb_check_result(void *record, size_t size, void *data) char *check; - out = get_out_file_content(result->target); + out = get_out_file_content(result->target, NULL); if (!out->lines_c) { goto exit; } @@ -450,7 +455,11 @@ static int cb_check_result_unicode(void *record, size_t size, void *data) char *check; - out = get_out_file_content(result->target); +#ifdef FLB_HAVE_SIMD + out = get_out_file_content(result->target, "simd"); +#else + out = get_out_file_content(result->target, NULL); +#endif if (!out->lines_c) { goto exit; }