[PATCH] gdb/testsuite: add a debuginfod-support.exp helper library

Andrew Burgess aburgess@redhat.com
Tue Sep 20 13:59:20 GMT 2022


Aaron Merey <amerey@redhat.com> writes:

> Hi Andrew,
>
> On Wed, Sep 7, 2022 at 9:51 AM Andrew Burgess via Gdb-patches
> <gdb-patches@sourceware.org> wrote:
>>
>> We currently have a single test for GDB's debuginfod support, this is
>> gdb.debuginfod/fetch_src_and_symbols.exp, this script does all the
>> setup, starts debuginfod, and then does the testing.
>>
>> This commit tries to split the existing script in two, there is a new
>> library lib/debuginfod-support.exp, which contains a helper functions
>> related to running debuginfod tests.  All the code in the new library
>> is basically copied from the existing test case (which is why I
>> retained the copyright date range on the new library), with some minor
>> adjustments to try and make the code a little more generic.
>>
>> One change I made, for example, is the library offers functions to
>> shut down debuginfod, previously we just relied on expect shutting
>> down debuginfod when dejagnu completed.
>>
>> The existing test script is updated to make use of the new library
>> code, and this test is still passing for me.  The only change in the
>> test results is a single test where I changed the name to remove the
>> port number from the test name - the port number can change from run
>> to run, so could make it hard to compare test results.
>>
>> I have also done a little light house keeping on the original test
>> script, updating and adding new comments, and making use of
>> proc_with_prefix in a couple of places.
>
> Thanks for cleaning this up.  The debuginfod tests all pass for me with
> this patch applied on F36.  The server process correctly terminates
> once the tests are finished, even if I ctrl-c part way through.

Thanks for checking this.

I've gone ahead and pushed this patch.

Thanks,
Andrew



More information about the Gdb-patches mailing list