From 49ff2711e10bebf38044525f1d514547aeeffe20 Mon Sep 17 00:00:00 2001 From: Rajasekaran Date: Sun, 29 Nov 2015 09:24:42 +0530 Subject: [PATCH] Fixing xattr test step issue Signed-off-by: Rajasekaran --- libcontainer/xattr/xattr_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libcontainer/xattr/xattr_test.go b/libcontainer/xattr/xattr_test.go index ed9b2bf5..1805568a 100644 --- a/libcontainer/xattr/xattr_test.go +++ b/libcontainer/xattr/xattr_test.go @@ -9,12 +9,13 @@ import ( "github.com/opencontainers/runc/libcontainer/xattr" ) -func testXattr(t *testing.T) { +func TestXattr(t *testing.T) { tmp := "xattr_test" - out, err := os.OpenFile(tmp, os.O_WRONLY, 0) + out, err := os.OpenFile(tmp, os.O_WRONLY|os.O_CREATE, 0) if err != nil { t.Fatal("failed") } + defer os.Remove(tmp) attr := "user.test" out.Close()