mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
*: clean t.Skip messages
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This commit is contained in:
@@ -154,7 +154,7 @@ func TestValidateSecurityWithoutNEWNS(t *testing.T) {
|
||||
|
||||
func TestValidateUsernamespace(t *testing.T) {
|
||||
if _, err := os.Stat("/proc/self/ns/user"); os.IsNotExist(err) {
|
||||
t.Skip("userns is unsupported")
|
||||
t.Skip("Test requires userns.")
|
||||
}
|
||||
config := &configs.Config{
|
||||
Rootfs: "/var",
|
||||
|
||||
@@ -41,7 +41,7 @@ func showFile(t *testing.T, fname string) error {
|
||||
|
||||
func TestUsernsCheckpoint(t *testing.T) {
|
||||
if _, err := os.Stat("/proc/self/ns/user"); os.IsNotExist(err) {
|
||||
t.Skip("userns is unsupported")
|
||||
t.Skip("Test requires userns.")
|
||||
}
|
||||
cmd := exec.Command("criu", "check", "--feature", "userns")
|
||||
if err := cmd.Run(); err != nil {
|
||||
|
||||
@@ -29,7 +29,7 @@ func TestExecPS(t *testing.T) {
|
||||
|
||||
func TestUsernsExecPS(t *testing.T) {
|
||||
if _, err := os.Stat("/proc/self/ns/user"); os.IsNotExist(err) {
|
||||
t.Skip("userns is unsupported")
|
||||
t.Skip("Test requires userns.")
|
||||
}
|
||||
testExecPS(t, true)
|
||||
}
|
||||
@@ -166,7 +166,7 @@ func TestRlimit(t *testing.T) {
|
||||
|
||||
func TestUsernsRlimit(t *testing.T) {
|
||||
if _, err := os.Stat("/proc/self/ns/user"); os.IsNotExist(err) {
|
||||
t.Skip("userns is unsupported")
|
||||
t.Skip("Test requires userns.")
|
||||
}
|
||||
|
||||
testRlimit(t, true)
|
||||
@@ -498,7 +498,7 @@ func TestFreeze(t *testing.T) {
|
||||
|
||||
func TestSystemdFreeze(t *testing.T) {
|
||||
if !systemd.IsRunningSystemd() {
|
||||
t.Skip("Systemd is unsupported")
|
||||
t.Skip("Test requires systemd.")
|
||||
}
|
||||
testFreeze(t, true)
|
||||
}
|
||||
@@ -555,7 +555,7 @@ func TestCpuShares(t *testing.T) {
|
||||
|
||||
func TestCpuSharesSystemd(t *testing.T) {
|
||||
if !systemd.IsRunningSystemd() {
|
||||
t.Skip("Systemd is unsupported")
|
||||
t.Skip("Test requires systemd.")
|
||||
}
|
||||
testCpuShares(t, true)
|
||||
}
|
||||
@@ -590,7 +590,7 @@ func TestPids(t *testing.T) {
|
||||
|
||||
func TestPidsSystemd(t *testing.T) {
|
||||
if !systemd.IsRunningSystemd() {
|
||||
t.Skip("Systemd is unsupported")
|
||||
t.Skip("Test requires systemd.")
|
||||
}
|
||||
testPids(t, true)
|
||||
}
|
||||
@@ -664,7 +664,7 @@ func TestCgroupResourcesUnifiedErrorOnV1(t *testing.T) {
|
||||
|
||||
func TestCgroupResourcesUnifiedErrorOnV1Systemd(t *testing.T) {
|
||||
if !systemd.IsRunningSystemd() {
|
||||
t.Skip("Systemd is unsupported")
|
||||
t.Skip("Test requires systemd.")
|
||||
}
|
||||
testCgroupResourcesUnifiedErrorOnV1(t, true)
|
||||
}
|
||||
@@ -699,7 +699,7 @@ func TestCgroupResourcesUnified(t *testing.T) {
|
||||
|
||||
func TestCgroupResourcesUnifiedSystemd(t *testing.T) {
|
||||
if !systemd.IsRunningSystemd() {
|
||||
t.Skip("Systemd is unsupported")
|
||||
t.Skip("Test requires systemd.")
|
||||
}
|
||||
testCgroupResourcesUnified(t, true)
|
||||
}
|
||||
@@ -1720,7 +1720,7 @@ func TestInitJoinPID(t *testing.T) {
|
||||
|
||||
func TestInitJoinNetworkAndUser(t *testing.T) {
|
||||
if _, err := os.Stat("/proc/self/ns/user"); os.IsNotExist(err) {
|
||||
t.Skip("userns is unsupported")
|
||||
t.Skip("Test requires userns.")
|
||||
}
|
||||
if testing.Short() {
|
||||
return
|
||||
@@ -1861,7 +1861,7 @@ func TestTmpfsCopyUp(t *testing.T) {
|
||||
|
||||
func TestCGROUPPrivate(t *testing.T) {
|
||||
if _, err := os.Stat("/proc/self/ns/cgroup"); os.IsNotExist(err) {
|
||||
t.Skip("cgroupns is unsupported")
|
||||
t.Skip("Test requires cgroupns.")
|
||||
}
|
||||
if testing.Short() {
|
||||
return
|
||||
@@ -1890,7 +1890,7 @@ func TestCGROUPPrivate(t *testing.T) {
|
||||
|
||||
func TestCGROUPHost(t *testing.T) {
|
||||
if _, err := os.Stat("/proc/self/ns/cgroup"); os.IsNotExist(err) {
|
||||
t.Skip("cgroupns is unsupported")
|
||||
t.Skip("Test requires cgroupns.")
|
||||
}
|
||||
if testing.Short() {
|
||||
return
|
||||
|
||||
@@ -72,7 +72,7 @@ func TestExecIn(t *testing.T) {
|
||||
|
||||
func TestExecInUsernsRlimit(t *testing.T) {
|
||||
if _, err := os.Stat("/proc/self/ns/user"); os.IsNotExist(err) {
|
||||
t.Skip("userns is unsupported")
|
||||
t.Skip("Test requires userns.")
|
||||
}
|
||||
|
||||
testExecInRlimit(t, true)
|
||||
@@ -528,7 +528,7 @@ func TestExecInOomScoreAdj(t *testing.T) {
|
||||
|
||||
func TestExecInUserns(t *testing.T) {
|
||||
if _, err := os.Stat("/proc/self/ns/user"); os.IsNotExist(err) {
|
||||
t.Skip("userns is unsupported")
|
||||
t.Skip("Test requires userns.")
|
||||
}
|
||||
if testing.Short() {
|
||||
return
|
||||
|
||||
@@ -470,7 +470,7 @@ func TestDupNamespaces(t *testing.T) {
|
||||
|
||||
func TestNonZeroEUIDCompatibleSpecconvValidate(t *testing.T) {
|
||||
if _, err := os.Stat("/proc/self/ns/user"); os.IsNotExist(err) {
|
||||
t.Skip("userns is unsupported")
|
||||
t.Skip("Test requires userns.")
|
||||
}
|
||||
|
||||
spec := Example()
|
||||
|
||||
Reference in New Issue
Block a user