Skip to content

Commit

Permalink
tests: internal: fuzzers: adjust to updated parser API for system tim…
Browse files Browse the repository at this point in the history
…ezone

Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
braydonk authored and edsiper committed Jun 25, 2024
1 parent 9bcf925 commit e81fc39
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/internal/fuzzers/engine_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ int LLVMFuzzerInitialize(int *argc, char ***argv) {

parser = flb_parser_create("timestamp", "regex", "^(?<time>.*)$", FLB_TRUE,
"%s.%L", "time", NULL, MK_FALSE, 0, FLB_FALSE,
NULL, 0, NULL, ctx->config);
FLB_FALSE, NULL, 0, NULL, ctx->config);
filter_ffd = flb_filter(ctx, (char *) "parser", NULL);
int ret;
ret = flb_filter_set(ctx, filter_ffd, "Match", "test",
Expand Down
2 changes: 1 addition & 1 deletion tests/internal/fuzzers/parse_json_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size){
}

fuzz_parser = flb_parser_create("fuzzer", "json", NULL, FLB_TRUE, NULL,
NULL, NULL, MK_FALSE, MK_TRUE, FLB_FALSE,
NULL, NULL, MK_FALSE, MK_TRUE, FLB_FALSE, FLB_FALSE,
NULL, 0, NULL, fuzz_config);
if (fuzz_parser) {
flb_parser_do(fuzz_parser, (char*)data, size,
Expand Down
4 changes: 2 additions & 2 deletions tests/internal/fuzzers/parse_logfmt_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size){
}
fuzz_parser = flb_parser_create("fuzzer", "logfmt", NULL, FLB_TRUE,
NULL, NULL, NULL, MK_FALSE,
MK_TRUE, FLB_FALSE, NULL, 0, NULL,
fuzz_config);
MK_TRUE, FLB_FALSE, FLB_FALSE, NULL, 0,
NULL, fuzz_config);
if (fuzz_parser) {
flb_parser_do(fuzz_parser, (char*)data, size,
&out_buf, &out_size, &out_time);
Expand Down
4 changes: 2 additions & 2 deletions tests/internal/fuzzers/parse_ltsv_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size){
fuzz_config = flb_config_init();
fuzz_parser = flb_parser_create("fuzzer", "ltsv", NULL, FLB_TRUE,
NULL, NULL, NULL, MK_FALSE,
MK_TRUE, FLB_FALSE, NULL, 0, NULL,
fuzz_config);
MK_TRUE, FLB_FALSE, FLB_FALSE, NULL, 0,
NULL, fuzz_config);
flb_parser_do(fuzz_parser, (char*)data, size,
&out_buf, &out_size, &out_time);

Expand Down
2 changes: 1 addition & 1 deletion tests/internal/fuzzers/parser_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
/* now call into the parser */
fuzz_parser = flb_parser_create("fuzzer", format, pregex, FLB_TRUE,
time_fmt, time_key, time_offset, time_keep, 0, FLB_FALSE,
types, types_len, list, fuzz_config);
FLB_FALSE, types, types_len, list, fuzz_config);

/* Second step is to use the random parser to parse random input */
if (fuzz_parser != NULL) {
Expand Down

0 comments on commit e81fc39

Please sign in to comment.