]> git.proxmox.com Git - mirror_lxc.git/commit
tests: lxc-test-checkpoint-restore: use trap to do cleanup
authorPo-Hsu Lin <po-hsu.lin@canonical.com>
Wed, 19 Oct 2022 06:17:29 +0000 (14:17 +0800)
committerPo-Hsu Lin <po-hsu.lin@canonical.com>
Wed, 19 Oct 2022 06:20:39 +0000 (14:20 +0800)
commit73fd9bf5580d8b7d1f61b2e90dfd352355028f4a
treeb4bed671e9f8c34d31e2c3b0af261d036006678b
parent37b5f004549e5df00773fdb17462dbfd1dc6b48a
tests: lxc-test-checkpoint-restore: use trap to do cleanup

This test will fail on Jammy 5.15, and because of the "set -e" it
will never go through the lxc-stop and lxc-destroy code in the end
of this script. Thus the lxc-test-criu container will not be removed.

Compose a cleanup() and use TRAP to solve this problem.

Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
src/tests/lxc-test-checkpoint-restore