]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Testsuite, plugin: make testcase pattern more flexible
authorFrancois-Xavier Coudert <fxcoudert@gmail.com>
Sun, 20 Aug 2023 17:35:18 +0000 (19:35 +0200)
committerFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sun, 20 Aug 2023 17:40:17 +0000 (19:40 +0200)
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.

gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-sarif.c

index 83b38d2ffb5fad5d7e4bbda0eafccd4eb36f1db2..513d66c528d52ae3bba2b6b6b0c02bd44736aeed 100644 (file)
@@ -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" } } */