diff --git a/net/uring/.gitignore b/net/uring/.gitignore index a7255ec2a..7985da7a9 100644 --- a/net/uring/.gitignore +++ b/net/uring/.gitignore @@ -1,3 +1,2 @@ liburing/ *.so -uring-test* diff --git a/net/uring/io_uring_test.go b/net/uring/io_uring_test.go index 3c0b9187c..b4f939d2b 100644 --- a/net/uring/io_uring_test.go +++ b/net/uring/io_uring_test.go @@ -4,6 +4,7 @@ package uring import ( "io/ioutil" + "os" "testing" ) @@ -12,6 +13,7 @@ func TestFile(t *testing.T) { if err != nil { t.Fatalf("failed to create temp file: %v", err) } + defer os.Remove(tmpFile.Name()) f, err := NewFile(tmpFile) if err != nil { t.Fatalf("failed to create io_uring file: %v", err) @@ -19,7 +21,7 @@ func TestFile(t *testing.T) { content := []byte("a test string to check writing works 😀 with non-unicode input") n, err := f.Write(content) if n != len(content) { - t.Errorf("mismatch between reported written len and content len: want %d, got %d", len(content), n) + t.Errorf("mismatch between written len and content len: want %d, got %d", len(content), n) } if err != nil { t.Errorf("file write failed: %v", err)