From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12703 invoked by alias); 21 Jul 2006 19:14:37 -0000 Received: (qmail 12687 invoked by uid 22791); 21 Jul 2006 19:14:36 -0000 X-Spam-Check-By: sourceware.org Received: from e31.co.us.ibm.com (HELO e31.co.us.ibm.com) (32.97.110.149) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 21 Jul 2006 19:14:32 +0000 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e31.co.us.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k6LJEUne021746 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Fri, 21 Jul 2006 15:14:30 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.6/NCO/VER7.0) with ESMTP id k6LJEU8k152074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 21 Jul 2006 13:14:30 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k6LJEUC6012184 for ; Fri, 21 Jul 2006 13:14:30 -0600 Received: from [9.10.86.122] (spokane1.rchland.ibm.com [9.10.86.122]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k6LJETkh012142; Fri, 21 Jul 2006 13:14:29 -0600 Message-ID: <44C12858.7030502@us.ibm.com> Date: Fri, 21 Jul 2006 19:14:00 -0000 From: Steven Munroe User-Agent: Mozilla/5.0 (X11; U; Linux ppc64; en-US; rv:1.7.8) Gecko/20060411 MIME-Version: 1.0 To: GNU libc hacker CC: Dwayne McConnell , Ryan Arnold Subject: [PATCH] fix run-iconv-test.sh Content-Type: multipart/mixed; boundary="------------020408040801080704050604" Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00002.txt.bz2 This is a multi-part message in MIME format. --------------020408040801080704050604 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-length: 860 The implementation of run-iconv-test.sh will run icong_prov specifying a GCONV_PATH for the current glibc build. Then run the cmp (from the base install) to check the results. This can be a problem because currently cmp will run with the same GCONV_PATH as iconv_prog and cmp does try to load ISO8859-1.so. Since GCONV_PATH is pointing into the current build it will try to load from there. This really gets sticky when there is a ABI or symbol version difference between the glibc build and the base install. For example if there are new relocations which ld.so from the base install does not understand (i.e. the new relocations associated with -msecure-plt). This will cause cmp to fail (segfault in the loader associated with cmp) and all the iconv-tests to fail. The attached patch resolves this by temporarily resetting GCONV_PATH for cmp commands. --------------020408040801080704050604 Content-Type: text/plain; name="ppc-iconv-test-20060713.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ppc-iconv-test-20060713.txt" Content-length: 4679 2006-07-13 Steven Munroe * iconvdata/run-iconv-test.sh: Insure GCONV_PATH is set for iconv_prog and not set for the cmp command. diff -urN libc24-cvstip-20060608/iconvdata/run-iconv-test.sh libc24/iconvdata/run-iconv-test.sh --- libc24-cvstip-20060608/iconvdata/run-iconv-test.sh 2005-09-29 16:43:12.000000000 -0500 +++ libc24/iconvdata/run-iconv-test.sh 2006-07-13 14:23:41.385392446 -0500 @@ -66,7 +66,7 @@ echo "FAILED"; failed=1; continue; } echo $ac_n "OK$ac_c" if test -s testdata/$from..$t; then - cmp $temp1 testdata/$from..$t > /dev/null 2>&1 || + GCONV_PATH= cmp $temp1 testdata/$from..$t > /dev/null 2>&1 || { echo "/FAILED"; failed=1; continue; } echo $ac_n "/OK$ac_c" fi @@ -75,8 +75,11 @@ { if test $? -gt 128; then exit 1; fi echo "FAILED"; failed=1; continue; } echo $ac_n "OK$ac_c" - test -s $temp1 && cmp testdata/$from $temp2 > /dev/null 2>&1 || - { echo "/FAILED"; failed=1; continue; } + { GCONV_PATH= + test -s $temp1 && cmp testdata/$from $temp2 > /dev/null 2>&1 || + { echo "/FAILED"; failed=1; GCONV_PATH=$codir/iconvdata; continue; } + GCONV_PATH=$codir/iconvdata + } echo "/OK" rm -f $temp1 $temp2 fi @@ -91,7 +94,7 @@ { if test $? -gt 128; then exit 1; fi echo "FAILED"; failed=1; continue; } echo $ac_n "OK$ac_c" - cmp testdata/suntzus $temp1 || + GCONV_PATH= cmp testdata/suntzus $temp1 || { echo "/FAILED"; failed=1; continue; } echo "/OK" fi @@ -110,7 +113,7 @@ echo "FAILED"; failed=1; continue; } echo $ac_n "OK$ac_c" if test -s testdata/$from..$t; then - cmp $temp1 testdata/$from..$t > /dev/null 2>&1 || + GCONV_PATH= cmp $temp1 testdata/$from..$t > /dev/null 2>&1 || { echo "/FAILED"; failed=1; continue; } echo $ac_n "/OK$ac_c" fi @@ -120,8 +123,11 @@ { if test $? -gt 128; then exit 1; fi echo "FAILED"; failed=1; continue; } echo $ac_n "OK$ac_c" - test -s $temp1 && cmp testdata/$from $temp2 > /dev/null 2>&1 || - { echo "/FAILED"; failed=1; continue; } + { GCONV_PATH= + test -s $temp1 && cmp testdata/$from $temp2 > /dev/null 2>&1 || + { echo "/FAILED"; failed=1; GCONV_PATH=$codir/iconvdata; continue; } + GCONV_PATH=$codir/iconvdata + } echo "/OK" rm -f $temp1 $temp2 fi @@ -135,7 +141,7 @@ { if test $? -gt 128; then exit 1; fi echo "FAILED"; failed=1; continue; } echo $ac_n "OK$ac_c" - cmp testdata/suntzus $temp1 || + GCONV_PATH= cmp testdata/suntzus $temp1 || { echo "/FAILED"; failed=1; continue; } echo "/OK" fi @@ -153,32 +159,35 @@ # Test conversion to the endianness dependent encoding. echo $ac_n "test encoder: $utf8 -> $from $ac_c" $PROG -f $utf8 -t $from < testdata/${filename}..${utf8} > $temp1 - cmp $temp1 testdata/${filename}..${from}.BE > /dev/null 2>&1 || - cmp $temp1 testdata/${filename}..${from}.LE > /dev/null 2>&1 || - { echo "/FAILED"; failed=1; continue; } + { GCONV_PATH= + cmp $temp1 testdata/${filename}..${from}.BE > /dev/null 2>&1 || + cmp $temp1 testdata/${filename}..${from}.LE > /dev/null 2>&1 || + { echo "/FAILED"; failed=1; GCONV_PATH=$codir/iconvdata; continue; } + GCONV_PATH=$codir/iconvdata + } echo "OK" # Test conversion from the endianness dependent encoding. echo $ac_n "test decoder: $from -> $utf8 $ac_c" $PROG -f $from -t $utf8 < testdata/${filename}..${from}.BE > $temp1 - cmp $temp1 testdata/${filename}..${utf8} > /dev/null 2>&1 || + GCONV_PATH= cmp $temp1 testdata/${filename}..${utf8} > /dev/null 2>&1 || { echo "/FAILED"; failed=1; continue; } $PROG -f $from -t $utf8 < testdata/${filename}..${from}.LE > $temp1 - cmp $temp1 testdata/${filename}..${utf8} > /dev/null 2>&1 || + GCONV_PATH= cmp $temp1 testdata/${filename}..${utf8} > /dev/null 2>&1 || { echo "/FAILED"; failed=1; continue; } echo "OK" # Test byte swapping behaviour. echo $ac_n "test non-BOM: ${from}BE -> ${from}LE $ac_c" $PROG -f ${from}BE -t ${from}LE < testdata/${filename}..${from}.BE > $temp1 - cmp $temp1 testdata/${filename}..${from}.LE > /dev/null 2>&1 || + GCONV_PATH= cmp $temp1 testdata/${filename}..${from}.LE > /dev/null 2>&1 || { echo "/FAILED"; failed=1; continue; } echo "OK" # Test byte swapping behaviour. echo $ac_n "test non-BOM: ${from}LE -> ${from}BE $ac_c" $PROG -f ${from}LE -t ${from}BE < testdata/${filename}..${from}.LE > $temp1 - cmp $temp1 testdata/${filename}..${from}.BE > /dev/null 2>&1 || + GCONV_PATH= cmp $temp1 testdata/${filename}..${from}.BE > /dev/null 2>&1 || { echo "/FAILED"; failed=1; continue; } echo "OK" --------------020408040801080704050604--