Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1lCw1a-0006ET-3J for mharc-grub-devel@gnu.org; Thu, 18 Feb 2021 22:00:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCw1Y-0006BE-8u for grub-devel@gnu.org; Thu, 18 Feb 2021 22:00:08 -0500 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]:40408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lCw1V-0005XL-VK for grub-devel@gnu.org; Thu, 18 Feb 2021 22:00:07 -0500 Received: by mail-qt1-x82f.google.com with SMTP id f17so3039400qth.7 for ; Thu, 18 Feb 2021 19:00:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V5ALpckDZZp842MhOu//thodDDyIrg7uKQK/kjUfB9A=; b=nUFVaNDEmMXHqQU5SPFXZE+dfaf/iIsNCTiJrL4IJxqhfNPevcPKxoNhAn0+Bxhgak jjrNtnfV5mFdAlvtyTjvt8J0jIcgPP4i6bb7tnxSUQIdqhAlId95wEvk3vMlayda41om XCP27k8rM9+3qVKjamdmmSOq4KIXWcaMk3PO0VuuLzvcWT5zr3+Vj3cUIY9EPYFtj+TP JtEqqjlNiiYP/4geGqtxFTulUeiCO9/4POGuj7127zZdpg37Soqefxoac1fG95Rvh9tA KsQi1X7wenioAsm1kj3e9W23rk7l2iatxd1J6TWREi8qBJ7EqSVNix4CZRNYU6XDQGEu Yapg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=s5FvQokQwtDOAp7tD0fX+tIky/Je9EJLGRnueeaoyeb99cabgcLzF5VAMghU1yhwbP J/RaUm+mNQ+WCo1EtN7SPmx3VHuss0O8PaE6reLO8FxpS2deuqF7Z1PqPSUOMQUCav9g UO/1ZNKpwe9dGAiAt57uwwnpYWvjWZuh4NXGhDLKc73TROPoJq/klF0Te7Lb/MGqFReC a38E2D/4cw1ZH3wHa2uQpS8QLXhW3FY1ReWfAJCVVop9d1UUF+cLycR319qn3cIGaVB7 HUGVgFKV8LiYkOQzSgCVeRyKiYIs6BqgTYe6B3ad2foV9H+iSOXA2AyUmDAwWLmbqavN Kqhg== X-Gm-Message-State: AOAM5307Jz0GYumhTYCQPvhHXQ192Xu6HSGqJ4cDCp86Et25gJfF6DoG HKAeyTzKqw1QDCEfgRPDBvQs/HcCjzKXXA== X-Google-Smtp-Source: ABdhPJyU9reRKm0rZC/DC9yqtaTxWeaP5TxNNx0GiXhnBpFmMdPSEQIjBiPJWRJC78Jj6UVsy+IMMg== X-Received: by 2002:a05:622a:183:: with SMTP id s3mr7383543qtw.223.1613703604703; Thu, 18 Feb 2021 19:00:04 -0800 (PST) Received: from localhost.localdomain ([2605:a601:aac5:3700:c323:c101:d96b:34f1]) by smtp.gmail.com with ESMTPSA id b17sm2468294qtq.56.2021.02.18.19.00.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 19:00:04 -0800 (PST) From: Glenn Washburn To: grub-devel@gnu.org Cc: Daniel Kiper , Glenn Washburn Subject: [CI 10/17] grub-shell: Add grub output logfile with grub-shell --debug Date: Thu, 18 Feb 2021 20:59:29 -0600 Message-Id: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::82f; envelope-from=development@efficientek.com; helo=mail-qt1-x82f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 03:00:08 -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