On Fri, Sep 28, 2018 at 12:05 AM, Uros Bizjak <ubiz...@gmail.com> wrote:
> On Wed, Sep 26, 2018 at 9:57 AM, Uros Bizjak <ubiz...@gmail.com> wrote:
>> I've committed a patch to update libgo to the 1.11 release.  As usual
>> for these updates, the patch is too large to attach to this e-mail
>> message.  I've attached some of the more relevant directories.  This
>> update required some minor patches to the gotools directory and the Go
>> testsuite, also included here.  Bootstrapped and ran Go testsuite on
>> x86_64-pc-linux-gnu.  Committed to mainline.
>
> There is one new libgo failure on CentOS 5.11:
>
> --- FAIL: TestSplice (0.18s)
>     --- FAIL: TestSplice/readerAtEOF (0.01s)
>         splice_test.go:228: closed connection: got err = pipe2:
> function not implemented, handled = false, want handled = true
> FAIL
> FAIL: net
>
> as there is no pipe2 on old systems.

This isn't a real failure, only a testsuite failure.  I believe that
this patch will fix it.  The test is assuming that the unexported
slice function will handle the splice, but if pipe2 does not work then
it doesn't.  The relevant code in internal/poll/splice_linux.go says
"Falling back to pipe is possible, but prior to 2.6.29 splice returns
-EAGAIN instead of 0 when the connection is closed."  Bootstrapped and
ran Go tests on x86_64-pc-linux-gnu (on a newer kernel).  Committed to
mainline.

Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE     (revision 264773)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-53d0d7ca278a5612fcdb5fb098e7bf950a0178ef
+098e36f4ddfcf50aeb34509b5f25b86d7050749c
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/go/net/splice_test.go
===================================================================
--- libgo/go/net/splice_test.go (revision 264648)
+++ libgo/go/net/splice_test.go (working copy)
@@ -11,7 +11,9 @@ import (
        "fmt"
        "io"
        "io/ioutil"
+       "os"
        "sync"
+       "syscall"
        "testing"
 )
 
@@ -225,6 +227,10 @@ func testSpliceReaderAtEOF(t *testing.T)
        serverUp.Close()
        _, err, handled := splice(serverDown.(*TCPConn).fd, serverUp)
        if !handled {
+               if serr, ok := err.(*os.SyscallError); ok && serr.Syscall == 
"pipe2" && serr.Err == syscall.ENOSYS {
+                       t.Skip("pipe2 not supported")
+               }
+
                t.Errorf("closed connection: got err = %v, handled = %t, want 
handled = true", err, handled)
        }
        lr := &io.LimitedReader{

Reply via email to