[Issue #46] Fixed wrong setjmp usage
This commit is contained in:
parent
d75eb4f038
commit
4e5d416114
3 changed files with 1 additions and 7 deletions
|
@ -25,10 +25,6 @@
|
|||
|
||||
jmp_buf g_pre_test;
|
||||
|
||||
int setup_abort_test(void) {
|
||||
return !setjmp(g_pre_test);
|
||||
}
|
||||
|
||||
void criterion_abort_test(void) {
|
||||
longjmp(g_pre_test, 1);
|
||||
}
|
||||
|
|
|
@ -29,6 +29,4 @@
|
|||
|
||||
extern jmp_buf g_pre_test;
|
||||
|
||||
int setup_abort_test(void);
|
||||
|
||||
#endif /* !ABORT_H_ */
|
||||
|
|
|
@ -184,7 +184,7 @@ static void run_test_child(struct criterion_test *test,
|
|||
send_event(PRE_TEST, NULL, 0);
|
||||
|
||||
struct timespec_compat ts;
|
||||
if (setup_abort_test()) {
|
||||
if (!setjmp(g_pre_test)) {
|
||||
timer_start(&ts);
|
||||
(test->test ? test->test : nothing)();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue