@@ -4,7 +4,7 @@ verbose="no"
if [ ! -f config.mak ]; then
echo "run ./configure && make first. See ./configure -h"
- exit
+ exit 1
fi
source config.mak
source scripts/functions.bash
@@ -41,7 +41,7 @@ while getopts "g:hv" opt; do
verbose="yes"
;;
*)
- exit
+ exit 1
;;
esac
done
@@ -2,7 +2,7 @@
if [ ! -f config.mak ]; then
echo "run ./configure && make first. See ./configure -h"
- exit
+ exit 1
fi
source config.mak
source scripts/functions.bash
@@ -21,7 +21,7 @@ temp_file ()
echo "$var=\`mktemp\`"
echo "cleanup=\"\$$var \$cleanup\""
- echo "base64 -d << 'BIN_EOF' | zcat > \$$var || exit 1"
+ echo "base64 -d << 'BIN_EOF' | zcat > \$$var || exit 2"
gzip - < $file | base64
@@ -47,8 +47,8 @@ generate_test ()
if [ ! -f $kernel ]; then
echo 'echo "skip '"$testname"' (test kernel not present)"'
- echo 'exit 1'
- return 1
+ echo 'exit 2'
+ return
fi
echo "trap 'rm -f \$cleanup' EXIT"
@@ -73,11 +73,11 @@ function mkstandalone()
local testname="$1"
if [ -z "$testname" ]; then
- return 1
+ return
fi
if [ -n "$one_testname" ] && [ "$testname" != "$one_testname" ]; then
- return 1
+ return
fi
standalone=tests/$testname
@@ -86,8 +86,6 @@ function mkstandalone()
chmod +x $standalone
echo Written $standalone.
-
- return 0
}
trap 'rm -f $cfg' EXIT
@@ -23,7 +23,7 @@ function run()
if [ -n "$arch" ] && [ "$arch" != "$ARCH" ]; then
echo "skip $1 ($arch only)"
- return
+ return 2
fi
# check a file for a particular value before running a test
@@ -34,7 +34,7 @@ function run()
value=${check_param#*=}
if [ "$path" ] && [ "$(cat $path)" != "$value" ]; then
echo "skip $1 ($path not equal to $value)"
- return
+ return 2
fi
done
@@ -1,6 +1,4 @@
#!/bin/bash
-NOTFOUND=1
-TESTDEVNOTSUPP=2
qemubinarysearch="${QEMU:-qemu-kvm qemu-system-x86_64}"
@@ -19,11 +17,11 @@ done
if [ -z "${QEMUFOUND}" ]
then
echo "A QEMU binary was not found, You can set a custom location by using the QEMU=<path> environment variable "
- exit ${NOTFOUND}
+ exit 2
elif [ -z "${qemu}" ]
then
echo "No Qemu test device support found"
- exit ${TESTDEVNOTSUPP}
+ exit 2
fi
if