From 65864bd2a680ce25c61802a416514fd526ad82a4 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 6 Jun 2006 04:30:21 +0000 Subject: * ld-elfvers/vers.exp (objdump_versionstuff): Allow versions in any order. * ld-elfvers/vers1.ver: Update. * ld-elfvers/vers2.ver: Update. * ld-elfvers/vers4a.ver: Update. * ld-elfvers/vers7a.ver: Update. * ld-elfvers/vers8.ver: Update. * ld-elfvers/vers9.ver: Update. * ld-elfvers/vers15.ver: Update. * ld-elfvers/vers16a.ver: Update. * ld-elfvers/vers17.ver: Update. * ld-elfvers/vers18.ver: Update. * ld-elfvers/vers20.ver: Update. * ld-elfvers/vers20a.ver: Update. * ld-elfvers/vers21.ver: Update. * ld-elfvers/vers22a.ver: Update. * ld-elfvers/vers22b.ver: Update. * ld-elfvers/vers23a.ver: Update. * ld-elfvers/vers23b.ver: Update. * ld-elfvers/vers23c.ver: Update. * ld-elfvers/vers25a.ver: Update. * ld-elfvers/vers26a.ver: Update. * ld-elfvers/vers27a.ver: Update. * ld-elfvers/vers27d.ver: Update. * ld-elfvers/vers28b.ver: Update. * ld-elfvers/vers29.ver: Update. * ld-elfvers/vers30.ver: Update. * ld-elfvers/vers31.ver: Update. --- ld/testsuite/ld-elfvers/vers.exp | 45 +++++++++++++++------------------------- 1 file changed, 17 insertions(+), 28 deletions(-) (limited to 'ld/testsuite/ld-elfvers/vers.exp') diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp index 6bb77a7..d8ba1b8 100644 --- a/ld/testsuite/ld-elfvers/vers.exp +++ b/ld/testsuite/ld-elfvers/vers.exp @@ -460,44 +460,33 @@ proc objdump_versionstuff { objdump object expectfile } { # It's OK if there are extra lines in the actual output; they # may come from version information in libc. We require that - # every line in EXPECTFILE appear in the output in order. + # every line in EXPECTFILE appear in the output in any order. - set f1 [open $tmpdir/objdump.out r] set f2 [open $expectfile r] while { [gets $f2 l2] != -1 } { if { ![regexp "^#.*$" $l2] } then { - break - } - } - while { [gets $f1 l1] != -1 } { - if { [string match $l2 $l1] } then { - if { [gets $f2 l2] == -1 } then { + set f1 [open $tmpdir/objdump.out r] + while { [gets $f1 l1] != -1 } { + if { [string match $l2 $l1] } then { + break + } + } + close $f1 + + if { ![string match $l2 $l1] } then { + verbose -log "Did not find \"$l2\"" + set f1 [open $tmpdir/objdump.out r] + while { [gets $f1 l1] != -1 } { + verbose -log $l1 + } close $f1 close $f2 - return 1 + return 0 } } } - - # We reached the end of the output without seeing the line we - # expected. This is a test failure. - - close $f1 close $f2 - - # Support empty expected file. - if [string match "" $l2] then { - return 1 - } - - verbose -log "Did not find \"$l2\"" - set f1 [open $tmpdir/objdump.out r] - while { [gets $f1 l1] != -1 } { - verbose -log $l1 - } - - verbose -log "$exec_output" - return 0 + return 1 } else { verbose -log "$exec_output" return 0 -- cgit v1.1