Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1maSK7-00067Q-3k for mharc-grub-devel@gnu.org; Tue, 12 Oct 2021 20:40:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maSJx-0005v9-5f for grub-devel@gnu.org; Tue, 12 Oct 2021 20:40:38 -0400 Received: from mail-qv1-xf2d.google.com ([2607:f8b0:4864:20::f2d]:41524) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maSJv-0000Z7-4u for grub-devel@gnu.org; Tue, 12 Oct 2021 20:40:36 -0400 Received: by mail-qv1-xf2d.google.com with SMTP id d20so727540qvm.8 for ; Tue, 12 Oct 2021 17:40:32 -0700 (PDT) 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=ZfwLZ4AuK3GLefgWzqbX0YEz2aTTF2iiKb1HVft0/Dg=; b=jtL8pRUBXl+dG6PyyvTUGmLp9dZOcNfH9UZA25cDtMeJP0gWiwwSNe7Ogjwz8uHW1k 648Oe6rn8AViywPkXqIbmE/IvC/o7MFFGIm1ZSHEBvNDoy0iJMoRQemr1jCPh3VvFCUh aIEjvckx1BOTMfoHWJCY6AFFrJppTlFU+oCZQAi1UTgZ7WJyN5joHBzBW5WdzXOdsOAU 6qhUEovYGUE01Lkam4ki/9pSvSoe0sGl5wmskxZ9hzY9gr49iiFDOkE5Ja5jd/idCwoZ fg0WWb28ReuSnzAW9UjHQ3vmwrpZwBAb41f6/XgoiboBLJUXT7DnNYpkRL++A5kt1E/z dE+g== 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=ZfwLZ4AuK3GLefgWzqbX0YEz2aTTF2iiKb1HVft0/Dg=; b=PD9sFAIcfZHsTDEOPRwMD1scgJovZoFnPoTRlz3TM40NZ4j9nN+xHvScx4vsReQpwp uhn3dhPQdtcoU67VH5tq3hOo+dcsUNm2RtIOg1wm3+Cax1UQXPzbKLM+MKeGR8dg0zGZ oBoV0tq5aJclEdCw9FoONZm1t5ZMwBNYjh7r2WixOOh6tfosicXf5gee/vAgaNYYo16U tIZkPUFIN1LXbzblCCGVaRpIUMV9HhoV2J5zs9l6+I1H+OP1mV6SszeHSEFBRyec4sjh b0L1VhZAn2Ah4Xf1sVrJBFNHmhyJNs9guo4j5LW7d69Y8ys8TxcQYsbG2v8LOcETFF+I IG4w== X-Gm-Message-State: AOAM5302wgKW/DlxzZ+eQEe9FqFF1Hbn/BxvwWMirfqjqEvwpn8GAqGw MQT6SWlO5sbDw9KSZSXXyqeKSO3lrEY= X-Google-Smtp-Source: ABdhPJyM4lNJRZYjEON8F77XvV/5NpRTqKfjs5+Lsl+mcWH9UcNL3EDOBKKiys3Bdejl6WhH9Lxpyw== X-Received: by 2002:a05:6214:518d:: with SMTP id kl13mr30810825qvb.38.1634085631510; Tue, 12 Oct 2021 17:40:31 -0700 (PDT) Received: from localhost.localdomain ([37.218.244.251]) by smtp.gmail.com with ESMTPSA id x18sm6682367qkx.94.2021.10.12.17.40.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 17:40:31 -0700 (PDT) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: [PATCH v4 7/9] tests: A failure of mktemp should cause the test script to exit with code 99 Date: Tue, 12 Oct 2021 19:40:01 -0500 Message-Id: <23a0d535806b673c0c6e2f0e2ce878ae4b671476.1634084103.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::f2d; envelope-from=development@efficientek.com; helo=mail-qv1-xf2d.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: Wed, 13 Oct 2021 00:40:40 -0000 A test exiting with code 99 means that there was an error in the test itself and not a failure in the thing being tested (also known as a hard error). Signed-off-by: Glenn Washburn --- tests/ahci_test.in | 4 ++-- tests/ehci_test.in | 4 ++-- tests/gettext_strings_test.in | 2 +- tests/grub_cmd_test.in | 6 +++--- tests/grub_script_blockarg.in | 2 +- tests/ohci_test.in | 4 ++-- tests/partmap_test.in | 4 ++-- tests/pata_test.in | 4 ++-- tests/syslinux_test.in | 2 +- tests/test_sha512sum.in | 6 +++--- tests/uhci_test.in | 4 ++-- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/tests/ahci_test.in b/tests/ahci_test.in index 7853bb8b6..3f7645ad8 100644 --- a/tests/ahci_test.in +++ b/tests/ahci_test.in @@ -34,8 +34,8 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in exit 0;; esac -imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 +outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 echo "hello" > "$outfile" diff --git a/tests/ehci_test.in b/tests/ehci_test.in index 426bfa7db..df408d77a 100644 --- a/tests/ehci_test.in +++ b/tests/ehci_test.in @@ -34,8 +34,8 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in exit 0;; esac -imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 +outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 echo "hello" > "$outfile" diff --git a/tests/gettext_strings_test.in b/tests/gettext_strings_test.in index 813999ebe..1c37fe41b 100644 --- a/tests/gettext_strings_test.in +++ b/tests/gettext_strings_test.in @@ -2,7 +2,7 @@ cd '@srcdir@' -tdir="$(mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX")" +tdir="$(mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX")" || exit 99 xgettext -f po/POTFILES.in -L C -o "$tdir/"skip.pot -x po/grub.pot --keyword=grub_util_info --keyword=grub_dprintf:1,2 --keyword=grub_register_command --keyword=grub_register_extcmd --keyword=grub_efiemu_resolve_symbol --keyword=grub_efiemu_register_symbol --keyword=grub_dl_load --keyword=grub_crypto_lookup_md_by_name --keyword=grub_crypto_lookup_cipher_by_name --keyword=grub_efiemu_resolve_symbol --keyword=alias --keyword=grub_ieee1275_get_property:2 --keyword=grub_ieee1275_find_device --keyword=grub_ieee1275_get_integer_property:2 --keyword=INIT_IEEE1275_COMMON:2 --keyword=grub_boot_time --keyword=grub_env_get --keyword=grub_env_set --keyword=grub_register_variable_hook --keyword=grub_fatal --keyword=__asm__ --keyword=volatile --keyword=__volatile__ --keyword=grub_error:2 --from-code=iso-8859-1 xgettext -f po/POTFILES.in -L C -o "$tdir/"skip2.pot -x po/grub.pot --keyword=volatile:2 --keyword=__volatile__:2 --keyword=grub_dprintf:2 --from-code=iso-8859-1 diff --git a/tests/grub_cmd_test.in b/tests/grub_cmd_test.in index dac6f7d6a..043c3a634 100644 --- a/tests/grub_cmd_test.in +++ b/tests/grub_cmd_test.in @@ -2,8 +2,8 @@ set -e # create a randome file -empty="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -non_empty="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +empty="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 +non_empty="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 cat >$non_empty <$outfile <$tmp error_if_not "`head -n1 $tmp|tail -n1`" '{ test_blockarg { true } }' diff --git a/tests/ohci_test.in b/tests/ohci_test.in index 2b96539b8..c72618656 100644 --- a/tests/ohci_test.in +++ b/tests/ohci_test.in @@ -34,8 +34,8 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in exit 0;; esac -imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 +outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 echo "hello" > "$outfile" diff --git a/tests/partmap_test.in b/tests/partmap_test.in index 5f18ab51c..7906db43d 100644 --- a/tests/partmap_test.in +++ b/tests/partmap_test.in @@ -101,8 +101,8 @@ if ! which parted >/dev/null 2>&1; then exit 77 fi -imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 +outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 # # MSDOS partition types diff --git a/tests/pata_test.in b/tests/pata_test.in index 38dff74a8..a69719bf5 100644 --- a/tests/pata_test.in +++ b/tests/pata_test.in @@ -38,8 +38,8 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in ;; esac -imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 +outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 echo "hello" > "$outfile" diff --git a/tests/syslinux_test.in b/tests/syslinux_test.in index 4ea86390e..44d3cdf7a 100644 --- a/tests/syslinux_test.in +++ b/tests/syslinux_test.in @@ -2,7 +2,7 @@ set -e -outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 "@builddir@/grub-syslinux2cfg" -r "@abs_top_srcdir@/tests/syslinux/ubuntu10.04" "@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux/isolinux.cfg" -o "$outfile" diff --git a/tests/test_sha512sum.in b/tests/test_sha512sum.in index d97b7ae2c..b2bd89609 100644 --- a/tests/test_sha512sum.in +++ b/tests/test_sha512sum.in @@ -2,7 +2,7 @@ set -e # create a randome file -file="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +file="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 cat >$file <$outfile1 <$outfile2 SHA1=`cat $outfile1 | tr -d '\n' | cut -f1 -d\ ` diff --git a/tests/uhci_test.in b/tests/uhci_test.in index 9a9492a43..7b8892c63 100644 --- a/tests/uhci_test.in +++ b/tests/uhci_test.in @@ -34,8 +34,8 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in exit 0;; esac -imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 +outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 echo "hello" > "$outfile" -- 2.27.0