From a037992ca9831c8b8e8f6ac35569a5cca01e3680 Mon Sep 17 00:00:00 2001 From: Francois-Xavier Coudert Date: Sun, 20 Aug 2023 19:35:18 +0200 Subject: [PATCH] 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. --- .../gcc.dg/plugin/crash-test-write-though-null-sarif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 83b38d2ffb5..513d66c528d 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" } } */