mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
ci: skip TestPodSkipDevicesUpdate on CentOS 7
This test is as flaky as TestSkipDevices*, let's also t skip it on CentOS 7. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -26,6 +26,7 @@ func TestPodSkipDevicesUpdate(t *testing.T) {
|
||||
if os.Geteuid() != 0 {
|
||||
t.Skip("Test requires root.")
|
||||
}
|
||||
skipOnCentOS7(t)
|
||||
|
||||
podName := "system-runc_test_pod" + t.Name() + ".slice"
|
||||
podConfig := &configs.Cgroup{
|
||||
@@ -116,6 +117,15 @@ func TestPodSkipDevicesUpdate(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func skipOnCentOS7(t *testing.T) {
|
||||
t.Helper()
|
||||
// https://github.com/opencontainers/runc/issues/3743
|
||||
centosVer, _ := exec.Command("rpm", "-q", "--qf", "%{version}", "centos-release").CombinedOutput()
|
||||
if string(centosVer) == "7" {
|
||||
t.Skip("Flaky on CentOS 7")
|
||||
}
|
||||
}
|
||||
|
||||
func testSkipDevices(t *testing.T, skipDevices bool, expected []string) {
|
||||
if !systemd.IsRunningSystemd() {
|
||||
t.Skip("Test requires systemd.")
|
||||
@@ -123,11 +133,7 @@ func testSkipDevices(t *testing.T, skipDevices bool, expected []string) {
|
||||
if os.Geteuid() != 0 {
|
||||
t.Skip("Test requires root.")
|
||||
}
|
||||
// https://github.com/opencontainers/runc/issues/3743
|
||||
centosVer, _ := exec.Command("rpm", "-q", "--qf", "%{version}", "centos-release").CombinedOutput()
|
||||
if string(centosVer) == "7" {
|
||||
t.Skip("Flaky on CentOS 7")
|
||||
}
|
||||
skipOnCentOS7(t)
|
||||
|
||||
podConfig := &configs.Cgroup{
|
||||
Parent: "system.slice",
|
||||
|
||||
Reference in New Issue
Block a user