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] |
Hi, I have incorporated John's changes and additional icf test changes that missed the "#!/bin/sh". Is this ok to commit ? * testsuite/icf_safe_so_test.sh: Add #!/bin/sh to start. Change == to -eq. * testsuite/icf_string_merge_test.sh: Add #!/bin/sh to start. * testsuite/icf_safe_test.sh: Add #!/bin/sh to start. Change == to -eq. * testsuite/icf_sht_rel_addend_test.sh: Add #!/bin/sh to start. * testsuite/icf_preemptible_functions_test.sh: Add #!/bin/sh to start. Thanks, -Sri. On Sat, Mar 19, 2011 at 1:52 PM, John Marino <binutils@marino.st> wrote: > Most of the gold testsuite scripts start with "#!/bin/sh" and run fine on my > platform. > > > The following test scripts don't specify a shell unlike the rest: > * icf_safe_so_test.sh > * icf_safe_test.sh > ?icf_preemptible_functions_test.sh > ?icf_sht_rel_addend_test.sh > > > Two of those scripts (asterisk) fail on my platform because they use > notation specific to bash. ?I believe the intent is that all testsuite > scripts only require the Bourne shell and therefore these two scripts have a > bug. ?I have attached the patch I used to fix the two broken scripts. > ?Hopefully somebody agrees and incorporates the patches or provides and > alternative solution. > > Regards, > John > > > diff --git a/gold/testsuite/icf_safe_so_test.sh > b/gold/testsuite/icf_safe_so_test.sh > index 315a016..2c88250 100755 > --- a/gold/testsuite/icf_safe_so_test.sh > +++ b/gold/testsuite/icf_safe_so_test.sh > @@ -1,3 +1,5 @@ > +#!/bin/sh > + > ?# icf_safe_so_test.sh -- test --icf=safe > > ?# Copyright 2010 Free Software Foundation, Inc. > @@ -76,7 +78,7 @@ check_fold() > > ?arch_specific_safe_fold() > ?{ > - ? ?if [ $1 == 0 ]; > + ? ?if [ $1 -eq 0 ]; > ? ? then > ? ? ? check_fold $2 $3 $4 > ? ? else > diff --git a/gold/testsuite/icf_safe_test.sh > b/gold/testsuite/icf_safe_test.sh > index d26d40b..74a7fb9 100755 > --- a/gold/testsuite/icf_safe_test.sh > +++ b/gold/testsuite/icf_safe_test.sh > @@ -1,3 +1,5 @@ > +#!/bin/sh > + > ?# icf_safe_test.sh -- test --icf=safe > > ?# Copyright 2009 Free Software Foundation, Inc. > @@ -50,7 +52,7 @@ check_fold() > ?arch_specific_safe_fold() > ?{ > ? ? grep_x86=`grep -q -e "Advanced Micro Devices X86-64" -e "Intel 80386" -e > "ARM" $2` > - ? ?if [ $? == 0 ]; > + ? ?if [ $? -eq 0 ]; > ? ? then > ? ? ? check_fold $1 $3 $4 > ? ? else > >
Attachment:
gold_testsuite_patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |