mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 16:49:23 +00:00
tests: A failure of mktemp should cause the test script to exit with code 99
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 <development@efficientek.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
579575be38
commit
bcb15e011a
11 files changed
+21
-21
No files matched your search
@@ -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 <<EOF
|
||||
hello world!
|
||||
EOF
|
||||
@@ -21,7 +21,7 @@ else
|
||||
fi
|
||||
|
||||
|
||||
outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1
|
||||
outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
|
||||
@builddir@/grub-shell --files=$grub_empty=$empty --files=$grub_non_empty=$non_empty>$outfile <<EOF
|
||||
if ! test -f $grub_empty; then
|
||||
echo FAIL1
|
||||
|
||||
Reference in new issue
Block a user