Skip to content

Commit a8d17e0

Browse files
committed
integration: add userns and checkpoint integration test
Signed-off-by: Efim Verzakov <efimverzakov@gmail.com>
1 parent 165a4a0 commit a8d17e0

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

tests/integration/userns.bats

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,3 +280,25 @@ function teardown() {
280280
# is deleted during the namespace cleanup.
281281
run ! ip link del dummy0
282282
}
283+
284+
@test "checkpoint userns container with non default host id" {
285+
requires criu root
286+
287+
runc run -d --console-socket "$CONSOLE_SOCKET" test_busybox
288+
[ "$status" -eq 0 ]
289+
290+
testcontainer test_busybox running
291+
292+
runc checkpoint --work-path ./work-dir test_busybox
293+
[ "$status" -eq 0 ]
294+
295+
testcontainer test_busybox checkpointed
296+
297+
# we need to chown images because child process can try to read them.
298+
chown -R 100000:200000 ./checkpoint
299+
300+
runc restore -d --work-path ./work-dir --console-socket "$CONSOLE_SOCKET" test_busybox
301+
[ "$status" -eq 0 ]
302+
303+
testcontainer test_busybox running
304+
}

0 commit comments

Comments
 (0)