Skip to content

Commit

Permalink
[CN-Test-Gen] Fix issue with printing errors (#908)
Browse files Browse the repository at this point in the history
Introduced by ba4a383
  • Loading branch information
ZippeyKeys12 authored Mar 5, 2025
1 parent ee59264 commit 47aca59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion runtime/libcn/include/cn-testing/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ size_t cn_gen_compute_size(enum cn_gen_sizing_strategy strategy,
if (!replay) { \
cn_gen_set_input_timer(cn_gen_get_milliseconds()); \
} else { \
cn_gen_set_input_timer(0); \
cn_gen_set_input_timeout(0); \
} \
struct cn_gen_##Name##_record* res = cn_gen_##Name(); \
if (cn_gen_backtrack_type() != CN_GEN_BACKTRACK_NONE) { \
Expand Down
7 changes: 6 additions & 1 deletion runtime/libcn/src/cn-testing/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,12 @@ int cn_test_main(int argc, char* argv[]) {
cn_printf(CN_LOGGING_ERROR, "\n");

cn_test_reproduce(&repros[i]);
test_case->func(true, CN_TEST_GEN_PROGRESS_NONE, sizing_strategy, trap);
enum cn_test_result replay_result =
test_case->func(true, CN_TEST_GEN_PROGRESS_NONE, sizing_strategy, trap);
if (replay_result != CN_TEST_FAIL) {
fprintf(stderr, "Replay of failure did not fail.\n");
abort();
}

set_cn_logging_level(CN_LOGGING_NONE);

Expand Down

0 comments on commit 47aca59

Please sign in to comment.