summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRuediger Meier2017-06-27 20:34:29 +0200
committerRuediger Meier2017-06-29 14:04:29 +0200
commit66b7469960bc97c05a22498d11117ef2d60b54cd (patch)
tree0d334e0c6b57554241ea13fbfcc34e89792d5c76 /tools
parentmisc: avoid some dead initialization warnings (diff)
downloadkernel-qcow2-util-linux-66b7469960bc97c05a22498d11117ef2d60b54cd.tar.gz
kernel-qcow2-util-linux-66b7469960bc97c05a22498d11117ef2d60b54cd.tar.xz
kernel-qcow2-util-linux-66b7469960bc97c05a22498d11117ef2d60b54cd.zip
tools: add segfault detection for checkusage.sh
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/checkusage.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/checkusage.sh b/tools/checkusage.sh
index 6cde8fbf6..69d69fde1 100755
--- a/tools/checkusage.sh
+++ b/tools/checkusage.sh
@@ -61,8 +61,8 @@ function exec_option {
# hardcoded ... nologin should always return false
if test "$cmdb" = "nologin" &&
test "$opt" = "--help" -o "$opt" = "--version"; then
- if test "$ret" = "0"; then
- echo "$cmdb, $opt, should return false"
+ if test "$ret" -eq 0 -o "$ret" -ge 128; then
+ echo "$cmdb, $opt, should return false: $ret"
fi
ret=0
fi
@@ -123,6 +123,8 @@ function check_unknownopt {
if test $ret = 0; then
echo "$cb: $opt, returns no error"
+ elif test $ret -ge 128; then
+ echo "$cb: $opt, abnormal exit: $ret"
fi
if test -n "$out"; then
echo "$cb: $opt, non-empty stdout"