From: Francois-Xavier Coudert Date: Sun, 20 Aug 2023 17:35:18 +0000 (+0200) Subject: Testsuite, plugin: make testcase pattern more flexible X-Git-Tag: basepoints/gcc-15~6798 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a037992ca9831c8b8e8f6ac35569a5cca01e3680;p=thirdparty%2Fgcc.git Testsuite, plugin: make testcase pattern more flexible On Darwin, the message recorded in the sarif file contains: "message": {"text": "Segmentation fault: 11"} which is different from, e.g., linux: "message": {"text": "Segmentation fault"} Adjusting the testcase pattern to be a little more flexible. gcc/testsuite/ChangeLog: * gcc.dg/plugin/crash-test-write-though-null-sarif.c: Update expected pattern. --- diff --git a/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-sarif.c b/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-sarif.c index 83b38d2ffb5f..513d66c528d5 100644 --- a/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-sarif.c +++ b/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-sarif.c @@ -61,4 +61,4 @@ void test_inject_write_through_null (void) { dg-final { scan-sarif-file "\"startColumn\": 3" } } { dg-final { scan-sarif-file "\"endColumn\": 31" } } { dg-final { scan-sarif-file "\"message\": " } } - { dg-final { scan-sarif-file "\"text\": \"Segmentation fault\"" } } */ + { dg-final { scan-sarif-file "\"text\": \"Segmentation fault" } } */