提交 72441ea5 编写于 作者: P Po-Hsu Lin 提交者: Shuah Khan

selftests: check percentage range for memory-hotplug test

Check the precentage range for -r flag in memory-hotplug test.
Signed-off-by: NPo-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
上级 a34b28c9
...@@ -136,6 +136,10 @@ while getopts e:hp:r: opt; do ...@@ -136,6 +136,10 @@ while getopts e:hp:r: opt; do
;; ;;
r) r)
ratio=$OPTARG ratio=$OPTARG
if [ "$ratio" -gt 100 ] || [ "$ratio" -lt 0 ]; then
echo "The percentage should be an integer within 0~100 range"
exit 1
fi
;; ;;
esac esac
done done
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册