diff options
Diffstat (limited to '')
-rw-r--r-- | test/test-functions | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/test/test-functions b/test/test-functions index 8663f902d8..3cb08fb47a 100644 --- a/test/test-functions +++ b/test/test-functions @@ -594,12 +594,6 @@ run_qemu() { fi qemu_options+=(${QEMU_OPTIONS_ARRAY:+"${QEMU_OPTIONS_ARRAY[@]}"}) - if [[ -n "${KERNEL_APPEND:=}" ]]; then - local user_kernel_append - readarray user_kernel_append <<< "$KERNEL_APPEND" - kernel_params+=("${user_kernel_append[@]}") - fi - if [[ -n "$INITRD" ]]; then if [[ -n "$INITRD_EXTRA" ]]; then # An addition initrd has been specified, let's combine it with the main one. @@ -634,7 +628,7 @@ run_qemu() { qemu_cmd=(timeout --foreground "$QEMU_TIMEOUT" "$QEMU_BIN") fi - (set -x; "${qemu_cmd[@]}" "${qemu_options[@]}" -append "${kernel_params[*]}" |& tee "${TESTDIR:?}/console.log") + (set -x; "${qemu_cmd[@]}" "${qemu_options[@]}" -append "${kernel_params[*]} ${KERNEL_APPEND:-}" |& tee "${TESTDIR:?}/console.log") rc=$? if [ "$rc" -eq 124 ] && [ "$QEMU_TIMEOUT" != "infinity" ]; then derror "Test timed out after ${QEMU_TIMEOUT}s" @@ -679,12 +673,6 @@ run_nspawn() { nspawn_options+=("${user_nspawn_arguments[@]}") fi - if [[ -n "${KERNEL_APPEND:=}" ]]; then - local user_kernel_append - readarray user_kernel_append <<< "$KERNEL_APPEND" - kernel_params+=("${user_kernel_append[@]}") - fi - if [[ "$UNIFIED_CGROUP_HIERARCHY" = "hybrid" ]]; then dwarn "nspawn doesn't support SYSTEMD_NSPAWN_UNIFIED_HIERARCHY=hybrid, skipping" exit @@ -703,7 +691,9 @@ run_nspawn() { nspawn_cmd+=("$SYSTEMD_NSPAWN") fi - (set -x; "${nspawn_cmd[@]}" "${nspawn_options[@]}" "${kernel_params[@]}" |& tee "${TESTDIR:?}/console.log") + # Word splitting here is intentional + # shellcheck disable=SC2086 + (set -x; "${nspawn_cmd[@]}" "${nspawn_options[@]}" "${kernel_params[@]}" ${KERNEL_APPEND:-} |& tee "${TESTDIR:?}/console.log") rc=$? if [ "$rc" -eq 124 ] && [ "$NSPAWN_TIMEOUT" != "infinity" ]; then derror "Test timed out after ${NSPAWN_TIMEOUT}s" |