mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
tests: fix checks for non-existent variables
Audit all checks for non-empty variables (i.e. ' -z ', ' -n ', ' != ""' and '= ""'), and fix those cases where a variable might be unset. Those variables (that might not be set) are - RUNC_USE_SYSTEMD - BATS_RUN_TMPDIR - AUX_UID - AUX_DIR - SD_PARENT_NAME - REL_PARENT_PATH - ROOT - HAVE_CRIU - ROOTLESS_FEATURES - and a few test-specific or file-specific variables This should allow us to enable set -u. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -252,7 +252,7 @@ function simple_cr() {
|
||||
# in time when the last page is lazily transferred to the destination.
|
||||
# Killing the CRIU on the checkpoint side will let the container
|
||||
# continue to run if the migration failed at some point.
|
||||
[ -n "$RUNC_USE_SYSTEMD" ] && set_cgroups_path
|
||||
[ -v RUNC_USE_SYSTEMD ] && set_cgroups_path
|
||||
runc_restore_with_pipes ./image-dir test_busybox_restore --lazy-pages
|
||||
|
||||
wait $cpt_pid
|
||||
|
||||
Reference in New Issue
Block a user