Add -e to test scripts where necessary.

gold/
        * testsuite/icf_safe_so_test.sh: Use "set -e".
        * testsuite/icf_safe_test.sh: Likewise.
        * testsuite/icf_test.sh: Likewise.
This commit is contained in:
Rahul Chaudhry
2017-01-23 17:34:14 -08:00
committed by Cary Coutant
parent fbf32f638c
commit 741bcbe94d
4 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2017-01-23 Rahul Chaudhry <rahulchaudhry@google.com>
* testsuite/icf_safe_so_test.sh: Use "set -e".
* testsuite/icf_safe_test.sh: Likewise.
* testsuite/icf_test.sh: Likewise.
2017-01-23 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com> 2017-01-23 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
* mips.cc (Mips_output_data_plt::rel_plt): Remove const from return * mips.cc (Mips_output_data_plt::rel_plt): Remove const from return

View File

@ -27,6 +27,8 @@
# to verify if identical code folding in safe mode correctly folds # to verify if identical code folding in safe mode correctly folds
# functions in a shared object. # functions in a shared object.
set -e
error_if_symbol_absent() error_if_symbol_absent()
{ {
if ! is_symbol_present $1 $2; if ! is_symbol_present $1 $2;
@ -84,8 +86,7 @@ END {
arch_specific_safe_fold() arch_specific_safe_fold()
{ {
grep -e "Intel 80386" -e "ARM" -e "PowerPC" $1 > /dev/null 2>&1 if grep -q -e "Intel 80386" -e "ARM" -e "PowerPC" $1;
if [ $? -eq 0 ];
then then
check_fold $2 $4 $5 $3 check_fold $2 $4 $5 $3
else else

View File

@ -27,6 +27,8 @@
# ctors and dtors are folded, except for x86 (32 and 64 bit), which # ctors and dtors are folded, except for x86 (32 and 64 bit), which
# uses relocation types to detect if function pointers are taken. # uses relocation types to detect if function pointers are taken.
set -e
check_nofold() check_nofold()
{ {
func_addr_1=`grep $2 $1 | awk '{print $1}'` func_addr_1=`grep $2 $1 | awk '{print $1}'`
@ -57,8 +59,7 @@ END {
arch_specific_safe_fold() arch_specific_safe_fold()
{ {
grep_x86=`grep -q -e "Advanced Micro Devices X86-64" -e "Intel 80386" -e "ARM" -e "TILE" -e "PowerPC" -e "AArch64" -e "IBM S/390" $2` if grep -q -e "Advanced Micro Devices X86-64" -e "Intel 80386" -e "ARM" -e "TILE" -e "PowerPC" -e "AArch64" -e "IBM S/390" $2;
if [ $? -eq 0 ];
then then
check_fold $3 $4 $5 check_fold $3 $4 $5
else else

View File

@ -26,6 +26,8 @@
# File icf_test.cc is in this test. This program checks if the # File icf_test.cc is in this test. This program checks if the
# identical sections are correctly folded. # identical sections are correctly folded.
set -e
check() check()
{ {
awk " awk "