This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Add a testcase for PR binutils/14481


On Wed, Oct 24, 2012 at 5:17 AM, Thomas Schwinge
<thomas@codesourcery.com> wrote:
> Hi!
>
> On Wed, 24 Oct 2012 04:28:59 -0700, "H.J. Lu" <hjl.tools@gmail.com> wrote:
>> On Tue, Oct 16, 2012 at 8:14 AM, Thomas Schwinge
>> <thomas@codesourcery.com> wrote:
>> > Hi!
>> >
>> > On Thu, 16 Aug 2012 13:32:55 -0700, "H.J. Lu" <hongjiu.lu@intel.com> wrote:
>> >> I checkec in this patch to add a testcase for PR binutils/14481.
>> >
>> >> --- a/binutils/ChangeLog
>> >> +++ b/binutils/ChangeLog
>> >> @@ -1,3 +1,14 @@
>> >> +2012-08-16  H.J. Lu  <hongjiu.lu@intel.com>
>> >> +
>> >> +     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.
>> >> +
>> >
>> >> --- 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.
>> >
>> >> diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutils-all/ar.exp
>> >> index 0caa847..c66c43e 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]
>> >
>> > This is not correct for cross-testing on a Windows host, and results in a
>> > bunch of ERRORs about the file not being found.  Here is a patch -- OK to
>> > commit?
>>
>> diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutil
>> s-all/ar.exp
>> index 05cc261..8b7629e 100644
>> --- a/binutils/testsuite/binutils-all/ar.exp
>> +++ b/binutils/testsuite/binutils-all/ar.exp
>> @@ -27,7 +27,7 @@ if ![is_remote host] {
>>      }
>>  }
>>
>> -set bfdtest1 [findfile $base_dir/bfdtest1]
>> +set bfdtest1 $base_dir/bfdtest1
>>
>>  # send_user "Version [binutil_version $AR]"
>>
>> Can you try this instead?
>
> Yes, that seems a reasonable change anyway (no need ever to transform
> bfdtest1), and it also solves the Windows host issue: Windows allows
> running executables without specifying the .exe suffix.
>

I checked in

diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index 6514b1a..6745baa 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2012-10-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* binutils-all/ar.exp (bfdtest1): Remove findfile.
+
 2012-10-21  H.J. Lu  <hongjiu.lu@intel.com>

 	* binutils-all/dw2-1.W: Updated.
diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutil
s-all/ar.exp
index 05cc261..8b7629e 100644
--- a/binutils/testsuite/binutils-all/ar.exp
+++ b/binutils/testsuite/binutils-all/ar.exp
@@ -27,7 +27,7 @@ if ![is_remote host] {
     }
 }

-set bfdtest1 [findfile $base_dir/bfdtest1]
+set bfdtest1 $base_dir/bfdtest1

 # send_user "Version [binutil_version $AR]"



> These problems remain:
>
> | Then, with that patch applied, the tests still FAIL on Windows hosts:
> |
> |     FAIL: ar long file names (bfdtest1)
> |     FAIL: ar thin archive (bfdtest1)
> |     FAIL: ar thin archive with nested archive (bfdtest1)
> |
> | The first two will go away (PASS) if I force (by copying it over) the
> | unstripped executable binutils/.libs/bfdtest1.exe to be used instead of
> | the stripped one -- huh.  Yet, the last of the three still FAILs.
> | Debugging that is for another day.
>

Those are real Windows target problems.


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]