bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/28602] New: binutils/testsuite/lib/binutils-common.exp: Su


From: i at maskray dot me
Subject: [Bug binutils/28602] New: binutils/testsuite/lib/binutils-common.exp: Support free-form shell commands and check patterns
Date: Thu, 18 Nov 2021 03:04:24 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=28602

            Bug ID: 28602
           Summary: binutils/testsuite/lib/binutils-common.exp: Support
                    free-form shell commands and check patterns
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: i at maskray dot me
  Target Milestone: ---

binutils/testsuite/binutils-all/ gas/testsuite/gas ld/testsuite/ mainly use
dump tests (binutils/testsuite/lib/binutils-common.exp run_dump_test).

>From my https://sourceware.org/pipermail/binutils/2020-May/110948.html

3) Can we allow free-form shell commands instead of specialized directives?

It is mythical what can and what can't be used in `#foo:`.
OK, a user can figure out this with trial and error. Then,
why can't we have multiple dump programs? Frequently we need to check
multiple properties of an output and a single dump program just does not
work well.  The limitation led to some ad-hoc directives like `#map:`.
For example, ld-ifunc/ifunc-1-x86.d says

   #ld: -shared -Map tmpdir/ifunc-1-x86.map --hash-style=sysv
   #objdump: -dw
   #target: x86_64-*-* i?86-*-*
   #map: ifunc-1-x86.map

   #...
   [ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x[0-9a-f]+|)@plt>
   #pass

If we allow free-form shell commands and use line prefixes to differentiate the
two output streams (objdump -d output and ld -Map output):

   ## Test local ifunc are dumped in the link map.
   #RUN: ld: -shared -Map tmpdir/ifunc-1-x86.map --hash-style=sysv %s -o %t
   #RUN: objdump -dw %t | check  # by default, CHECK is the prefix
   #RUN: cat tmpdir/ifunc-1-x86.map | check MAP

   #CHECK: [ \t0-9a-f]+:[ \t0-9a-f]+call[
\t0-9a-fq]+<\*ABS\*(\+0x[0-9a-f]+|)@plt>
   #CHECK-N: if there is a next line
   #CHECK-N: likewise.
   #CHECK:   skip arbitrary lines
   #CHECK-N: if there is a next line

   #MAP: Local IFUNC function ...

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]