mirror of
https://github.com/golang/sys.git
synced 2026-02-08 03:36:03 +03:00
unix: add missing err checks in tests
Change-Id: I7b1ff99b46273ad32c26247a2435e674c9e42789 Reviewed-on: https://go-review.googlesource.com/75810 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
46eaec7899
commit
7e31d873de
@@ -138,6 +138,9 @@ func TestPassFD(t *testing.T) {
|
||||
uc.Close()
|
||||
})
|
||||
_, oobn, _, _, err := uc.ReadMsgUnix(buf, oob)
|
||||
if err != nil {
|
||||
t.Fatalf("ReadMsgUnix: %v", err)
|
||||
}
|
||||
closeUnix.Stop()
|
||||
|
||||
scms, err := unix.ParseSocketControlMessage(oob[:oobn])
|
||||
@@ -335,6 +338,9 @@ func TestDup(t *testing.T) {
|
||||
t.Fatalf("Write to dup2 fd failed: %v", err)
|
||||
}
|
||||
_, err = unix.Seek(f, 0, 0)
|
||||
if err != nil {
|
||||
t.Fatalf("Seek failed: %v", err)
|
||||
}
|
||||
_, err = unix.Read(f, b2)
|
||||
if err != nil {
|
||||
t.Fatalf("Read back failed: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user