diff options
author | Micael Karlberg <[email protected]> | 2019-07-04 15:33:14 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-07-04 15:33:14 +0200 |
commit | 6605b3965064a3edce1260e6d77fba55817844b5 (patch) | |
tree | 0410002cac5a96fe9cd06dc08cee87fd0331b6f8 /erts/emulator/test/socket_SUITE.erl | |
parent | 40bf3831e0aae6d77cdcdbcc96fa916c22233c96 (diff) | |
download | otp-6605b3965064a3edce1260e6d77fba55817844b5.tar.gz otp-6605b3965064a3edce1260e6d77fba55817844b5.tar.bz2 otp-6605b3965064a3edce1260e6d77fba55817844b5.zip |
[esock|test] Add conditional skip to debug test case
The api_m_debug test case seems to trigger a gcc bug that
causes a segfault on an ancient Fedora 16 VM (with gcc
version 4.6.3-2). The simplest way to avoid this is to
test for this specific (gcc) version...
OTP-15817
Diffstat (limited to 'erts/emulator/test/socket_SUITE.erl')
-rw-r--r-- | erts/emulator/test/socket_SUITE.erl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/erts/emulator/test/socket_SUITE.erl b/erts/emulator/test/socket_SUITE.erl index 3a45339ce1..d51e7fa464 100644 --- a/erts/emulator/test/socket_SUITE.erl +++ b/erts/emulator/test/socket_SUITE.erl @@ -1664,10 +1664,34 @@ api_m_debug(doc) -> api_m_debug(_Config) when is_list(_Config) -> ?TT(?SECS(5)), tc_try(api_m_debug, + fun() -> has_bugfree_gcc() end, fun() -> ok = api_m_debug() end). +%% For some reason this test case triggers a gcc bug, which causes +%% a segfault, on an ancient Fedora 16 VM. So, check the version of gcc... +%% Not pretty, but the simplest way to skip (without actually testing for the host). +has_bugfree_gcc() -> + has_bugfree_gcc(os:type()). + +%% Make sure we are on linux +has_bugfree_gcc({unix, linux}) -> + has_bugfree_gcc2(os:cmd("cat /etc/issue")); +has_bugfree_gcc(_) -> + ok. + +%% Make sure we are on Fedora 16 +has_bugfree_gcc2("Fedora release 16 " ++ _) -> + has_bugfree_gcc3(os:cmd("gcc --version")); +has_bugfree_gcc2(_) -> + ok. + +has_bugfree_gcc3("gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2" ++ _) -> + skip("Buggy GCC"); +has_bugfree_gcc3(_) -> + ok. + api_m_debug() -> i("get initial info"), #{debug := D0} = socket:info(), |