From: Aaron Merey Date: Fri, 1 Mar 2024 00:46:09 +0000 (-0500) Subject: tests/run-getsrc-die.sh: Avoid using objcopy X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c94a97a2a9d75d224bd2c31e9a33c90ec6e05444;p=thirdparty%2Felfutils.git tests/run-getsrc-die.sh: Avoid using objcopy run-getsrc-die.sh uses objcopy to remove .debug_aranges from some testfiles. However depending how objcopy is built, it may fail to recognize the format of these testfiles. Avoid using objcopy and instead add versions of the testfiles to the testsuite with .debug_aranges already stripped. Signed-off-by: Aaron Merey --- diff --git a/tests/run-getsrc-die.sh b/tests/run-getsrc-die.sh index 54c7ad8c..40f62480 100755 --- a/tests/run-getsrc-die.sh +++ b/tests/run-getsrc-die.sh @@ -21,21 +21,18 @@ # Output/files/lines matched should equal what is done through addr2line # which uses dwfl_module_getsrc. This test uses dwarf_addrdie and # dwarf_getsrc_die -testfiles testfile testfile-inlines testfile-lex-inlines -tempfiles testfile-no-aranges testfile-inlines-no-aranges +testfiles testfile testfile-inlines testfile-no-aranges +testfiles testfile-lex-inlines testfile-inlines-no-aranges tempfiles testfile-lex-inlines-no-aranges good.out getsrc_die.out -# Each test should also pass with no .debug_aranges present. -objcopy --remove-section .debug_aranges testfile testfile-no-aranges -objcopy --remove-section .debug_aranges testfile-inlines testfile-inlines-no-aranges -objcopy --remove-section .debug_aranges testfile-lex-inlines testfile-lex-inlines-no-aranges - cat > good.out <<\EOF /home/drepper/gnu/new-bu/build/ttt/f.c:3 /home/drepper/gnu/new-bu/build/ttt/b.c:4 EOF cat good.out | testrun_compare ${abs_top_builddir}/tests/getsrc_die testfile 0x08048468 0x0804845c + +# Each test should also pass with no .debug_aranges present. cat good.out | testrun_compare ${abs_top_builddir}/tests/getsrc_die testfile-no-aranges 0x08048468 0x0804845c cat > good.out <<\EOF diff --git a/tests/testfile-inlines-no-aranges.bz2 b/tests/testfile-inlines-no-aranges.bz2 new file mode 100644 index 00000000..ab66b17e Binary files /dev/null and b/tests/testfile-inlines-no-aranges.bz2 differ diff --git a/tests/testfile-lex-inlines-no-aranges.bz2 b/tests/testfile-lex-inlines-no-aranges.bz2 new file mode 100644 index 00000000..4ebc4522 Binary files /dev/null and b/tests/testfile-lex-inlines-no-aranges.bz2 differ diff --git a/tests/testfile-no-aranges.bz2 b/tests/testfile-no-aranges.bz2 new file mode 100644 index 00000000..a01db39c Binary files /dev/null and b/tests/testfile-no-aranges.bz2 differ