Two diagnosics tests currently FAIL on Solaris:
FAIL: gcc.dg/plugin/crash-test-nested-write-through-null.c crash-test-nested-write-through-null-sarif.py::test_notificatio
FAIL: gcc.dg/plugin/crash-test-nested-write-through-null.c crash-test-nested-write-through-null-html.py::test_result
The reason is the same in both cases: the tests expect a
Segmentation fault
message, while the capitalization is different on Solaris:
Segmentation Fault
This patch allows for both forms, adjusting
crash-test-write-through-null-stderr.c in a similar way.
Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu.
2025-12-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc/testsuite:
* gcc.dg/plugin/crash-test-nested-write-through-null-html.py:
Import re.
(test_results): Allow for "Segmentation Fault", too.
* gcc.dg/plugin/crash-test-nested-write-through-null-sarif.py:
Likewise.
* gcc.dg/plugin/crash-test-write-through-null-stderr.c
(test_inject_write_through_null): Likewise.
from htmltest import *
import pytest
+import re
@pytest.fixture(scope='function', autouse=True)
def html_tree():
assert ice is not None
ice_msg = ice.find("./xhtml:div[@class='gcc-message']", ns)
assert ice_msg is not None
- assert ice_msg.text == "Segmentation fault"
+ assert re.match("Segmentation [Ff]ault", ice_msg.text)
from sarif import *
import pytest
+import re
@pytest.fixture(scope='function', autouse=True)
def sarif():
notification = notifications[0]
- assert notification['message']['text'] == "Segmentation fault"
+ assert re.match("Segmentation [Ff]ault", notification['message']['text'])
assert notification['level'] == 'error'
loc0 = notification['locations'][0]
void test_inject_write_through_null (void)
{
- inject_write_through_null (); /* { dg-ice "Segmentation fault" } */
+ inject_write_through_null (); /* { dg-ice {Segmentation [Ff]ault} } */
/* { dg-regexp "during GIMPLE pass: crash_test" } */
}