From a8d17e044ce2b7fc1ac20375f727d80413743f0c Mon Sep 17 00:00:00 2001 From: Efim Verzakov Date: Fri, 20 Feb 2026 12:27:48 +0000 Subject: [PATCH] integration: add userns and checkpoint integration test Signed-off-by: Efim Verzakov --- tests/integration/userns.bats | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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 +}