debuginfod: Fracture tests/run-debuginfod-find.sh into specific tests

Mark Wielaard mark@klomp.org
Fri Sep 3 08:45:22 GMT 2021


Hi Noah,

On Thu, Sep 02, 2021 at 02:59:06PM -0400, Noah Sanci wrote:
> As for the rpm/Makefile.am stuff, I think that was a temporary fix for
> an odd error  I got while testing. I just forgot to remove it and see if
> it would break again. It has been removed and makes now.
>
> As for the 'base' idea, I gave it some thought and believe this is the
> best solution and I have implemented it.

Great, thanks.

BTW. You don't have to use globals in shell, shell function can take arguments.
They are just not named, so you then have to use $1, $2, etc to use them.
But this works too.

> The patch also includes x-forwarded

It even contained it twice :)
I removed the not really used copy run-debuginfod-X-FORWARDED.sh.

I also removed run-debuginfod-response-headers.sh for now since it
depends on a patch that isn't in yet.

Finally when testing on a system where /bin/sh isn't bash I noticed
that trap err ERR isn't posix shell. Sigh.

I moved the helpers into their own tests/debuginfod-subr.sh which is
then only called from the run-debuginfod-*.sh scripts (which are all
explicitly bash scripts). This does have the advantage that the extra
checks are only run when testing debuginfod and not any of the other
tests.

Attached the variant that I pushed. I hope I didn't mess anything up.

Thanks so much for splitting these tests, it is really great to have
individual test cases.

Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debuginfod-Fracture-tests-run-debuginfod-find.sh-int.patch
Type: text/x-diff
Size: 134951 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/elfutils-devel/attachments/20210903/227f7307/attachment-0001.bin>


More information about the Elfutils-devel mailing list