author | Alberto Bertogli
<albertito@blitiri.com.ar> 2012-08-26 21:23:10 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2012-08-26 21:58:05 UTC |
parent | aaf11880e2a2653205afba45dfa5e0aa6f40b8d0 |
tests/test-enable_stack.c | +7 | -2 |
tests/test-enable_stack_by_name.c | +8 | -2 |
diff --git a/tests/test-enable_stack.c b/tests/test-enable_stack.c index 588390c..7c41405 100644 --- a/tests/test-enable_stack.c +++ b/tests/test-enable_stack.c @@ -29,13 +29,18 @@ void func2(int should_fail) int main(void) { + int r; + fiu_init(0); - fiu_enable_stack("fp-1", 1, NULL, 0, (void *) &func2, -1); + r = fiu_enable_stack("fp-1", 1, NULL, 0, (void *) &func2, -1); + if (r != 0) { + printf("note: fiu_enable_stack() failed, skipping test\n"); + return 0; + } func1(0); func2(1); - fiu_disable("fp-1"); func1(0); diff --git a/tests/test-enable_stack_by_name.c b/tests/test-enable_stack_by_name.c index 78c56ce..b901333 100644 --- a/tests/test-enable_stack_by_name.c +++ b/tests/test-enable_stack_by_name.c @@ -29,13 +29,19 @@ void func2(int should_fail) int main(void) { + int r; + fiu_init(0); - fiu_enable_stack_by_name("fp-1", 1, NULL, 0, "func2", -1); + r = fiu_enable_stack_by_name("fp-1", 1, NULL, 0, "func2", -1); + if (r != 0) { + printf("note: fiu_enable_stack_by_name() failed, " + "skipping test\n"); + return 0; + } func1(0); func2(1); - fiu_disable("fp-1"); func1(0);