Bug#851588: diffoscope: skip tests if binutils can't handle the object file format
Mattia Rizzolo
mattia at debian.org
Mon Jan 16 19:45:48 UTC 2017
[ please don't CC me in replies to diffoscope bugs ]
On Mon, Jan 16, 2017 at 07:07:57PM +0000, Daniel Shahaf wrote:
> Mattia Rizzolo wrote on Mon, Jan 16, 2017 at 18:06:48 +0100:
> > So, I finally managed to look into the tests failures were have been
> > seeing in ubuntu's autopkgtest in armhf (and probably also ppc64el and
> > s390x, but I didn't test for that).
> > As supposed, the reason is that we're trying to disassemble x86-64
> > binaries, and the installed multiarch can't deal with them;
>
> Then should we look for 'x86_64-linux-gnu-readelf' rather than bare
> 'readelf'? And likewise for 'objdump' and friends.
No, as that's available only on the binutils:amd64 and
binutils-multiarch:amd64 packages, and aren't available (natively) on
any other architecture; there is no binutils-amd64-linux-gnu or such
available on all architectures. Besides, I'm not sure how other
distributions would cope.
> The expression after the "@" sign is evaluated; that should result in
> a callable object, which is called with the decoratee as an argument.
> In your case, you should be able to pass no parameters, e.g.,
> .
> @skip_if_binutils_do_not_support_x86()
> .
> and then delete the sole formal argument from the function definition.
ISTR I tried that and didn't work, but apparently it does :S
> Note that the parentheses are still required in this case, since the
> thing that is called with 'test_obj_compare_non_existing' as an actual
> parameter is not 'skip_if_binutils_do_not_support_x86' but rather the
> function it returns.
Ok, it could be that I only tried this "variation"...
Thanks for explaining, attached the patch with that change.
--
regards,
Mattia Rizzolo
GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`.
more about me: https://mapreri.org : :' :
Launchpad user: https://launchpad.net/~mapreri `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia `-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Skip-some-tests-involving-readelf-objdump-nm-if-the-.patch
Type: text/x-diff
Size: 4675 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20170116/9dc414d2/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20170116/9dc414d2/attachment.sig>
More information about the Reproducible-builds
mailing list