diff --git a/tests/integration/userns.bats b/tests/integration/userns.bats index 1f2e83400e8..754db21166b 100644 --- a/tests/integration/userns.bats +++ b/tests/integration/userns.bats @@ -280,3 +280,25 @@ function teardown() { # is deleted during the namespace cleanup. run ! ip link del dummy0 } + +@test "checkpoint userns container with non default host id" { + requires criu root + + runc run -d --console-socket "$CONSOLE_SOCKET" test_busybox + [ "$status" -eq 0 ] + + testcontainer test_busybox running + + runc checkpoint --work-path ./work-dir test_busybox + [ "$status" -eq 0 ] + + testcontainer test_busybox checkpointed + + # we need to chown images because child process can try to read them. + chown -R 100000:200000 ./checkpoint + + runc restore -d --work-path ./work-dir --console-socket "$CONSOLE_SOCKET" test_busybox + [ "$status" -eq 0 ] + + testcontainer test_busybox running +}