Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mImyG-0002wt-Im for mharc-grub-devel@gnu.org; Wed, 25 Aug 2021 03:05:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mImy4-0002lJ-Rj for grub-devel@gnu.org; Wed, 25 Aug 2021 03:05:01 -0400 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]:40815) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mImy2-0002ej-VF for grub-devel@gnu.org; Wed, 25 Aug 2021 03:05:00 -0400 Received: by mail-qt1-x836.google.com with SMTP id c19so8169788qte.7 for ; Wed, 25 Aug 2021 00:04:58 -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=/+y9fjj9nEPmO3NX+2vnnUmx+z73fpy8P0V9CCQgaAA=; b=Nkdk1KFQL1sPBM2uK2VlnIzjVcFKdqZ/ahU9w6KE3COM1lbRVCy4T3m/TglP05z9sq yoUkGU/fUESngjhFb57fGm76x4ok/LQMTRL2B1rW3zqZCH/IHwaPJho2Sxm9vSqL6tMH e3O/6V4ZZojx1vjAoqwPu4lTSi59f9OS8xwvMtbWqqx6dJgt+AT7uw0OLYJ/ZdXRa913 XNbxOBx2w5ZT+/WAhflfqL9KNYMqAOLk1L9q0kdx/Njy2rcPWH5ZnAD4S9acZlEa5rEU lztVzZGXzvSUKRVMCuUyDrYtwCaNfrEv6+mhzrKn5dOYPJlA0rDiJUF4S04Z9ouyarrW 4S2Q== 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=/+y9fjj9nEPmO3NX+2vnnUmx+z73fpy8P0V9CCQgaAA=; b=NiPTejYAM2BkTgWoZgKwP4q7vC3vXQkRJWKpIO1JZJsoogdwmMsBUQATuHKQM2valB Z5S8WBgylnl2Yt9GdShxhj75+2C2r+1atCqWZJ1fu3h9fo2duadR7vUDQ9LyFxGlhZeD /G47Wd36Stgof6MOkl4TcazugHZwE6xXH/TRySG5IjkJCsFr0BdVHFPZRTTr5LR+64CZ fBvIFiL9QoyDutZqBxC1qCal6MlzSb2+B05F/svM8lII4QiPqYDSiA9sdRNqE44QsbUl HJnamjSAKUPESedz11l0cUoZJob/rSpbfXVCiEZW1w5X8Kjx1y7M4gQeEEZTrY1Jm9V1 hMog== X-Gm-Message-State: AOAM533ppqAu3dtTUgf6kJa0nO3y52Zax8CNWLO4DHI/0OXWPsFvtzi5 X5I/tth+OfgTu0nGkuBmWe7ROYaIG3//30Qz X-Google-Smtp-Source: ABdhPJxoBsganMAZ6xwuMeEimYw4vkinJ9XI8eng+70Sqd2s5TKeHdMK2t/HI3Z531F9G0JnGSfqJA== X-Received: by 2002:ac8:53d6:: with SMTP id c22mr31420478qtq.38.1629875097748; Wed, 25 Aug 2021 00:04:57 -0700 (PDT) Received: from localhost.localdomain ([199.58.83.11]) by smtp.gmail.com with ESMTPSA id g1sm12444585qkd.89.2021.08.25.00.04.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Aug 2021 00:04:57 -0700 (PDT) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: [PATCH v2 6/8] tests: A failure of mktemp should cause the test script to exit with code 99 Date: Wed, 25 Aug 2021 02:04:00 -0500 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::836; envelope-from=development@efficientek.com; helo=mail-qt1-x836.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, 25 Aug 2021 07:05:06 -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 30dc9d31a..a2bcff6b9 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 64bd80070..da7652bd3 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 cc35f67a9..c55aad4ad 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 3d19cecde..0db4778d7 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 6aab10ba6..193129687 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