From 58f594cdb752acbd9e5b910cd39f513bcd6ba800 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 16 Aug 2012 20:31:34 +0000 Subject: Add a testcase for PR binutils/14481 binutils/ PR binutils/14481 * Makefile.am (BFDTEST1_PROG): New. (TEST_PROGS): Likewise. (bfdtest1_DEPENDENCIES): Likewise. (noinst_PROGRAMS): Add $(TEST_PROGS). * Makefile.in: Regenerated. * bfdtest1.c: New file. binutils/testsuite/ PR binutils/14481 * ar.exp (bfdtest1): New. (long_filenames): Run bfdtest1. (thin_archive): Likewise. (thin_archive_with_nested): Likewise. --- binutils/testsuite/ChangeLog | 8 ++++++++ binutils/testsuite/binutils-all/ar.exp | 29 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) (limited to 'binutils/testsuite') diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index 98555dfc5c..d7d3a043a9 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2012-08-16 H.J. Lu + + PR binutils/14481 + * ar.exp (bfdtest1): New. + (long_filenames): Run bfdtest1. + (thin_archive): Likewise. + (thin_archive_with_nested): Likewise. + 2012-08-13 Ian Bolton Laurent Desnogues Jim MacArthur diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutils-all/ar.exp index 0caa84713d..c66c43ed63 100644 --- a/binutils/testsuite/binutils-all/ar.exp +++ b/binutils/testsuite/binutils-all/ar.exp @@ -27,6 +27,8 @@ if ![is_remote host] { } } +set bfdtest1 [findfile $base_dir/bfdtest1] + # send_user "Version [binutil_version $AR]" # Test long file name support @@ -34,6 +36,7 @@ if ![is_remote host] { proc long_filenames { } { global AR global host_triplet + global bfdtest1 set testname "ar long file names" @@ -124,6 +127,14 @@ proc long_filenames { } { return } + verbose -log "$bfdtest1 $dest" + set exec_output [binutils_run $bfdtest1 "$dest"] + if ![string match "" $exec_output] { + verbose -log $exec_output + fail "$testname (bfdtest1)" + return + } + if [is_remote host] { remote_upload host $n1 tmpdir/$n1 remote_upload host $n2 tmpdir/$n2 @@ -224,6 +235,7 @@ proc thin_archive { } { global NM global srcdir global subdir + global bfdtest1 set testname "ar thin archive" @@ -249,6 +261,14 @@ proc thin_archive { } { return } + verbose -log "$bfdtest1 $archive" + set exec_output [binutils_run $bfdtest1 "$archive"] + if ![string match "" $exec_output] { + verbose -log $exec_output + fail "$testname (bfdtest1)" + return + } + set got [binutils_run $NM "--print-armap $archive"] if { ![string match "*text_symbol in *bintest.o*" $got] \ || ![string match "*data_symbol in *bintest.o*" $got] \ @@ -271,6 +291,7 @@ proc thin_archive_with_nested { } { global NM global srcdir global subdir + global bfdtest1 set testname "ar thin archive with nested archive" @@ -306,6 +327,14 @@ proc thin_archive_with_nested { } { return } + verbose -log "$bfdtest1 $archive" + set exec_output [binutils_run $bfdtest1 "$archive"] + if ![string match "" $exec_output] { + verbose -log $exec_output + fail "$testname (bfdtest1)" + return + } + set got [binutils_run $NM "--print-armap $archive"] if { ![string match "*text_symbol in *bintest.o*" $got] \ || ![string match "*data_symbol in *bintest.o*" $got] \ -- cgit v1.2.3