Regression tests for ctf reader: Avoid duplicating files
Jose E. Marchesi
jose.marchesi@oracle.com
Wed Nov 10 12:06:33 GMT 2021
> Hello Guillermo and Jose,
>
> Sorry for my late reply.
>
> Guillermo Martinez via Libabigail <libabigail@sourceware.org> a écrit:
>
>> On Thursday, November 4, 2021 2:27:57 AM CST Jose E. Marchesi wrote:
>>
>> Hello libabigail team,
>>>
>>> > I'm working in the implementation of regression tests for ctf reader
>>> > (tests/test-read-ctf.cc), it's very similar to test-read-dwarf.cc, so
>>> > they have some C and header source files that are common among
>>> > them, e.g:
>>> >
>>> > tests/data/test-read-ctf/PR27700/include-dir/priv.h
>>> > tests/data/test-read-ctf/PR27700/include-dir/pub.h
>>> > tests/data/test-read-ctf/PR27700/pub-incdir/inc.h
>>> > tests/data/test-read-ctf/PR27700/test-PR27700.c
>>> > tests/data/test-read-ctf/test-PR26568-1.c
>>> > tests/data/test-read-ctf/test-PR26568-2.c
>>> >
>>> > So, we're planning move those common source file to:
>>> >
>>> > tests/data/test-read-common/
>
> Great.
>
>>> > But we still need *two different* binary files with the debugging
>>> > information: DWARF (-gdwarf) and CTF (-gctf), that they would
>>> > need to be recompiled. The current implementation to test ctf reader
>>> > use binary files previously compiled, so there is one file for
>>> > each binary format:
>>> >
>>> > tests/data/test-read-*ctf*/test-PR26568-1.o
>>> > ...
>>> > tests/data/test-read-*dwarf*/test-PR26568-1.o
>>> >
>>> > So, Are you agree with this approach?
>>> >
>>> > We are looking for the way to avoid duplicating files :-)
>>> >
>>> > Thanks in advanced for your comments!
>
> On Thursday, November 4, 2021 2:27:57 AM CST Jose E. Marchesi wrote:
>
>
>>> An alternative to have two copies of compiled objects is to have just
>>> one copy (in test-read-common) compiled with both -gdwarf -gctf.
>
> Right, we could do that too. You'll thus need to adjust the existing
> tests in test-read-dwarf.cc to make them pick their data from
> test-read-common instead, e.g:
>
> This:
>
> {
> "data/test-read-dwarf/test0",
> "",
> "",
> SEQUENCE_TYPE_ID_STYLE,
> "data/test-read-dwarf/test0.abi",
> "output/test-read-dwarf/test0.abi"
> },
>
> would be changed into:
>
> {
> "data/test-read-common/test0",
> "",
> "",
> SEQUENCE_TYPE_ID_STYLE,
> "data/test-read-common/test0.abi",
> "output/test-read-common/test0.abi"
> },
>
>
> The tests/data/Makefile.am will also need some adjustments.
>
> I think that sounds a fair path to take, as far as I am concerned.
I agree. The binaries are big enough already :)
More information about the Libabigail
mailing list