diff options
author | Alan Modra <amodra@gmail.com> | 2016-05-19 00:09:03 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-05-19 14:07:05 +0930 |
commit | f1b2ca70c95ac45883cd0b5ec94fb1e9beb7a59b (patch) | |
tree | f1a812551e550eb8096103e1b282833e6ce654fb /ld | |
parent | 57e7d118480f4adf8cf1c8a82f234463d15d509d (diff) | |
download | gdb-f1b2ca70c95ac45883cd0b5ec94fb1e9beb7a59b.zip gdb-f1b2ca70c95ac45883cd0b5ec94fb1e9beb7a59b.tar.gz gdb-f1b2ca70c95ac45883cd0b5ec94fb1e9beb7a59b.tar.bz2 |
ld-elf/shared.exp mix_pic_and_non_pic
Tweaks to make it easier to re-run these testcases by hand.
* testsuite/ld-elf/shared.exp (mix_pic_and_non_pic): Pass in
exe name rather than constructing testname. Fix typo in
sub-test name. Log copying. Use -rpath rather than -R.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/shared.exp | 27 |
2 files changed, 18 insertions, 15 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 4dabdf8..7744016 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2016-05-19 Alan Modra <amodra@gmail.com> + + * testsuite/ld-elf/shared.exp (mix_pic_and_non_pic): Pass in + exe name rather than constructing testname. Fix typo in + sub-test name. Log copying. Use -rpath rather than -R. + 2016-05-18 Nick Clifton <nickc@redhat.com> * scripttempl/ft32.sc: Use fixed constants for memory region diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp index ef0747d..ac782f8 100644 --- a/ld/testsuite/ld-elf/shared.exp +++ b/ld/testsuite/ld-elf/shared.exp @@ -607,12 +607,7 @@ if { [istarget *-*-linux*] ] } -proc mix_pic_and_non_pic {xfails cflags ldflags} { - set testname "Mixing PIC and non-PIC" - if { ![ string match "" $cflags$ldflags] } { - set testname "$testname ($cflags $ldflags)" - } - +proc mix_pic_and_non_pic {xfails cflags ldflags exe} { run_cc_link_tests [list \ [list \ "Build libpr19719a.so" \ @@ -631,7 +626,7 @@ proc mix_pic_and_non_pic {xfails cflags ldflags} { "libpr19719b.so" \ ] \ [list \ - "Build pr19073b.o" \ + "Build libpr19719b.o" \ "-r -nostdlib" \ "-fPIC" \ { pr19719b.c } \ @@ -640,33 +635,35 @@ proc mix_pic_and_non_pic {xfails cflags ldflags} { ] \ ] + send_log "cp tmpdir/libpr19719b.so tmpdir/libpr19719.so\n" exec cp tmpdir/libpr19719b.so tmpdir/libpr19719.so run_ld_link_exec_tests [] [list \ [list \ - "Run pr19719" \ - "$ldflags tmpdir/libpr19719b.o tmpdir/libpr19719.so -R tmpdir" \ + "Run $exe fun defined" \ + "$ldflags tmpdir/libpr19719b.o tmpdir/libpr19719.so -rpath tmpdir" \ "" \ { pr19719a.c pr19719c.c } \ - "pr19719" \ + $exe \ "pass.out" \ "$cflags" \ ] \ ] + send_log "cp tmpdir/libpr19719a.so tmpdir/libpr19719.so\n" exec cp tmpdir/libpr19719a.so tmpdir/libpr19719.so foreach targ $xfails { setup_xfail $targ } - set exec_output [run_host_cmd tmpdir/pr19719 ""] + set exec_output [run_host_cmd "tmpdir/$exe" ""] if {![string match "PASS" $exec_output]} { - fail $testname + fail "Run $exe fun undefined" } else { - pass $testname + pass "Run $exe fun undefined" } } -mix_pic_and_non_pic [list "arm*-*-*" "aarch64*-*-*"] "" "" -mix_pic_and_non_pic [] "-fPIE" "-pie" +mix_pic_and_non_pic [list "arm*-*-*" "aarch64*-*-*"] "" "" "pr19719" +mix_pic_and_non_pic [] "-fPIE" "-pie" "pr19719pie" |