Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nIHNC-00037d-UY for mharc-grub-devel@gnu.org; Thu, 10 Feb 2022 16:53:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIHNB-00031x-CV for grub-devel@gnu.org; Thu, 10 Feb 2022 16:53:05 -0500 Received: from [2607:f8b0:4864:20::733] (port=46706 helo=mail-qk1-x733.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nIHN8-0008GN-CI for grub-devel@gnu.org; Thu, 10 Feb 2022 16:53:04 -0500 Received: by mail-qk1-x733.google.com with SMTP id 13so6347044qkd.13 for ; Thu, 10 Feb 2022 13:53:01 -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=5eU6cMqIjjrR8XurzEPiyg9J+N76tPCGqbGMDYKDy24=; b=5Y127hmdJ/R6jaYsvsJ2vq/Mfz7PmZQLY9J5rNSIUvcMdQoNbYuSeRH6YH5mKEXQQZ kVMY9nX1zq+DnaUad8oF3eeh4OTszXgFd4AjjZ+/cE5+4DmWVsRYEKcbYcGT5P7c4uzQ nklp6EcScCxJ52x4ofAUzzaHaG0qHIjG7P2+rMj9z8fOd6ZXfg4HYUUsn/GL2+iiy85K ttDPAKKhleLw1d7uFJ9Zhp5hFFOa6Nn8Hf49vvoRNZ6SV2HAbyAJg7/R0+6dXEj1yI1M VvN8h8wQ+aORdzN//hEoXofy8iTWt8853eaKGePmi7IgsboBIhOHhhZVD7rQCfYSKTVH k1Kw== 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=5eU6cMqIjjrR8XurzEPiyg9J+N76tPCGqbGMDYKDy24=; b=54ojporSjZe3DlUbp6Lb0vBRe7LPbARc5ok9heVh77YReZj9AMMdOePlb2NsGPaAMj X+2xBP/7qOpfRQNordt/7ucYQooNkIvM38sCyfrAQZ+LEUQKYPEjnpZAhE02xmI1O9dj JRdFe37h+LdGgl42Hy7uGGql8ph8wb50UPuCCTznJ5wc+EtfFx8+I5TTfb+M4WAVcfQg RPNMFUoPuQrWfQGDz5mnWrmHtuM0v5K9xiDU6Fo6qlDYcHTY3fGTBUnozgByOxC3RKnM iPMKVSdTQctbMn4U510NNnU517AWQG9lOGzwgH7VOSz3z5o865R2nVh6S64KTAhJ0bSc iWaA== X-Gm-Message-State: AOAM532vUGwxd+mUk63+QwXBjtN6EhdcniY9yySJUK1M6MmP5GKePEq6 Y15KuoLe07yWPnWUKW+HdXkUXKeWJxPneA== X-Google-Smtp-Source: ABdhPJxSJwJ4YLiOexnXgKrdcISJyXQHmvXQB5D3fqxu02eWHNjQaY10AKyBQgNJw3ARKZzAahezog== X-Received: by 2002:a05:620a:2415:: with SMTP id d21mr4898901qkn.654.1644529981479; Thu, 10 Feb 2022 13:53:01 -0800 (PST) Received: from localhost.localdomain (garza.riseup.net. [198.252.153.109]) by smtp.gmail.com with ESMTPSA id j15sm11740363qta.83.2022.02.10.13.52.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 13:53:01 -0800 (PST) From: Glenn Washburn To: Daniel Kiper , grub-devel@gnu.org Cc: Glenn Washburn Subject: [PATCH v3 06/15] grub-shell: Add grub output logfile with grub-shell --debug Date: Thu, 10 Feb 2022 15:51:23 -0600 Message-Id: <9be47ff0556e02b698aa5d5fb92fd211d8057b0f.1644528774.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::733 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::733; envelope-from=development@efficientek.com; helo=mail-qk1-x733.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: Thu, 10 Feb 2022 21:53:05 -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 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in index 8c6ed76d7..f52aeb068 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,18 +524,19 @@ 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}" fi test -n "$debug" || rm -f "${isofile}" test -n "$debug" || rm -rf "${rom_directory}" -test -n "$debug" || rm -f "${tmpfile}" "${cfgfile}" +test -n "$debug" || rm -f "${tmpfile}" "${cfgfile}" "${goutfile}" + exit 0 -- 2.27.0