Server test show sys error
Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
parent
99a30d2437
commit
f8e8cc43e6
@ -22,6 +22,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@ -375,6 +376,13 @@ func TestClientEOF(t *testing.T) {
|
|||||||
if ok {
|
if ok {
|
||||||
t.Logf("errno=%d", errno)
|
t.Logf("errno=%d", errno)
|
||||||
} else {
|
} else {
|
||||||
|
var oerr *net.OpError
|
||||||
|
if errors.As(err, &oerr) {
|
||||||
|
serr, sok := oerr.Err.(*os.SyscallError)
|
||||||
|
if sok {
|
||||||
|
t.Logf("Op=%q, syscall=%s, Err=%v", oerr.Op, serr.Syscall, serr.Err)
|
||||||
|
}
|
||||||
|
}
|
||||||
t.Logf("error %q doesn't match syscall.Errno", err)
|
t.Logf("error %q doesn't match syscall.Errno", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user