tests/checkpoint: add simple c/r test for cgroupns
Same test as the first one, just with cgroupns enabled. Since in case of cgroupv2 `runc spec` enables cgroupns, this case was already tested by the first checkpoint test, so skip it. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
cdce577dcf
commit
00a2844ab4
|
@ -43,7 +43,7 @@ function check_pipes() {
|
|||
[[ "${output}" == *"ponG Ping"* ]]
|
||||
}
|
||||
|
||||
@test "checkpoint and restore" {
|
||||
function simple_cr() {
|
||||
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
|
@ -69,6 +69,20 @@ function check_pipes() {
|
|||
done
|
||||
}
|
||||
|
||||
@test "checkpoint and restore " {
|
||||
simple_cr
|
||||
}
|
||||
|
||||
@test "checkpoint and restore (cgroupns)" {
|
||||
# cgroupv2 already enables cgroupns so this case was tested above already
|
||||
requires cgroups_v1
|
||||
|
||||
# enable CGROUPNS
|
||||
sed -i 's|\("namespaces": \[\)|\1\n\t\t\t{"type": "cgroup"},|' config.json
|
||||
|
||||
simple_cr
|
||||
}
|
||||
|
||||
@test "checkpoint --pre-dump and restore" {
|
||||
setup_pipes
|
||||
|
||||
|
|
Loading…
Reference in New Issue