0008-Remove-failing-tests-with-llvm-libunwind.patch 5.18 KB
Newer Older
1
From 3ed41c304dc5f166e5b82a81c1d7f2c2ef9113aa Mon Sep 17 00:00:00 2001
2
From: Geod24 <pro.mathias.lang@gmail.com>
3
Date: Wed, 6 Jan 2021 16:04:25 +0900
4 5
Subject: Remove failing tests with llvm-libunwind

6 7 8
The GDB tests are problematic on Musl (GDB seems to have issues),
and regarding eh.d, we just disable one failing test,
when multiple exceptions are thrown and -O is used.
9
---
10 11 12 13 14 15 16 17 18 19
 test/runnable/eh.d       |  6 ++++++
 test/runnable/gdb1.d     | 16 ----------------
 test/runnable/gdb10311.d | 20 --------------------
 test/runnable/gdb14225.d | 18 ------------------
 test/runnable/gdb14276.d | 22 ----------------------
 test/runnable/gdb14313.d | 22 ----------------------
 test/runnable/gdb14330.d | 21 ---------------------
 test/runnable/gdb4149.d  | 24 ------------------------
 test/runnable/gdb4181.d  | 23 -----------------------
 9 files changed, 6 insertions(+), 166 deletions(-)
20 21 22 23 24 25 26 27 28 29
 delete mode 100644 test/runnable/gdb1.d
 delete mode 100644 test/runnable/gdb10311.d
 delete mode 100644 test/runnable/gdb14225.d
 delete mode 100644 test/runnable/gdb14276.d
 delete mode 100644 test/runnable/gdb14313.d
 delete mode 100644 test/runnable/gdb14330.d
 delete mode 100644 test/runnable/gdb4149.d
 delete mode 100644 test/runnable/gdb4181.d

diff --git a/test/runnable/eh.d b/test/runnable/eh.d
30
index 7e7ec19eb..deb68ae4e 100644
31
--- a/dmd/test/runnable/eh.d
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
+++ b/dmd/test/runnable/eh.d
@@ -475,6 +475,11 @@ void collideone()
 
 void doublecollide()
 {
+    // Note: This SEGV on Musl when using libunwind directly
+    // However, when not using libunwin, everything else SEGV.
+    // It only triggers when more than two Exceptions are thrown
+    // and `-O` is used, so it's rather rare in practice.
+    version (none) {
     try
     {
         try
@@ -501,6 +506,7 @@ void doublecollide()
             assert(e.next.next.next.msg == "y");
             assert(!e.next.next.next.next);
     }
+    }
 }
 
 void collidetwo()
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
diff --git a/test/runnable/gdb1.d b/test/runnable/gdb1.d
deleted file mode 100644
index 2dc506131..000000000
--- a/dmd/test/runnable/gdb1.d
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-REQUIRED_ARGS: -g
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 15
-r ARG1 ARG2
-echo RESULT=
-p args
----
-GDB_MATCH: RESULT=.*ARG1.*ARG2
-*/
-void main(string[] args)
-{
-    // BP
-}
diff --git a/test/runnable/gdb10311.d b/test/runnable/gdb10311.d
deleted file mode 100644
index 57b040bd9..000000000
--- a/dmd/test/runnable/gdb10311.d
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-REQUIRED_ARGS: -g
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 19
-r
-echo RESULT=
-p x
----
-GDB_MATCH: RESULT=.*33
-*/
-void call(void delegate() dg) { dg(); }
-
-void main()
-{
-    int x=32;
-    call({++x;});
-    // BP
-}
diff --git a/test/runnable/gdb14225.d b/test/runnable/gdb14225.d
deleted file mode 100644
index a97b0424d..000000000
--- a/dmd/test/runnable/gdb14225.d
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-REQUIRED_ARGS: -g
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 17
-r
-echo RESULT=
-p lok
----
-GDB_MATCH: RESULT=.*Something
-*/
-void main()
-{
-    string lok = "Something";
-    auto chars = "Anything".dup;
-    // BP
-}
diff --git a/test/runnable/gdb14276.d b/test/runnable/gdb14276.d
deleted file mode 100644
index ab57427aa..000000000
--- a/dmd/test/runnable/gdb14276.d
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-REQUIRED_ARGS: -g
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 21
-r
-echo RESULT=
-p v[0] + v[1] + v[2] + v[3]
----
-GDB_MATCH: RESULT=.*1234
-*/
-import core.simd;
-
-void main()
-{
-    version (X86_64)
-        int4 v = [1000, 200, 30, 4];
-    else
-        int[4] v = [1000, 200, 30, 4];
-    // BP
-}
diff --git a/test/runnable/gdb14313.d b/test/runnable/gdb14313.d
deleted file mode 100644
index 369ba29d7..000000000
--- a/dmd/test/runnable/gdb14313.d
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-REQUIRED_ARGS: -g
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 21
-r
-echo RESULT=
-p 'gdb.x' + 'gdb.y'
----
-GDB_MATCH: RESULT=.*4000065002
-*/
-module gdb;
-
-__gshared uint x = 4_000_000_000;
-__gshared ushort y = 65000;
-
-void main()
-{
-    ++x; ++y;
-    // BP
-}
diff --git a/test/runnable/gdb14330.d b/test/runnable/gdb14330.d
deleted file mode 100644
index ded690a53..000000000
--- a/dmd/test/runnable/gdb14330.d
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-REQUIRED_ARGS: -g
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 20
-r
-echo RESULT=
-p str
----
-GDB_MATCH: RESULT=.*something
-*/
-module gdb;
-
-__gshared ulong x;
-
-void main()
-{
-    string str = "something";
-    // BP
-}
diff --git a/test/runnable/gdb4149.d b/test/runnable/gdb4149.d
deleted file mode 100644
index 9a29b3c75..000000000
--- a/dmd/test/runnable/gdb4149.d
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-REQUIRED_ARGS: -g
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 17
-r
-echo RESULT=
-p x
----
-GDB_MATCH: RESULT=.*33
-*/
-
-void foo(ref int x)
-{
-    ++x;
-    // BP
-}
-
-void main()
-{
-    auto x = 32;
-    foo(x);
-}
diff --git a/test/runnable/gdb4181.d b/test/runnable/gdb4181.d
deleted file mode 100644
index a859bdded..000000000
--- a/dmd/test/runnable/gdb4181.d
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-REQUIRED_ARGS: -g
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 22
-r
-echo RESULT=
-p 'gdb.x' + 'gdb.STest.y'
----
-GDB_MATCH: RESULT=.*33
-*/
-module gdb;
-
-int x;
-struct STest { static int y; }
-
-void main()
-{
-    x = 11;
-    STest.y = 22;
-    // BP
-}
-- 
2.24.3 (Apple Git-128)