Skip to content

Commit 62a3146

Browse files
committed
libct/int/cpt: simplify test pre-check
criu check --feature userns also tests for the /proc/self/ns/user presense, so remove the redundant check, and simplify the error message. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent e676dac commit 62a3146

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

libcontainer/integration/checkpoint_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,9 @@ func showFile(t *testing.T, fname string) {
4040
}
4141

4242
func TestUsernsCheckpoint(t *testing.T) {
43-
if _, err := os.Stat("/proc/self/ns/user"); os.IsNotExist(err) {
44-
t.Skip("Test requires userns.")
45-
}
4643
cmd := exec.Command("criu", "check", "--feature", "userns")
4744
if err := cmd.Run(); err != nil {
48-
t.Skip("Unable to c/r a container with userns")
45+
t.Skip("Test requires userns")
4946
}
5047
testCheckpoint(t, true)
5148
}

0 commit comments

Comments
 (0)