Skip to content

Commit

Permalink
vsock: check for ENETUNREACH and ETIMEDOUT as well in failed Dial test
Browse files Browse the repository at this point in the history
This happens on Ubuntu focal kernel (5.4).
  • Loading branch information
zhsj committed Aug 23, 2023
1 parent 76b624c commit 3fd056a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion integration_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ func TestIntegrationConnDialNoListener(t *testing.T) {

// Expect one of ECONNRESET or ENODEV depending on the kernel.
switch {
case errors.Is(got.Err, unix.ECONNRESET), errors.Is(got.Err, unix.ENODEV):
case errors.Is(got.Err, unix.ECONNRESET), errors.Is(got.Err, unix.ENODEV),
errors.Is(got.Err, unix.ENETUNREACH), errors.Is(got.Err, unix.ETIMEDOUT):
// OK.
default:
t.Fatalf("unexpected syscall error: %v", got.Err)
Expand Down

0 comments on commit 3fd056a

Please sign in to comment.