runtime: ignore file-already-closed error if dead shim
fix: #5130 Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
@@ -20,6 +20,7 @@ package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/containerd/fifo"
|
||||
@@ -43,6 +44,9 @@ func TestCheckCopyShimLogError(t *testing.T) {
|
||||
if err := checkCopyShimLogError(ctx, nil); err != nil {
|
||||
t.Fatalf("should return the actual error after context is done, but %v", err)
|
||||
}
|
||||
if err := checkCopyShimLogError(ctx, os.ErrClosed); err != nil {
|
||||
t.Fatalf("should return the actual error after context is done, but %v", err)
|
||||
}
|
||||
if err := checkCopyShimLogError(ctx, fifo.ErrRdFrmWRONLY); err != fifo.ErrRdFrmWRONLY {
|
||||
t.Fatalf("should return the actual error after context is done, but %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user