From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1lRmbM-0006wt-5Y for mharc-grub-devel@gnu.org; Wed, 31 Mar 2021 21:58:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51146) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRmbD-0006hI-4K for grub-devel@gnu.org; Wed, 31 Mar 2021 21:58:19 -0400 Received: from mail-ot1-x32a.google.com ([2607:f8b0:4864:20::32a]:40599) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRmb4-0007Is-4U for grub-devel@gnu.org; Wed, 31 Mar 2021 21:58:17 -0400 Received: by mail-ot1-x32a.google.com with SMTP id w31-20020a9d36220000b02901f2cbfc9743so740280otb.7 for ; Wed, 31 Mar 2021 18:58:08 -0700 (PDT) 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=mkhAcfgLX5i7t+S68Ho8ClyiZWJl3e+lKzMSomWNitNApv2yPgp4E7AxYByNBXw16r B8AJov90Gl2IbYFUDrj2Zl5OB44C6/wUTZjp3j9k6ub8j9PFOUMK6JqgGtt7N3j4qasu 56VrKBRvC1MOvd3voigwQ3zqlWfOE+iX/JU3YOqoolwp9NHuoBhmZkpgXuOlPDBowfqX fxWdaZQ1EXsjSvoC7WTDxh+aTtERKxltP6VWSDVVykRCoyBzzWmyd+CL5tbAAQUaT4Pf jheM3w/wAnjLRqOKLf87Tlc+p9l53ke4mwVK4NrE/LUo1PUHsLlQ+a6L+FguK5hiG4gi bDbg== 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=UzkwMnY3nkmEi97aVOrSZmccc96nVhnss/fBGCnKK5aq8D3IoZPDm10YMYgIJNOZt6 PTbxWaTqP3BB39J8yKPch4lOud+qBtQsiX2NnoXlJQSgmkF3pFijBNMXsIOZbeJ73TIZ OF6zlYBhm35Ucvofj37DiSlDU4jUxYce6nKXcP5vnOnyoMJYtRNm+w30uvfoHxNmRxyx 2ddunoXwNYqa58Dp+PpM8YUl5II2MW7ZUi8yZoM53W8D1YhMIjW0SCt60NAh4CDZgtoa kWkK2afkwW7xYEKGWRB8ZPM86Y20CnI2HTQLehrsQOCvOeylsLl1e+HjbLrCOOyg4p4Q TZag== X-Gm-Message-State: AOAM530uHaK/8MRZCCi54GXjinW9rRUetRp3jp6X1f4oit5mXOYGwiiL mXrVptliMsoaq/T+mwol8tUPrQ3CNsHjbw== X-Google-Smtp-Source: ABdhPJwE1ax0QquugJxVaCOuACk3gH+nYT/m57ysoB3lP6lTRImO+/MATaSSU4umXSXaZDAD6dtUCw== X-Received: by 2002:a05:6830:2118:: with SMTP id i24mr4838941otc.290.1617242287424; Wed, 31 Mar 2021 18:58:07 -0700 (PDT) Received: from localhost.localdomain ([2605:a601:ab16:db00:1cb0:2038:b70a:65b5]) by smtp.gmail.com with ESMTPSA id z25sm902960otj.68.2021.03.31.18.58.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 18:58:07 -0700 (PDT) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: [PATCH 06/12] grub-shell: Add grub output logfile with grub-shell --debug Date: Wed, 31 Mar 2021 20:57:45 -0500 Message-Id: <8acbe1a63ed91437456b98207814ace4c10d65d1.1617240986.git.development@efficientek.com> 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::32a; envelope-from=development@efficientek.com; helo=mail-ot1-x32a.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: Thu, 01 Apr 2021 01:58:19 -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