Skip to content

Commit a6614ba

Browse files
committed
Fixing TestSetFilecon in selinux test step
Signed-off-by: rajasec <[email protected]>
1 parent 9f4d534 commit a6614ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libcontainer/selinux/selinux_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import (
99
"github.com/opencontainers/runc/libcontainer/selinux"
1010
)
1111

12-
func testSetfilecon(t *testing.T) {
12+
func TestSetfilecon(t *testing.T) {
1313
if selinux.SelinuxEnabled() {
1414
tmp := "selinux_test"
15-
out, _ := os.OpenFile(tmp, os.O_WRONLY, 0)
15+
out, _ := os.OpenFile(tmp, os.O_WRONLY|os.O_CREATE, 0)
1616
out.Close()
1717
err := selinux.Setfilecon(tmp, "system_u:object_r:bin_t:s0")
1818
if err != nil {

0 commit comments

Comments
 (0)