Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1n3s9x-00081c-2L for mharc-grub-devel@gnu.org; Sat, 01 Jan 2022 23:07:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3s9s-0007yH-PM for grub-devel@gnu.org; Sat, 01 Jan 2022 23:07:49 -0500 Received: from [2607:f8b0:4864:20::f33] (port=41760 helo=mail-qv1-xf33.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n3s9q-0002Cv-Qq for grub-devel@gnu.org; Sat, 01 Jan 2022 23:07:48 -0500 Received: by mail-qv1-xf33.google.com with SMTP id h5so27984882qvh.8 for ; Sat, 01 Jan 2022 20:07:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V5ALpckDZZp842MhOu//thodDDyIrg7uKQK/kjUfB9A=; b=TxVtuQ23CkjG7YmjGUZBakFmf5pAF13RCBBDRxBvmdCHE2KRtIivA0yYCeftkdV6fW WWJg82A7lxa5mb95JcZRaszjA8Z44tjoTTR5tGDjUH+22QzlfmsapUoaYpbNgqBTFh0v x2Q0XLmdHQ4IQTCQwBVKi5f984dZyMLON/kjE71Bbz4J6KhrYM0eIiynHaALXmgiLzul jpgt+Py1XpXHbA9cCsLR/Mp7AWp6X7NAN4g6a9EraOU4wiRvdwe5/O0TdvpTUCepWuGT 96Ei8zA+aavmfLGJY7OJWwwOHeZ0/j1O3tTyS5ZFVoBwhtFABA/XAMOVQlBEyvRX0EUq IynA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=V5ALpckDZZp842MhOu//thodDDyIrg7uKQK/kjUfB9A=; b=Ih7ywqOoLf6IXyhY0Zo1RLXrY/Q+ePAn6BBy8tJ7l8SmKAAIkD1lAbnVPDIHc0lpWM +aBc6mZfsA9ezN2Jlm2jVHq0EB+FGH+Hbr9V/70vQaiU7jZ7razQmv3//Ru/Je0BZ8gf W8vBxccuIfuEemx+9WLRXj58AhGfj9Pl+h2ECipEKySr6SblI93Ir+nsZK39u+0kwhh4 tw63exTOaYjWa87kltP7BgW3Ay863C2Y1JH/zhF/B+LtdSg4XoZEMmIBoIiCYuQTCYsJ EfDQvMsNOhT47YQBa/DOZbhg+6k6AxMtk5CV7VD4if8vC0Nl6LmE5IfGfvFDwKqrfSH0 9bww== X-Gm-Message-State: AOAM533YO4PxrR/bqvFVh8X/Z5S1zTJdsIob2qA1/s3fytjppuOW5ngW FKMHQ6pTBFQJ9UydYE8cZ4LJb3Js10N3fg== X-Google-Smtp-Source: ABdhPJzCJ/UZ176sd+SOygAUbPLonGjgnv7gqcKYX4QkKolNlDPSsw1wedmDv6cQPsthU6wOt8C3cw== X-Received: by 2002:a05:6214:21ea:: with SMTP id p10mr21536273qvj.120.1641096466044; Sat, 01 Jan 2022 20:07:46 -0800 (PST) Received: from localhost.localdomain ([37.218.244.251]) by smtp.gmail.com with ESMTPSA id 137sm22660725qkm.69.2022.01.01.20.07.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jan 2022 20:07:45 -0800 (PST) From: Glenn Washburn To: Daniel Kiper , grub-devel@gnu.org Cc: Glenn Washburn Subject: [PATCH v2 06/12] grub-shell: Add grub output logfile with grub-shell --debug Date: Sat, 1 Jan 2022 22:07:16 -0600 Message-Id: <428698acd93f2d1634d11bf790555a1c622aef6a.1641095841.git.development@efficientek.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::f33 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::f33; envelope-from=development@efficientek.com; helo=mail-qv1-xf33.google.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jan 2022 04:07:49 -0000 This allows seeing full qemu output of grub-shell, which can be invaluable when debugging failing tests. Signed-off-by: Glenn Washburn --- tests/util/grub-shell.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in index 8c6ed76d7..c6d7860e9 100644 --- a/tests/util/grub-shell.in +++ b/tests/util/grub-shell.in @@ -379,6 +379,9 @@ echo "${halt_cmd}" >>${cfgfile} test -z "$debug" || echo "GRUB script: ${cfgfile}" >&2 test -z "$debug" || echo "GRUB testcase script: ${tmpfile}" >&2 + +goutfile="$work_directory/grub-qemu.log" +test -z "$debug" || echo "GRUB output log: ${goutfile}" >&2 test -z "$debug" || echo "Boot device: ${boot}" >&2 isofile="$work_directory/grub.iso" @@ -502,7 +505,7 @@ if [ x$boot = xnet ]; then cp "${cfgfile}" "$netdir/boot/grub/grub.cfg" cp "${source}" "$netdir/boot/grub/testcase.cfg" [ -z "$files" ] || copy_extra_files "$netdir" $files - timeout -s KILL $timeout "${qemu}" ${qemuopts} ${serial_null} -serial file:/dev/stdout -boot n -net "user,tftp=$netdir,bootfile=/boot/grub/${grub_modinfo_target_cpu}-${grub_modinfo_platform}/core.$netbootext" -net nic | cat | tr -d "\r" | do_trim + timeout -s KILL $timeout "${qemu}" ${qemuopts} ${serial_null} -serial file:/dev/stdout -boot n -net "user,tftp=$netdir,bootfile=/boot/grub/${grub_modinfo_target_cpu}-${grub_modinfo_platform}/core.$netbootext" -net nic | cat | tr -d "\r" | tee "${goutfile}" | do_trim elif [ x$boot = xemu ]; then rootdir="$work_directory/rootdir" grubdir="$rootdir/boot/grub" @@ -521,11 +524,11 @@ elif [ x$boot = xemu ]; then [ -z "$files" ] || copy_extra_files "$rootdir" $files roottar="$work_directory/root.tar" (cd "$rootdir"; tar cf "$roottar" .) - @builddir@/grub-core/grub-emu -m "$device_map" --memdisk "$roottar" -r memdisk -d "/boot/grub" | tr -d "\r" | do_trim + @builddir@/grub-core/grub-emu -m "$device_map" --memdisk "$roottar" -r memdisk -d "/boot/grub" | tr -d "\r" | tee "${goutfile}" | do_trim test -n "$debug" || rm -rf "$rootdir" test -n "$debug" || rm -f "$roottar" else - timeout -s KILL $timeout "${qemu}" ${qemuopts} ${serial_null} -serial file:/dev/stdout -${device}"${isofile}" ${bootdev} | cat | tr -d "\r" | do_trim + timeout -s KILL $timeout "${qemu}" ${qemuopts} ${serial_null} -serial file:/dev/stdout -${device}"${isofile}" ${bootdev} | cat | tr -d "\r" | tee "${goutfile}" | do_trim fi if [ x$boot = xcoreboot ]; then test -n "$debug" || rm -f "${imgfile}" -- 2.27.0