Skip to content

Commit 5d21f93

Browse files
committed
mac
1 parent ef72a3c commit 5d21f93

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Diff for: test/signal/test-signalhandler.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
#include <cstdlib>
3131
#include <cstring>
3232

33-
#if !defined(__APPLE__)
33+
//#if !defined(__APPLE__)
3434
#include <cfenv>
35-
#endif
35+
//#endif
3636

3737
// static functions are omitted from trace
3838

@@ -52,16 +52,16 @@
5252
++*(int*)nullptr;
5353
}
5454

55-
#if !defined(__APPLE__)
55+
//#if !defined(__APPLE__)
5656
/*static*/ int my_fpe() // NOLINT(misc-use-internal-linkage)
5757
{
58-
if (feenableexcept(FE_ALL_EXCEPT) == -1)
59-
return 2;
58+
//if (feenableexcept(FE_ALL_EXCEPT) == -1)
59+
// return 2;
6060
if (std::feraiseexcept(FE_ALL_EXCEPT) != 0)
6161
return 3;
6262
return 1 % -1;
6363
}
64-
#endif
64+
//#endif
6565
#endif
6666

6767
int main(int argc, const char * const argv[])
@@ -78,10 +78,10 @@ int main(int argc, const char * const argv[])
7878
my_abort();
7979
else if (strcmp(argv[1], "segv") == 0)
8080
my_segv();
81-
#if !defined(__APPLE__)
81+
//#if !defined(__APPLE__)
8282
else if (strcmp(argv[1], "fpe") == 0)
8383
return my_fpe();
84-
#endif
84+
//#endif
8585

8686
return 0;
8787
#else

Diff for: test/signal/test-signalhandler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def test_segv():
7575
assert exitcode == -11
7676

7777

78-
@pytest.mark.skipif(sys.platform == 'darwin', reason='Cannot raise FPE on macOS')
78+
#@pytest.mark.skipif(sys.platform == 'darwin', reason='Cannot raise FPE on macOS')
7979
def test_fpe():
8080
exitcode, stdout, stderr = __call_process('fpe')
8181
assert stderr == ''

0 commit comments

Comments
 (0)