diff options
author | Liu Yiding <yidingx.liu@intel.com> | 2019-06-26 11:22:55 +0800 |
---|---|---|
committer | Philip Li <philip.li@intel.com> | 2019-06-26 13:00:17 +0800 |
commit | 6073666d83dd1851f21a891775cb5e262306b171 (patch) | |
tree | 5fee993681f617df772f745e1595e43b0628db31 | |
parent | 9be0cb0f70c53dc17ba9225e7bb110e438b4a35d (diff) | |
download | lkp-tests-6073666d83dd1851f21a891775cb5e262306b171.tar.gz |
tests/pmbench: fix invalid parameter combination: mapsize < setsize
Recently, i run lkp on my local clearlinux env. My tbox just has 1G, pmbench
always failed due to below issue
------
root@clear-lkp-30040~/lkp-tests # lkp run pmbench-1-75%-100%-300s.yaml
/root/lkp-tests/tests/pmbench: line 38: mapsize: command not found
2019-06-26 03:03:08 /usr/local/bin/pmbench -m -j4 -c 300 > /tmp/lkp-root/pmbench/pmbench.1 &
invalid parameter combination: mapsize < setsize
------
the root cause is mapsize is 0. as tests/pmbench.yaml show
------
mapsize: Specify virtual address map size in Mebibyte (2^20 bytes) unit. The default is 256.
------
set default value if mapsize is 0.
Signed-off-by: Liu Yiding <yidingx.liu@intel.com>
Signed-off-by: Philip Li <philip.li@intel.com>
-rwxr-xr-x | tests/pmbench | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/pmbench b/tests/pmbench index 88dd0cad..924e7e53 100755 --- a/tests/pmbench +++ b/tests/pmbench @@ -32,7 +32,11 @@ set_opt() opt="${opt} -s$((setsize/1024/1024))" [ -z "$mapsize" ] && mapsize="$setsize" fi - [ -n "$mapsize" ] && opt="${opt} -m$((mapsize/1024/1024))" + [ -n "$mapsize" ] && { + mapsize=$((mapsize/1024/1024)) + [ "$mapsize" -eq 0 ] && mapsize=256 + opt="${opt} -m${mapsize}" + } [ -n "$pattern" ] && opt="${opt} -p${pattern}" [ -n "$shape" ] && opt="${opt} -e${shape}" [ -n "$nr_threads" ] && opt="${opt} -j${nr_threads}" |