This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: How to create test suite .d files?
- From: "Maciej W. Rozycki" <macro at linux-mips dot org>
- To: Patrick Conlon <cptjustice at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 6 Aug 2018 19:40:15 +0100 (BST)
- Subject: Re: How to create test suite .d files?
- References: <CAKhaShc_V4d6h7vZp8cnvxuovNSWPoOJD_Oq6zTbk=cQo0PC5A@mail.gmail.com> <alpine.LFD.2.21.1808061626350.18023@eddie.linux-mips.org> <CAKhaShf_O73t9dxX2=9DOBcLUQ3B0N1qBf+M1Z6uq+wo9cqWVQ@mail.gmail.com>
Hi Patrick,
> Thank you for the pointer to the right places to read. I made one by hand
> from the objdump -dw output which I'll submit along with the patch and test
> assembly. I thought there would be a script or whatnot that the output of
> objdump could be fed into. Doing it by hand isn't hard, though.
Well, there is no script, because what you put in a .d file depends on
individual test's needs, which vary greatly, so there isn't a simple
recipe possible to create the match patterns required.
See e.g.:
ld/testsuite/ld-elf/reloc-discard.d
ld/testsuite/ld-mips-elf/bal-jalx-addend-micromips.d
ld/testsuite/ld-mips-elf/lsi-4010-isa.d
ld/testsuite/ld-mips-elf/mips-abiflags-0.d
ld/testsuite/ld-mips-elf/reginfo-0.d
-- to see what I mean, naming a few of my recent additions. And while you
can sometimes use the output from the dump tool used as is (having escaped
characters that have a special meaning in regexps, of course), you often
want to filter out noise that is irrelevant to the feature being tested,
especially if it causes troubles across some targets being tested, such as
due to variations from alignment differences between bare metal ELF vs
Linux targets, etc.
NB please avoid top-posting when replying on this mailing list.
Maciej