ldc-developers / ldc

The LLVM-based D Compiler.
http://wiki.dlang.org/LDC
Other
1.22k stars 262 forks source link

3 failing GDB related tests on MacOS for latest master. #3070

Open mattremmel opened 5 years ago

mattremmel commented 5 years ago

These tests appear to be passing for the CI severs. I haven't been able to figure out why they are failing on my machine. I'm new to LDC also, so I apologize if i'm missing something.

System: Macbook Pro 2017 - MacOS Mojave (10.14.3) Commit: 7474c1932ae2381544e251290e9a5074ecaf857b

Test output summary:

1: ********************
1: Failing Tests (3):
1:     LDC :: debuginfo/nested_gdb.d
1:     LDC :: debuginfo/classtypes_gdb.d
1:     LDC :: debuginfo/print_gdb.d
1:
1:   Expected Passes    : 238
1:   Unsupported Tests  : 19
1:   Unexpected Failures: 3
1: ******************** TEST 'LDC :: debuginfo/nested_gdb.d' FAILED ********************
1: Script:
1: --
1: : 'RUN: at line 2';   /workspace/ldc/build/bin/ldc2  -g -of=/workspace/ldc/build/tests/debuginfo/Output/nested_gdb.d.tmp /workspace/ldc/tests/debuginfo/nested_gdb.d
1: : 'RUN: at line 3';   sed -e "/^\\/\\/ GDB:/!d" -e "s,// GDB:,," /workspace/ldc/tests/debuginfo/nested_gdb.d >/workspace/ldc/build/tests/debuginfo/Output/nested_gdb.d.tmp.gdb
1: : 'RUN: at line 4';   gdb /workspace/ldc/build/tests/debuginfo/Output/nested_gdb.d.tmp --batch -x /workspace/ldc/build/tests/debuginfo/Output/nested_gdb.d.tmp.gdb >/workspace/ldc/build/tests/debuginfo/Output/nested_gdb.d.tmp.out 2>&1
1: : 'RUN: at line 5';   FileCheck /workspace/ldc/tests/debuginfo/nested_gdb.d -check-prefix=CHECK < /workspace/ldc/build/tests/debuginfo/Output/nested_gdb.d.tmp.out
1: --
1: Exit Code: 1
1:
1: Command Output (stdout):
1: --
1: $ ":" "RUN: at line 2"
1: $ "/workspace/ldc/build/bin/ldc2" "-g" "-of=/workspace/ldc/build/tests/debuginfo/Output/nested_gdb.d.tmp" "/workspace/ldc/tests/debuginfo/nested_gdb.d"
1: $ ":" "RUN: at line 3"
1: $ "sed" "-e" "/^\/\/ GDB:/!d" "-e" "s,// GDB:,," "/workspace/ldc/tests/debuginfo/nested_gdb.d"
1: $ ":" "RUN: at line 4"
1: $ "gdb" "/workspace/ldc/build/tests/debuginfo/Output/nested_gdb.d.tmp" "--batch" "-x" "/workspace/ldc/build/tests/debuginfo/Output/nested_gdb.d.tmp.gdb"
1: $ ":" "RUN: at line 5"
1: $ "FileCheck" "/workspace/ldc/tests/debuginfo/nested_gdb.d" "-check-prefix=CHECK"
1: # command stderr:
1: /workspace/ldc/tests/debuginfo/nested_gdb.d:16:11: error: CHECK: expected string not found in input
1: // CHECK: $1 = 1
1:           ^
1: <stdin>:1:1: note: scanning from here
1: BFD: /workspace/ldc/build/tests/debuginfo/Output/nested_gdb.d.tmp: unknown load command 0x32
1: ^
1:
1: error: command failed with exit status: 1
1:
1: --
********************
1: FAIL: LDC :: debuginfo/classtypes_gdb.d (179 of 260)
1: ******************** TEST 'LDC :: debuginfo/classtypes_gdb.d' FAILED ********************
1: Script:
1: --
1: : 'RUN: at line 3';   /workspace/ldc/build/bin/ldc2  -g -of=/workspace/ldc/build/tests/debuginfo/Output/classtypes_gdb.d.tmp /workspace/ldc/tests/debuginfo/classtypes_gdb.d
1: : 'RUN: at line 4';   sed -e "/^\\/\\/ GDB:/!d" -e "s,// GDB:,," /workspace/ldc/tests/debuginfo/classtypes_gdb.d >/workspace/ldc/build/tests/debuginfo/Output/classtypes_gdb.d.tmp.gdb
1: : 'RUN: at line 5';   gdb /workspace/ldc/build/tests/debuginfo/Output/classtypes_gdb.d.tmp --batch -x /workspace/ldc/build/tests/debuginfo/Output/classtypes_gdb.d.tmp.gdb >/workspace/ldc/build/tests/debuginfo/Output/classtypes_gdb.d.tmp.out 2>&1
1: : 'RUN: at line 6';   FileCheck /workspace/ldc/tests/debuginfo/classtypes_gdb.d -check-prefix=CHECK < /workspace/ldc/build/tests/debuginfo/Output/classtypes_gdb.d.tmp.out
1: --
1: Exit Code: 1
1:
1: Command Output (stdout):
1: --
1: $ ":" "RUN: at line 3"
1: $ "/workspace/ldc/build/bin/ldc2" "-g" "-of=/workspace/ldc/build/tests/debuginfo/Output/classtypes_gdb.d.tmp" "/workspace/ldc/tests/debuginfo/classtypes_gdb.d"
1: $ ":" "RUN: at line 4"
1: $ "sed" "-e" "/^\/\/ GDB:/!d" "-e" "s,// GDB:,," "/workspace/ldc/tests/debuginfo/classtypes_gdb.d"
1: $ ":" "RUN: at line 5"
1: $ "gdb" "/workspace/ldc/build/tests/debuginfo/Output/classtypes_gdb.d.tmp" "--batch" "-x" "/workspace/ldc/build/tests/debuginfo/Output/classtypes_gdb.d.tmp.gdb"
1: $ ":" "RUN: at line 6"
1: $ "FileCheck" "/workspace/ldc/tests/debuginfo/classtypes_gdb.d" "-check-prefix=CHECK"
1: # command stderr:
1: /workspace/ldc/tests/debuginfo/classtypes_gdb.d:42:11: error: CHECK: expected string not found in input
1: // CHECK: D main
1:           ^
1: <stdin>:1:1: note: scanning from here
1: BFD: /workspace/ldc/build/tests/debuginfo/Output/classtypes_gdb.d.tmp: unknown load command 0x32
1: ^
1: <stdin>:1:11: note: possible intended match here
1: BFD: /workspace/ldc/build/tests/debuginfo/Output/classtypes_gdb.d.tmp: unknown load command 0x32
1:           ^
1:
1: error: command failed with exit status: 1
1:
1: --
********************
1: FAIL: LDC :: debuginfo/print_gdb.d (180 of 260)
1: ******************** TEST 'LDC :: debuginfo/print_gdb.d' FAILED ********************
1: Script:
1: --
1: : 'RUN: at line 2';   /workspace/ldc/build/bin/ldc2  -I/workspace/ldc/tests/debuginfo -g -of=/workspace/ldc/build/tests/debuginfo/Output/print_gdb.d.tmp /workspace/ldc/tests/debuginfo/print_gdb.d /workspace/ldc/tests/debuginfo/inputs/import_a.d /workspace/ldc/tests/debuginfo/inputs/import_b.d
1: : 'RUN: at line 3';   sed -e "/^\\/\\/ GDB:/!d" -e "s,// GDB:,," /workspace/ldc/tests/debuginfo/print_gdb.d >/workspace/ldc/build/tests/debuginfo/Output/print_gdb.d.tmp.gdb
1: : 'RUN: at line 4';   env LANG=C gdb /workspace/ldc/build/tests/debuginfo/Output/print_gdb.d.tmp --batch -x /workspace/ldc/build/tests/debuginfo/Output/print_gdb.d.tmp.gdb >/workspace/ldc/build/tests/debuginfo/Output/print_gdb.d.tmp.out 2>&1
1: : 'RUN: at line 5';   FileCheck /workspace/ldc/tests/debuginfo/print_gdb.d -check-prefix=CHECK < /workspace/ldc/build/tests/debuginfo/Output/print_gdb.d.tmp.out
1: --
1: Exit Code: 1
1:
1: Command Output (stdout):
1: --
1: $ ":" "RUN: at line 2"
1: $ "/workspace/ldc/build/bin/ldc2" "-I/workspace/ldc/tests/debuginfo" "-g" "-of=/workspace/ldc/build/tests/debuginfo/Output/print_gdb.d.tmp" "/workspace/ldc/tests/debuginfo/print_gdb.d" "/workspace/ldc/tests/debuginfo/inputs/import_a.d" "/workspace/ldc/tests/debuginfo/inputs/import_b.d"
1: $ ":" "RUN: at line 3"
1: $ "sed" "-e" "/^\/\/ GDB:/!d" "-e" "s,// GDB:,," "/workspace/ldc/tests/debuginfo/print_gdb.d"
1: $ ":" "RUN: at line 4"
1: $ "gdb" "/workspace/ldc/build/tests/debuginfo/Output/print_gdb.d.tmp" "--batch" "-x" "/workspace/ldc/build/tests/debuginfo/Output/print_gdb.d.tmp.gdb"
1: $ ":" "RUN: at line 5"
1: $ "FileCheck" "/workspace/ldc/tests/debuginfo/print_gdb.d" "-check-prefix=CHECK"
1: # command stderr:
1: /workspace/ldc/tests/debuginfo/print_gdb.d:70:11: error: CHECK: expected string not found in input
1: // CHECK: = 987
1:           ^
1: <stdin>:1:1: note: scanning from here
1: BFD: /workspace/ldc/build/tests/debuginfo/Output/print_gdb.d.tmp: unknown load command 0x32
1: ^
1: <stdin>:1:4: note: possible intended match here
1: BFD: /workspace/ldc/build/tests/debuginfo/Output/print_gdb.d.tmp: unknown load command 0x32
1:    ^
1:
1: error: command failed with exit status: 1
1:
1: --
kinke commented 5 years ago

These tests are skipped on macOS during CI, as there's no installed gdb for those boxes.

JohanEngelen commented 5 years ago

The gdb on your machine does not support loading of the executables that LDC creates (verify that manually): https://stackoverflow.com/a/53592143/3215806