Restore readelf's string dump to previous behaviour where newlines were caused line...
[deliverable/binutils-gdb.git] / binutils / testsuite / binutils-all / readelf.exp
index 45a022a8b674550c078b97e7749828a53591bd44..cc78e66ea3cd9fe717bd845841d9e10ab2717e6b 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright (C) 1999-2018 Free Software Foundation, Inc.
+#   Copyright (C) 1999-2020 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -40,13 +40,13 @@ proc file_contents { filename } {
 # Find out the size by reading the output of the EI_CLASS field.
 # Similar to the test for readelf -h, but we're just looking for the
 # EI_CLASS line here.
-proc readelf_find_size { binary_file } {
+proc readelf_find_size { binary_file test_iteration } {
     global READELF
     global READELFFLAGS
     global readelf_size
 
     set readelf_size ""
-    set testname "finding out ELF size with readelf -h"
+    set testname "finding out ELF size with readelf -h ($test_iteration)"
     set got [remote_exec host "$READELF $READELFFLAGS -h $binary_file" "" "/dev/null" "readelf.out"]
     if [is_remote host] then {
         remote_upload host "readelf.out"
@@ -335,7 +335,7 @@ if {![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.o]} then {
     }
 
     # First, determine the size, so specific output matchers can be used.
-    readelf_find_size $tempfile
+    readelf_find_size $tempfile 1
 
     # Run the tests.
     readelf_test -h $tempfile readelf.h  {}
@@ -349,6 +349,7 @@ readelf_wi_test
 readelf_compressed_wa_test
 
 readelf_dump_test
+run_dump_test "pr25543"
 
 # PR 13482 - Check for off-by-one errors when dumping .note sections.
 if {![binutils_assemble $srcdir/$subdir/version.s tmpdir/version.o]} then {
@@ -444,7 +445,7 @@ if ![istarget "riscv*-*-*"] then {
        }
 
        # First, determine the size, so specific output matchers can be used.
-       readelf_find_size $tempfile
+       readelf_find_size $tempfile 2
 
        # Make sure that readelf can decode the contents.
        readelf_test -wiaoRlL $tempfile dw5.W { nds32*-elf }
@@ -463,7 +464,7 @@ if {![binutils_assemble_flags $srcdir/$subdir/dwarf-attributes.S tmpdir/dwarf-at
     }
 
     # First, determine the size, so specific output matchers can be used.
-    readelf_find_size $tempfile
+    readelf_find_size $tempfile 3
 
     # Make sure that readelf can decode the contents.
     readelf_test -wi $tempfile dwarf-attributes.W {}
@@ -489,7 +490,7 @@ if {![binutils_assemble $srcdir/$subdir/debuglink.s tmpdir/debuglink.o]} then {
            set tempfile2 [remote_download host tmpdir/linkdebug.debug]
        }
 
-       readelf_test {-wKis} $tempfile objdump.WK2  {}
+       readelf_test {-wKis} $tempfile readelf.wKis  {}
     }
 }
 
This page took 0.024836 seconds and 4 git commands to generate.