Run the runtime tests in Privileged mode with root user.

Some tests are skipped when the user is not root. We want to run all tests.

PiperOrigin-RevId: 523211424
This commit is contained in:
Ayush Ranjan
2023-04-10 14:28:34 -07:00
committed by gVisor bot
parent 5073588bb1
commit f92bdfdfea
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -58,9 +58,10 @@ var exclude = map[string][]string{
"test_fcntl": []string{"TestFcntl.test_fcntl_64_bit"},
// TODO(b/76174079): Un-exclude once this bug is fixed.
"test_posix": []string{
"PosixTester.test_fs_holes",
"PosixTester.test_fs_holes", // Fails only with --overlay=none.
"PosixTester.test_sched_priority",
"PosixTester.test_sched_rr_get_interval",
"PosixTester.test_get_and_set_scheduler_and_param", // sched_setparam(2) is not supported.
"TestPosixSpawn.test_setscheduler_only_param",
"TestPosixSpawnP.test_setscheduler_only_param",
},
+2 -2
View File
@@ -116,7 +116,7 @@ func getTests(ctx context.Context, d *dockerutil.Container, lang, image string,
panic("TIMEOUT: Unable to get a list of tests")
}()
// Get a list of all tests in the image.
list, err := d.Exec(ctx, dockerutil.ExecOpts{}, "/proctor/proctor", "--runtime", lang, "--list")
list, err := d.Exec(ctx, dockerutil.ExecOpts{Privileged: true, User: "0"}, "/proctor/proctor", "--runtime", lang, "--list")
if err != nil {
return nil, fmt.Errorf("docker exec failed: %v", err)
}
@@ -188,7 +188,7 @@ func getTests(ctx context.Context, d *dockerutil.Container, lang, image string,
fmt.Sprintf("--timeout=%s", timeout-time.Since(startTime)),
}
argv = append(argv, proctorSettings.ToArgs()...)
output, err = d.Exec(ctx, dockerutil.ExecOpts{}, argv...)
output, err = d.Exec(ctx, dockerutil.ExecOpts{Privileged: true, User: "0"}, argv...)
close(done)
}()