[PATCH dwarves 2/4] tests/btf_functions: return 2 to indicate test had to be skipped

Alan Maguire
2024-10-01T11:46:37Z

When vmlinux is not available, return 2 to indicate test is skipped.

Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
---
tests/btf_functions.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/btf_functions.sh b/tests/btf_functions.sh
index b8645cc..fbe68f9 100755
--- a/tests/btf_functions.sh
+++ b/tests/btf_functions.sh
@@ -32,13 +32,13 @@ if [ -z "$vmlinux" ] ; then
vmlinux=$(pahole --running_kernel_vmlinux)
if [ -z "$vmlinux" ] ; then
echo "Please specify a vmlinux file to operate on"
- exit 1
+ exit 2
fi
fi

if [ ! -f "$vmlinux" ] ; then
echo "$vmlinux file not available, please specify another"
- exit 1
+ exit 2
fi

outdir=$(mktemp -d /tmp/btf_functions.sh.XXXXXX)
--
2.43.5