Skip to content

Commit

Permalink
Disable SIGFPE test for Cygwin until fixed
Browse files Browse the repository at this point in the history
The test_fpe test currently fails on Cygwin. Instead of the test
process receiving a SIGFPE it instead fails with a SIGSEGV. The
reason is not yet know. However, attempting a simple program
that installs a SIGFPE handler then does a raise(SIGFPE) does
result in the handler being called.

This test needs to be enabled again once the reason for the failure
is resolved.

See: #97
  • Loading branch information
brarcher committed Dec 19, 2016
1 parent 72aaf37 commit 5c9be98
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/check_check_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ static master_test_t master_tests[] = {
{ "Signal Tests", "test_segv", CK_ERROR, signal_11_8_str },
{ "Signal Tests", "test_non_signal_8", CK_FAILURE, "Early exit with return value 0" },
{ "Signal Tests", "test_fail_unless", CK_FAILURE, "Early exit with return value 1" },
#if !defined(__CYGWIN__)
{ "Signal Tests", "test_fpe", CK_ERROR, signal_8_str },
#endif /* !defined(__CYGWIN__) */
{ "Signal Tests", "test_mark_point", CK_ERROR, signal_8_str },
#endif

Expand Down
8 changes: 8 additions & 0 deletions tests/check_check_sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2272,13 +2272,19 @@ START_TEST(test_segv)
}
END_TEST

/* This test currently does not work on Cygwin, as it results in a
* SIGSEGV instead of a SIGFPE. However, a simple program that installs
* a SIGFPE handler then raise(SIGFPE) works as expected. Further
* investigation is necessary. */
#if !defined(__CYGWIN__)
START_TEST(test_fpe)
{
record_test_name(tcase_name());
record_failure_line_num(__LINE__-4); /* -4 as the failure is reported at START_TEST() */
raise (SIGFPE);
}
END_TEST
#endif /* !defined(__CYGWIN__) */

/*
* This test is to be used when the test is expected to throw signal 8,
Expand Down Expand Up @@ -2959,7 +2965,9 @@ Suite *make_sub_suite(void)
tcase_add_test_raise_signal (tc_signal, test_segv, 8); /* error */
tcase_add_test_raise_signal (tc_signal, test_non_signal_8, 8); /* fail */
tcase_add_test_raise_signal (tc_signal, test_fail_unless, 8); /* fail */
#if !defined(__CYGWIN__)
tcase_add_test (tc_signal, test_fpe);
#endif /* !defined(__CYGWIN__) */
tcase_add_test (tc_signal, test_mark_point);
#endif /* HAVE_FORK */

Expand Down

0 comments on commit 5c9be98

Please sign in to comment.