Closed langston-barrett closed 4 years ago
Similar tests for the other disassemblers are based on this code: https://github.com/travitch/dismantle/blob/master/dismantle-tablegen/src/Dismantle/Testing.hs. It uses objdump as an oracle and makes sure that we can roundtrip every instruction that objdump knows about.
@kquick suggested that we use elf-edit
instead of creating the .bin
files with objcopy
, which seems much better.
@kquick I think we'll need an update to the Hydra configuration for this branch to work. If you point me in the right direction, I'm happy to give it a shot.
NTS: Kevin says that for this to move forward, we should allow an environment variable to specify the locations of the additional test binaries.
I've updated this with the environment variable configuration, and there's a WIP PR to the Fryingpan config files that will let us test it: https://gitlab-int.galois.com/binary-analysis/nix/-/merge_requests/5
We've merged the configuration changes, so by Monday we should have green checks from Fryingpan. Thanks to @kquick for helping me get Fryingpan configured!
Build is passing on S2N, Kyber, and saw-script
, failing on SFE and Macaw, seemingly due to unrelated goings-on in Renovate-x86:
src/Renovate/Arch/X86_64/ISA.hs:572:27: error:
• Type constructor ‘R.InstructionArchReprKind’ cannot be used here
(Perhaps you intended to use TypeInType)
• In the kind ‘R.InstructionArchReprKind X86.X86_64’
In the type signature:
absToRip :: forall (tp :: R.InstructionArchReprKind X86.X86_64).
MM.Memory 64
-> R.ConcreteAddress X86.X86_64
-> Instruction tp TargetAddress
-> R.ConcreteAddress X86.X86_64 -> D.AddrRef -> Maybe D.AddrRef
|
572 | absToRip :: forall (tp :: R.InstructionArchReprKind X86.X86_64)
Some tests for disassembly of some small binaries. Having a test suite like this is nice because
sample-binaries
, which can benefit multiple projects across Galoistests/data
, increment the expected number of tests, and test that Flexdis86 can disassemble it.