summaryrefslogtreecommitdiff
path: root/integration
diff options
context:
space:
mode:
authorAkihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>2023-01-19 10:33:30 +0900
committerAkihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>2023-01-21 01:00:27 +0900
commitb3c5352386c2bb6c46d0f2232bad9e84e53e8d27 (patch)
tree17190f64d98cf12de5beb3b4203101682977e219 /integration
parent40cc022c70471023a0ecfe592a39b5681ea2245b (diff)
downloaddocker-b3c5352386c2bb6c46d0f2232bad9e84e53e8d27.tar.gz
rootless: support `--ipc=host`
Fix issue 44294 Co-authored-by: Sebastiaan van Stijn <github@gone.nl> Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Diffstat (limited to 'integration')
-rw-r--r--integration/container/ipcmode_linux_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/integration/container/ipcmode_linux_test.go b/integration/container/ipcmode_linux_test.go
index 49141ce58e..61d30b3360 100644
--- a/integration/container/ipcmode_linux_test.go
+++ b/integration/container/ipcmode_linux_test.go
@@ -115,7 +115,7 @@ func TestIpcModePrivate(t *testing.T) {
// also exists on the host.
func TestIpcModeShareable(t *testing.T) {
skip.If(t, testEnv.IsRemoteDaemon)
- skip.If(t, testEnv.IsRootless, "cannot test /dev/shm in rootless")
+ skip.If(t, testEnv.IsRootless, "no support for --ipc=shareable in rootless")
testIpcNonePrivateShareable(t, "shareable", true, true)
}
@@ -191,7 +191,6 @@ func TestAPIIpcModeShareableAndContainer(t *testing.T) {
func TestAPIIpcModeHost(t *testing.T) {
skip.If(t, testEnv.IsRemoteDaemon)
skip.If(t, testEnv.IsUserNamespace)
- skip.If(t, testEnv.IsRootless, "cannot test /dev/shm in rootless")
cfg := containertypes.Config{
Image: "busybox",
@@ -263,7 +262,7 @@ func testDaemonIpcPrivateShareable(t *testing.T, mustBeShared bool, arg ...strin
// TestDaemonIpcModeShareable checks that --default-ipc-mode shareable works as intended.
func TestDaemonIpcModeShareable(t *testing.T) {
skip.If(t, testEnv.IsRemoteDaemon)
- skip.If(t, testEnv.IsRootless, "cannot test /dev/shm in rootless")
+ skip.If(t, testEnv.IsRootless, "no support for --ipc=shareable in rootless")
testDaemonIpcPrivateShareable(t, true, "--default-ipc-mode", "shareable")
}
@@ -277,9 +276,9 @@ func TestDaemonIpcModePrivate(t *testing.T) {
// used to check if an IpcMode given in config works as intended
func testDaemonIpcFromConfig(t *testing.T, mode string, mustExist bool) {
- skip.If(t, testEnv.IsRootless, "cannot test /dev/shm in rootless")
config := `{"default-ipc-mode": "` + mode + `"}`
- file := fs.NewFile(t, "test-daemon-ipc-config", fs.WithContent(config))
+ // WithMode is needed for rootless
+ file := fs.NewFile(t, "test-daemon-ipc-config", fs.WithContent(config), fs.WithMode(0o644))
defer file.Remove()
testDaemonIpcPrivateShareable(t, mustExist, "--config-file", file.Path())
@@ -295,6 +294,7 @@ func TestDaemonIpcModePrivateFromConfig(t *testing.T) {
// TestDaemonIpcModeShareableFromConfig checks that "default-ipc-mode: shareable" config works as intended.
func TestDaemonIpcModeShareableFromConfig(t *testing.T) {
skip.If(t, testEnv.IsRemoteDaemon)
+ skip.If(t, testEnv.IsRootless, "no support for --ipc=shareable in rootless")
testDaemonIpcFromConfig(t, "shareable", true)
}