mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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:
@@ -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",
|
||||
},
|
||||
|
||||
@@ -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)
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user