tests: test_elf: fixed readelf exit code 1
Due to a recent code change in readelf, when no section was found,
readelf returned code 1 instead of the previous code 0. This behaviour
change caused diffoscope to not append details whenever a section wasn't
found, including in our own tests.
The modification was made in version 2.29 of binutils and – although was
quickly fixed in version 2.29.1 – leaves a version hole where diffoscope
might not work as expected without further information.
This patch adds a version checker for readelf where a few tests are
ignored if someone happens to be using binutils 2.29.
For more information on the change:
binutils/readelf.c:get_section_contents
Fixes #877728
Signed-off-by:
Juliana Oliveira Rodrigues <juliana.orod@gmail.com>
Loading
Please register or sign in to comment