selftests: check percentage range for memory-hotplug test
Check the precentage range for -r flag in memory-hotplug test. Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
This commit is contained in:
parent
a34b28c92e
commit
72441ea588
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue