diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 48387b1..19bdf1d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -179,7 +179,7 @@ jobs: PATH=/usr/lib/ccache:"$PATH" \ distro=${{ matrix.cfg.img_distro }} rev=${{ matrix.cfg.img_rel }} \ ndctl='${{ github.workspace }}'/ndctl \ - ../run_qemu/run_qemu.sh ${{ matrix.run_opts }} --no-kvm --timeout=20 + ../run_qemu/run_qemu.sh ${{ matrix.run_opts }} --no-kvm --timeout=20 --debug - name: upload test logs if: ${{ !cancelled() }} diff --git a/run_qemu.sh b/run_qemu.sh index 2429173..4ed90d2 100755 --- a/run_qemu.sh +++ b/run_qemu.sh @@ -1443,10 +1443,14 @@ make_rootfs() setup_autorun "mkosi.extra" if [[ $_arg_debug == "on" ]]; then - # In case of yet another mkosi incompatibility or other issue, - # enable this line. WARNING: --debug options have "stability" issues - # too! Check the man page of your specific mkosi version - : # mkosi_opts+=('--debug-workspace' '--debug-shell' '--debug') + if test "$mkosi_ver" -lt 15; then + mkosi_opts+=('--debug=run') + else # See mkosi v15 commit a13e4b0e7056cc + mkosi_opts+=('--debug') + fi + # Newer options check the man page of your specific mkosi + # version, find links a the bottom of run_qemu/README.md + # mkosi_opts+=('--debug-workspace' '--debug-shell') fi mkosi_opts+=("build") @@ -1996,14 +2000,15 @@ start_qemu() else printf "guest will be terminated after %d minute(s)\n" "$_arg_timeout" "${qcmd[@]}" & sleep 5 - timeout_sec="$(((_arg_timeout * 60) - 5))" + ( timeout_sec="$(((_arg_timeout * 60) - 5))" while ((timeout_sec > 0)); do if ! guest_alive; then break fi sleep 5 timeout_sec="$((timeout_sec - 5))" - done + set +x + done ) kill_guest fi popd > /dev/null || exit 1