1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-22 02:35:23 +03:00
aports/community/dmd/0008-Remove-failing-tests-with-llvm-libunwind.patch
Geod24 4c56c9df72 community/dmd: Reduce amount of patches
After investigation, it turns out that only one very specific test fails.
So we an safely run the rest of the file to prevent any further regression.
2021-01-06 10:32:07 +00:00

269 lines
5.2 KiB
Diff

From 3ed41c304dc5f166e5b82a81c1d7f2c2ef9113aa Mon Sep 17 00:00:00 2001
From: Geod24 <pro.mathias.lang@gmail.com>
Date: Wed, 6 Jan 2021 16:04:25 +0900
Subject: Remove failing tests with llvm-libunwind
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.
---
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(-)
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
index 7e7ec19eb..deb68ae4e 100644
--- a/dmd/test/runnable/eh.d
+++ 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()
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)