Unverified Commit 01b9dbc5 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13815 [OLK-6.6][Backport] selftests/intel_pstate: fix operand expected error

Merge Pull Request from: @lazy2528 
 
Running "make kselftest TARGETS=intel_pstate" results in
the following errors:
- ./run.sh: line 90: / 1000: syntax error: operand expected
(error token is "/ 1000")
- ./run.sh: line 92: / 1000: syntax error: operand expected
(error token is "/ 1000")

This fix allows to have cross-platform compatibility when
using arithmetic expression with command substitutions.

#IB6W7T  
 
Link:https://gitee.com/openeuler/kernel/pulls/13815

 

Reviewed-by: default avatarZhang Peng <zhangpeng362@huawei.com>
Signed-off-by: default avatarZhang Peng <zhangpeng362@huawei.com>
parents 1e30b22d 3821e312
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -87,9 +87,9 @@ mkt_freq=${_mkt_freq}0

# Get the ranges from cpupower
_min_freq=$(cpupower frequency-info -l | tail -1 | awk ' { print $1 } ')
min_freq=$(($_min_freq / 1000))
min_freq=$((_min_freq / 1000))
_max_freq=$(cpupower frequency-info -l | tail -1 | awk ' { print $2 } ')
max_freq=$(($_max_freq / 1000))
max_freq=$((_max_freq / 1000))


[ $EVALUATE_ONLY -eq 0 ] && for freq in `seq $max_freq -100 $min_freq`