diff --git a/util/testutil/integration/oci.go b/util/testutil/integration/oci.go index 12d3ae70..2ad271fb 100644 --- a/util/testutil/integration/oci.go +++ b/util/testutil/integration/oci.go @@ -52,7 +52,7 @@ func (s *oci) New(cfg *BackendConfig) (Backend, func() error, error) { return nil, nil, errors.Errorf("unsupported id pair: uid=%d, gid=%d", s.uid, s.gid) } // TODO: make sure the user exists and subuid/subgid are configured. - buildkitdArgs = append([]string{"sudo", "-u", fmt.Sprintf("#%d", s.uid), "-i", "--", "rootlesskit"}, buildkitdArgs...) + buildkitdArgs = append([]string{"sudo", "-u", fmt.Sprintf("#%d", s.uid), "-i", "--", "exec", "rootlesskit"}, buildkitdArgs...) } buildkitdSock, stop, err := runBuildkitd(cfg, buildkitdArgs, cfg.Logs, s.uid, s.gid) diff --git a/util/testutil/integration/sandbox.go b/util/testutil/integration/sandbox.go index 3476a2bb..0237dfb1 100644 --- a/util/testutil/integration/sandbox.go +++ b/util/testutil/integration/sandbox.go @@ -204,7 +204,7 @@ func runBuildkitd(conf *BackendConfig, args []string, logs map[string]*bytes.Buf } func rootlessSupported(uid int) bool { - cmd := exec.Command("sudo", "-u", fmt.Sprintf("#%d", uid), "-i", "--", "unshare", "-U", "true") + cmd := exec.Command("sudo", "-u", fmt.Sprintf("#%d", uid), "-i", "--", "exec", "unshare", "-U", "true") b, err := cmd.CombinedOutput() if err != nil { logrus.Warnf("rootless mode is not supported on this host: %v (%s)", err, string(b))