Skip to content

Commit

Permalink
Replace output_equivalence test with regression tests (#333)
Browse files Browse the repository at this point in the history
Bug fixes require us to have different output from binutils addr2line,
but we don't exactly match llvm-addr2line either, so there is no
good way to compare our output against existing tools.
Switch to using a regression test for our output instead.
  • Loading branch information
philipc authored Oct 4, 2024
1 parent f4e1bef commit 9055f28
Show file tree
Hide file tree
Showing 34 changed files with 1,308 additions and 142 deletions.
5 changes: 0 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ cargo-all = []
# stable interface of this crate.
rustc-dep-of-std = ['core', 'alloc', 'compiler_builtins', 'gimli/rustc-dep-of-std']

[[test]]
name = "output_equivalence"
harness = false
required-features = ["bin"]

[[test]]
name = "testinput"
harness = false
Expand Down
48 changes: 48 additions & 0 deletions testoutput/flags/base-a
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
0x0000000000001060
/object/testfiles/dwarf/base.cpp:26
0x0000000000001068
/object/testfiles/dwarf/base.cpp:26
0x000000000000106a
/object/testfiles/dwarf/base.cpp:26
0x000000000000107a
/object/testfiles/dwarf/base.cpp:28
0x000000000000107f
/object/testfiles/dwarf/base.cpp:28
0x0000000000001084
/object/testfiles/dwarf/base.cpp:30
0x0000000000001190
/object/testfiles/dwarf/base.cpp:12
0x0000000000001194
/object/testfiles/dwarf/base.cpp:14
0x00000000000011b0
/object/testfiles/dwarf/base.cpp:15
0x00000000000011b3
/object/testfiles/dwarf/base.cpp:15
0x00000000000011b7
/object/testfiles/dwarf/base.cpp:15
0x00000000000011bb
/object/testfiles/dwarf/base.cpp:14
0x00000000000011c0
/object/testfiles/dwarf/base.cpp:16
0x00000000000011d0
/object/testfiles/dwarf/base.cpp:19
0x00000000000011d4
/object/testfiles/dwarf/base.cpp:20
0x0000000000001200
/object/testfiles/dwarf/base.cpp:15
0x0000000000001203
/object/testfiles/dwarf/base.cpp:15
0x0000000000001207
/object/testfiles/dwarf/base.cpp:15
0x000000000000120b
/object/testfiles/dwarf/base.cpp:14
0x0000000000001230
/object/testfiles/dwarf/base.cpp:15
0x0000000000001233
/object/testfiles/dwarf/base.cpp:15
0x0000000000001237
/object/testfiles/dwarf/base.cpp:15
0x000000000000123b
/object/testfiles/dwarf/base.cpp:14
0x0000000000001240
/object/testfiles/dwarf/base.cpp:24
72 changes: 72 additions & 0 deletions testoutput/flags/base-af
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
0x0000000000001060
main
/object/testfiles/dwarf/base.cpp:26
0x0000000000001068
main
/object/testfiles/dwarf/base.cpp:26
0x000000000000106a
main
/object/testfiles/dwarf/base.cpp:26
0x000000000000107a
main
/object/testfiles/dwarf/base.cpp:28
0x000000000000107f
main
/object/testfiles/dwarf/base.cpp:28
0x0000000000001084
main
/object/testfiles/dwarf/base.cpp:30
0x0000000000001190
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:12
0x0000000000001194
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:14
0x00000000000011b0
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
0x00000000000011b3
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
0x00000000000011b7
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
0x00000000000011bb
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:14
0x00000000000011c0
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:16
0x00000000000011d0
_ZN3Foo3fooEi
/object/testfiles/dwarf/base.cpp:19
0x00000000000011d4
_ZN3Foo3fooEi
/object/testfiles/dwarf/base.cpp:20
0x0000000000001200
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
0x0000000000001203
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
0x0000000000001207
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
0x000000000000120b
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:14
0x0000000000001230
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
0x0000000000001233
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
0x0000000000001237
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
0x000000000000123b
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:14
0x0000000000001240
_ZN3Foo3fooEi
/object/testfiles/dwarf/base.cpp:24
56 changes: 56 additions & 0 deletions testoutput/flags/base-ai
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
0x0000000000001060
/object/testfiles/dwarf/base.cpp:26
0x0000000000001068
/object/testfiles/dwarf/base.cpp:26
0x000000000000106a
/object/testfiles/dwarf/base.cpp:26
0x000000000000107a
/object/testfiles/dwarf/base.cpp:28
0x000000000000107f
/object/testfiles/dwarf/base.cpp:28
0x0000000000001084
/object/testfiles/dwarf/base.cpp:30
0x0000000000001190
/object/testfiles/dwarf/base.cpp:12
0x0000000000001194
/object/testfiles/dwarf/base.cpp:14
0x00000000000011b0
/object/testfiles/dwarf/base.cpp:15
0x00000000000011b3
/object/testfiles/dwarf/base.cpp:15
0x00000000000011b7
/object/testfiles/dwarf/base.cpp:15
0x00000000000011bb
/object/testfiles/dwarf/base.cpp:14
0x00000000000011c0
/object/testfiles/dwarf/base.cpp:16
0x00000000000011d0
/object/testfiles/dwarf/base.cpp:19
0x00000000000011d4
/object/testfiles/dwarf/base.cpp:20
0x0000000000001200
/object/testfiles/dwarf/base.cpp:15
/object/testfiles/dwarf/base.cpp:21
0x0000000000001203
/object/testfiles/dwarf/base.cpp:15
/object/testfiles/dwarf/base.cpp:21
0x0000000000001207
/object/testfiles/dwarf/base.cpp:15
/object/testfiles/dwarf/base.cpp:21
0x000000000000120b
/object/testfiles/dwarf/base.cpp:14
/object/testfiles/dwarf/base.cpp:21
0x0000000000001230
/object/testfiles/dwarf/base.cpp:15
/object/testfiles/dwarf/base.cpp:23
0x0000000000001233
/object/testfiles/dwarf/base.cpp:15
/object/testfiles/dwarf/base.cpp:23
0x0000000000001237
/object/testfiles/dwarf/base.cpp:15
/object/testfiles/dwarf/base.cpp:23
0x000000000000123b
/object/testfiles/dwarf/base.cpp:14
/object/testfiles/dwarf/base.cpp:23
0x0000000000001240
/object/testfiles/dwarf/base.cpp:24
88 changes: 88 additions & 0 deletions testoutput/flags/base-aif
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
0x0000000000001060
main
/object/testfiles/dwarf/base.cpp:26
0x0000000000001068
main
/object/testfiles/dwarf/base.cpp:26
0x000000000000106a
main
/object/testfiles/dwarf/base.cpp:26
0x000000000000107a
main
/object/testfiles/dwarf/base.cpp:28
0x000000000000107f
main
/object/testfiles/dwarf/base.cpp:28
0x0000000000001084
main
/object/testfiles/dwarf/base.cpp:30
0x0000000000001190
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:12
0x0000000000001194
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:14
0x00000000000011b0
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
0x00000000000011b3
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
0x00000000000011b7
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
0x00000000000011bb
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:14
0x00000000000011c0
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:16
0x00000000000011d0
_ZN3Foo3fooEi
/object/testfiles/dwarf/base.cpp:19
0x00000000000011d4
_ZN3Foo3fooEi
/object/testfiles/dwarf/base.cpp:20
0x0000000000001200
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
_ZN3Foo3fooEi
/object/testfiles/dwarf/base.cpp:21
0x0000000000001203
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
_ZN3Foo3fooEi
/object/testfiles/dwarf/base.cpp:21
0x0000000000001207
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
_ZN3Foo3fooEi
/object/testfiles/dwarf/base.cpp:21
0x000000000000120b
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:14
_ZN3Foo3fooEi
/object/testfiles/dwarf/base.cpp:21
0x0000000000001230
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
_ZN3Foo3fooEi
/object/testfiles/dwarf/base.cpp:23
0x0000000000001233
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
_ZN3Foo3fooEi
/object/testfiles/dwarf/base.cpp:23
0x0000000000001237
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:15
_ZN3Foo3fooEi
/object/testfiles/dwarf/base.cpp:23
0x000000000000123b
_ZN3Foo3barEPKc
/object/testfiles/dwarf/base.cpp:14
_ZN3Foo3fooEi
/object/testfiles/dwarf/base.cpp:23
0x0000000000001240
_ZN3Foo3fooEi
/object/testfiles/dwarf/base.cpp:24
32 changes: 32 additions & 0 deletions testoutput/flags/base-aip
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
0x0000000000001060: /object/testfiles/dwarf/base.cpp:26
0x0000000000001068: /object/testfiles/dwarf/base.cpp:26
0x000000000000106a: /object/testfiles/dwarf/base.cpp:26
0x000000000000107a: /object/testfiles/dwarf/base.cpp:28
0x000000000000107f: /object/testfiles/dwarf/base.cpp:28
0x0000000000001084: /object/testfiles/dwarf/base.cpp:30
0x0000000000001190: /object/testfiles/dwarf/base.cpp:12
0x0000000000001194: /object/testfiles/dwarf/base.cpp:14
0x00000000000011b0: /object/testfiles/dwarf/base.cpp:15
0x00000000000011b3: /object/testfiles/dwarf/base.cpp:15
0x00000000000011b7: /object/testfiles/dwarf/base.cpp:15
0x00000000000011bb: /object/testfiles/dwarf/base.cpp:14
0x00000000000011c0: /object/testfiles/dwarf/base.cpp:16
0x00000000000011d0: /object/testfiles/dwarf/base.cpp:19
0x00000000000011d4: /object/testfiles/dwarf/base.cpp:20
0x0000000000001200: /object/testfiles/dwarf/base.cpp:15
(inlined by) /object/testfiles/dwarf/base.cpp:21
0x0000000000001203: /object/testfiles/dwarf/base.cpp:15
(inlined by) /object/testfiles/dwarf/base.cpp:21
0x0000000000001207: /object/testfiles/dwarf/base.cpp:15
(inlined by) /object/testfiles/dwarf/base.cpp:21
0x000000000000120b: /object/testfiles/dwarf/base.cpp:14
(inlined by) /object/testfiles/dwarf/base.cpp:21
0x0000000000001230: /object/testfiles/dwarf/base.cpp:15
(inlined by) /object/testfiles/dwarf/base.cpp:23
0x0000000000001233: /object/testfiles/dwarf/base.cpp:15
(inlined by) /object/testfiles/dwarf/base.cpp:23
0x0000000000001237: /object/testfiles/dwarf/base.cpp:15
(inlined by) /object/testfiles/dwarf/base.cpp:23
0x000000000000123b: /object/testfiles/dwarf/base.cpp:14
(inlined by) /object/testfiles/dwarf/base.cpp:23
0x0000000000001240: /object/testfiles/dwarf/base.cpp:24
32 changes: 32 additions & 0 deletions testoutput/flags/base-aipf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
0x0000000000001060: main at /object/testfiles/dwarf/base.cpp:26
0x0000000000001068: main at /object/testfiles/dwarf/base.cpp:26
0x000000000000106a: main at /object/testfiles/dwarf/base.cpp:26
0x000000000000107a: main at /object/testfiles/dwarf/base.cpp:28
0x000000000000107f: main at /object/testfiles/dwarf/base.cpp:28
0x0000000000001084: main at /object/testfiles/dwarf/base.cpp:30
0x0000000000001190: _ZN3Foo3barEPKc at /object/testfiles/dwarf/base.cpp:12
0x0000000000001194: _ZN3Foo3barEPKc at /object/testfiles/dwarf/base.cpp:14
0x00000000000011b0: _ZN3Foo3barEPKc at /object/testfiles/dwarf/base.cpp:15
0x00000000000011b3: _ZN3Foo3barEPKc at /object/testfiles/dwarf/base.cpp:15
0x00000000000011b7: _ZN3Foo3barEPKc at /object/testfiles/dwarf/base.cpp:15
0x00000000000011bb: _ZN3Foo3barEPKc at /object/testfiles/dwarf/base.cpp:14
0x00000000000011c0: _ZN3Foo3barEPKc at /object/testfiles/dwarf/base.cpp:16
0x00000000000011d0: _ZN3Foo3fooEi at /object/testfiles/dwarf/base.cpp:19
0x00000000000011d4: _ZN3Foo3fooEi at /object/testfiles/dwarf/base.cpp:20
0x0000000000001200: _ZN3Foo3barEPKc at /object/testfiles/dwarf/base.cpp:15
(inlined by) _ZN3Foo3fooEi at /object/testfiles/dwarf/base.cpp:21
0x0000000000001203: _ZN3Foo3barEPKc at /object/testfiles/dwarf/base.cpp:15
(inlined by) _ZN3Foo3fooEi at /object/testfiles/dwarf/base.cpp:21
0x0000000000001207: _ZN3Foo3barEPKc at /object/testfiles/dwarf/base.cpp:15
(inlined by) _ZN3Foo3fooEi at /object/testfiles/dwarf/base.cpp:21
0x000000000000120b: _ZN3Foo3barEPKc at /object/testfiles/dwarf/base.cpp:14
(inlined by) _ZN3Foo3fooEi at /object/testfiles/dwarf/base.cpp:21
0x0000000000001230: _ZN3Foo3barEPKc at /object/testfiles/dwarf/base.cpp:15
(inlined by) _ZN3Foo3fooEi at /object/testfiles/dwarf/base.cpp:23
0x0000000000001233: _ZN3Foo3barEPKc at /object/testfiles/dwarf/base.cpp:15
(inlined by) _ZN3Foo3fooEi at /object/testfiles/dwarf/base.cpp:23
0x0000000000001237: _ZN3Foo3barEPKc at /object/testfiles/dwarf/base.cpp:15
(inlined by) _ZN3Foo3fooEi at /object/testfiles/dwarf/base.cpp:23
0x000000000000123b: _ZN3Foo3barEPKc at /object/testfiles/dwarf/base.cpp:14
(inlined by) _ZN3Foo3fooEi at /object/testfiles/dwarf/base.cpp:23
0x0000000000001240: _ZN3Foo3fooEi at /object/testfiles/dwarf/base.cpp:24
32 changes: 32 additions & 0 deletions testoutput/flags/base-aips
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
0x0000000000001060: base.cpp:26
0x0000000000001068: base.cpp:26
0x000000000000106a: base.cpp:26
0x000000000000107a: base.cpp:28
0x000000000000107f: base.cpp:28
0x0000000000001084: base.cpp:30
0x0000000000001190: base.cpp:12
0x0000000000001194: base.cpp:14
0x00000000000011b0: base.cpp:15
0x00000000000011b3: base.cpp:15
0x00000000000011b7: base.cpp:15
0x00000000000011bb: base.cpp:14
0x00000000000011c0: base.cpp:16
0x00000000000011d0: base.cpp:19
0x00000000000011d4: base.cpp:20
0x0000000000001200: base.cpp:15
(inlined by) base.cpp:21
0x0000000000001203: base.cpp:15
(inlined by) base.cpp:21
0x0000000000001207: base.cpp:15
(inlined by) base.cpp:21
0x000000000000120b: base.cpp:14
(inlined by) base.cpp:21
0x0000000000001230: base.cpp:15
(inlined by) base.cpp:23
0x0000000000001233: base.cpp:15
(inlined by) base.cpp:23
0x0000000000001237: base.cpp:15
(inlined by) base.cpp:23
0x000000000000123b: base.cpp:14
(inlined by) base.cpp:23
0x0000000000001240: base.cpp:24
Loading

0 comments on commit 9055f28

Please sign in to comment.