[gofrontend-dev] Re: Go patch committed: Improve name mangling for package paths

Ian Lance Taylor iant@golang.org
Fri Oct 26 20:19:00 GMT 2018


On Fri, Oct 26, 2018 at 9:13 AM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> Hi Than,
>
>> OK, thanks again. Another fix sent:
>>
>>  https://go-review.googlesource.com/c/gofrontend/+/145021
>
> great, thanks again.  While the two previous patches were enough to get
> decent Solaris 11 results, on Solaris 10 all libgo tests still FAIL like
> this:
>
> _testmain.go:9:25: error: reference to undefined identifier 'tar.TestReaderntar'
>     9 |  {"TestFileWriter", tar.TestReaderntar.TestPartialReadntar.TestUninitializedReadntar.TestReadTruncationntar.TestReadHeaderOnlyntar.TestMergePAXntar.TestParsePAXntar.TestReadOldGNUSparseMapntar.TestReadGNUSparsePAXHeadersntar.TestFileReaderntar.TestFitsInBase256ntar.TestParseNumericntar.TestFormatNumericntar.TestFitsInOctalntar.TestParsePAXTimentar.TestFormatPAXTimentar.TestParsePAXRecordntar.TestFormatPAXRecordntar.TestSparseEntriesntar.TestFileInfoHeaderntar.TestFileInfoHeaderDirntar.TestFileInfoHeaderSymlinkntar.TestRoundTripntar.TestHeaderRoundTripntar.TestHeaderAllowedFormatsntar.TestWriterntar.TestPaxntar.TestPaxSymlinkntar.TestPaxNonAsciintar.TestPaxXattrsntar.TestPaxHeadersSortedntar.TestUSTARLongNamentar.TestValidTypeflagWithPAXHeaderntar.TestWriterErrorsntar.TestSplitUSTARPathntar.TestIssue12594ntar.TestFileWriter},
>       |                         ^
> FAIL: archive/tar
>
> This is due to gotest (symtogo):
>
>   echo "$result" | sed -e 's/ /\n/g'
>
> which even Solaris 11.5 Beta /bin/sed treats like this:
>
> $ echo 'a b' | /bin/sed -e 's/ /\n/g'
> anb
>
> I still got decent results because GNU sed is earlier in my PATH on
> Solaris 11, but Solaris 10 lacks it.  However, this seems to work (both
> with Solaris sed and GNU sed):
>
> echo "$result" | /bin/sed -e 's/ /\
> /g'
>
> It allows the Solaris 10 libgo testing to work, but can't tell if that's
> the most portable way to do this.

Thanks for the report.  Fixed by simplifying the code, like so.
Committed to mainline.

Ian
-------------- next part --------------
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 265534)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@
-9785e5c4e868ba55efdb33fc51872b4821770167
+8902fb43c569e4d3ec5bd143bfa8cb6bf2836780
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/testsuite/gotest
===================================================================
--- libgo/testsuite/gotest	(revision 265534)
+++ libgo/testsuite/gotest	(working copy)
@@ -521,13 +521,8 @@ symtogo() {
     if ! expr "$s" : '^[^.]*\.[^.]*$' >/dev/null 2>&1; then
       continue
     fi
-    if [ -z "${result}" ]; then
-      result="${s}"
-    else
-      result="${result} ${s}"
-    fi
+    echo "$s"
   done
-  echo "$result" | sed -e 's/ /\n/g'
 }
 
 {


More information about the Gcc-patches mailing list