[DebugInfo][test] Replace pre-canned binary test
authorJames Henderson <james.henderson@sony.com>
Fri, 7 Feb 2020 09:18:43 +0000 (09:18 +0000)
committerJames Henderson <james.henderson@sony.com>
Mon, 10 Feb 2020 13:54:40 +0000 (13:54 +0000)
commit1dc62d0358c89d3e5db970e62723fa8b0b0c56e3
tree725b0ddd52cd753f32f750d1698f095de560b87e
parent34946dfd79501077b0837aec8f23aed3dd0e63e1
[DebugInfo][test] Replace pre-canned binary test

The DebugInfo/dwarfdump-invalid-line-table test used a pre-canned binary
generated by a fuzzer to demonstrate a bug fix. Unfortunately, the
binary is rigid and requires hand-editing if we change behaviour, such
as rejecting certain properties within it (as I plan on doing in another
change).

Rather than hand-edit the binary, I have replaced it with two tests. The
first tests the high-level code path from the debug line parser that
produces the same error as this test previously did, and the second is a
set of unit test cases that comprehensively cover the
FormValue::skipValue method, which in turn covers the area that the
original bug fix touched.

Reviewed by: MaskRay, dblaikie

Differential Revision: https://reviews.llvm.org/D74202
llvm/test/DebugInfo/Inputs/invalid.linetable [deleted file]
llvm/test/DebugInfo/dwarfdump-invalid-line-table.test [deleted file]
llvm/test/tools/llvm-dwarfdump/X86/Inputs/debug_line_malformed.s
llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
llvm/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp