• David du Colombier's avatar
    net: fix TestCloseError on Plan 9 · 0c02280f
    David du Colombier authored
    Since CL 30614, TestCloseError is failing on Plan 9,
    because File.Write now checks f.fd == badFd before
    calling syscall.Write.
    
    The f.fd == badFd check returns os.ErrClosed, while
    syscall.Write returned a syscall.ErrorString error.
    
    TestCloseError was failing because it expected a
    syscall.ErrorString error.
    
    We add a case in parseCloseError to handle the
    os.ErrClosed case.
    
    Fixes #17569.
    
    Change-Id: I6b4d956d18ed6d3c2ac5211ffd50a4888f7521e1
    Reviewed-on: https://go-review.googlesource.com/31872
    Run-TryBot: David du Colombier <0intro@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    0c02280f
error_test.go 18.5 KB