diff options
-rw-r--r-- | cmd/podman/kill.go | 2 | ||||
-rw-r--r-- | cmd/podman/main.go | 8 | ||||
-rw-r--r-- | test/e2e/rootless_test.go | 8 |
3 files changed, 17 insertions, 1 deletions
diff --git a/cmd/podman/kill.go b/cmd/podman/kill.go index 388c779f6..927d22ba7 100644 --- a/cmd/podman/kill.go +++ b/cmd/podman/kill.go @@ -6,6 +6,7 @@ import ( "fmt" "github.com/containers/libpod/cmd/podman/libpodruntime" + "github.com/containers/libpod/pkg/rootless" "github.com/docker/docker/pkg/signal" "github.com/pkg/errors" "github.com/urfave/cli" @@ -45,6 +46,7 @@ func killCmd(c *cli.Context) error { return err } + rootless.SetSkipStorageSetup(true) runtime, err := libpodruntime.GetRuntime(c) if err != nil { return errors.Wrapf(err, "could not get runtime") diff --git a/cmd/podman/main.go b/cmd/podman/main.go index 4edc86361..95b7a06cf 100644 --- a/cmd/podman/main.go +++ b/cmd/podman/main.go @@ -25,7 +25,13 @@ var ( exitCode = 125 ) -var cmdsNotRequiringRootless = map[string]bool{"help": true, "version": true, "exec": true, "stop": true} +var cmdsNotRequiringRootless = map[string]bool{ + "help": true, + "version": true, + "exec": true, + "kill": true, + "stop": true, +} func main() { debug := false diff --git a/test/e2e/rootless_test.go b/test/e2e/rootless_test.go index f162d5ddf..7b3f26d45 100644 --- a/test/e2e/rootless_test.go +++ b/test/e2e/rootless_test.go @@ -127,6 +127,14 @@ var _ = Describe("Podman rootless", func() { cmd.WaitWithDefaultTimeout() Expect(cmd.ExitCode()).To(Equal(0)) + cmd = podmanTest.PodmanAsUser([]string{"kill", "-l"}, 1000, 1000, env) + cmd.WaitWithDefaultTimeout() + Expect(cmd.ExitCode()).To(Equal(0)) + + cmd = podmanTest.PodmanAsUser([]string{"start", "-l"}, 1000, 1000, env) + cmd.WaitWithDefaultTimeout() + Expect(cmd.ExitCode()).To(Equal(0)) + cmd = podmanTest.PodmanAsUser([]string{"stop", "-l", "-t", "0"}, 1000, 1000, env) cmd.WaitWithDefaultTimeout() Expect(cmd.ExitCode()).To(Equal(0)) |