diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 909ddceac3b..2a067bee787 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -54,7 +54,7 @@ jobs: sudo apt -qy install libseccomp-dev - uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 with: - version: v2.13 + version: v2.15 skip-cache: true # Extra linters, only checking new code from a pull request to main. - name: lint-extra diff --git a/libcontainer/configs/config.go b/libcontainer/configs/config.go index 5306bfc200a..3c167e99506 100644 --- a/libcontainer/configs/config.go +++ b/libcontainer/configs/config.go @@ -629,7 +629,7 @@ func (c *Command) Run(s *specs.State) error { return err case <-timerCh: _ = cmd.Process.Kill() - <-errC + <-errC //nolint:errcheck // Wait error is expected after Kill. return fmt.Errorf("hook ran past specified timeout of %.1fs", c.Timeout.Seconds()) } } diff --git a/libcontainer/logs/logs_linux_test.go b/libcontainer/logs/logs_linux_test.go index b80d28dbd86..c5abcd8aae9 100644 --- a/libcontainer/logs/logs_linux_test.go +++ b/libcontainer/logs/logs_linux_test.go @@ -59,7 +59,10 @@ func TestLogForwardingStopsAfterClosingTheWriter(t *testing.T) { // Do not use finish() here as we check done pipe ourselves. l.w.Close() select { - case <-l.done: + case err := <-l.done: + if err != nil { + t.Fatal(err) + } case <-time.After(10 * time.Second): t.Fatal("log forwarding did not stop after closing the pipe") } diff --git a/notify_socket_test.go b/notify_socket_test.go index 81210851d3b..86a59928e3c 100644 --- a/notify_socket_test.go +++ b/notify_socket_test.go @@ -70,8 +70,8 @@ func expectBarrier(t *testing.T, conn *net.UnixConn, notifyHostChan <-chan error case <-timer.C: // this is the expected case break - case <-notifyHostChan: - t.Fatal("runc has terminated before barrier was lifted") + case err := <-notifyHostChan: + t.Fatalf("runc has terminated before barrier was lifted (err: %v)", err) } // Lift the barrier