summaryrefslogtreecommitdiff
path: root/binutils/testsuite
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-08-16 20:31:34 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-08-16 20:31:34 +0000
commit0c13d4dbf32460ce484f142b872c27069c0cb43f (patch)
tree2ce11ec0499308e6b2777151b1639baf9b7409f8 /binutils/testsuite
parent3c692c4839451dad87f8f7e7a17b8ec0ef6d2720 (diff)
downloadbinutils-redhat-0c13d4dbf32460ce484f142b872c27069c0cb43f.tar.gz
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.
Diffstat (limited to 'binutils/testsuite')
-rw-r--r--binutils/testsuite/ChangeLog8
-rw-r--r--binutils/testsuite/binutils-all/ar.exp29
2 files changed, 37 insertions, 0 deletions
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 <hongjiu.lu@intel.com>
+
+ PR binutils/14481
+ * ar.exp (bfdtest1): New.
+ (long_filenames): Run bfdtest1.
+ (thin_archive): Likewise.
+ (thin_archive_with_nested): Likewise.
+
2012-08-13 Ian Bolton <ian.bolton@arm.com>
Laurent Desnogues <laurent.desnogues@arm.com>
Jim MacArthur <jim.macarthur@arm.com>
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] \