@@ -96,7 +96,7 @@ test_filter_region()
while [ $i -lt $count ]; do
monitor_region=$($NDCTL list -R -b $smart_supported_bus | jq -r .[$i].dev)
monitor_dimms=$(get_monitor_dimm "-r $monitor_region")
- [ ! -z $monitor_dimms ] && break
+ [ ! -z "$monitor_dimms" ] && break
i=$((i + 1))
done
start_monitor "-r $monitor_region"
@@ -147,6 +147,7 @@ test_filter_dimmevent()
inject_value=$($NDCTL list -H -d $monitor_dimms | jq -r .[]."health"."temperature_threshold")
inject_value=$((inject_value + 1))
+ inject_value=${inject_value%.*}
start_monitor "-d $monitor_dimms -D dimm-media-temperature"
inject_smart "-m $inject_value"
check_result "$monitor_dimms"
$ grep -w line build/meson-logs/testlog.txt test/monitor.sh: line 99: [: too many arguments test/monitor.sh: line 99: [: nmem0: binary operator expected test/monitor.sh: line 149: 40.0: syntax error: invalid arithmetic operator (error token is ".0") - monitor_dimms could be a string with multiple *spaces*, like: "nmem0 nmem1 nmem2" - inject_value is a float value, like 40.0, need to convert to integer. Some features have not been really verified due to these errors Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> --- test/monitor.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)