Skip to content

Commit 7ef295d

Browse files
run.sh: fix stray processes / threads check
1 parent dba6c29 commit 7ef295d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tools/run.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ popd > /dev/null
1414

1515
# OK/NG decision
1616
rc=0
17-
[[ $exit_code != 0 ]] && rc=1
17+
(( exit_code != 0 )) && rc=1
1818

1919
# Check if kmsg is empty
2020
$MCKINSTALL/sbin/ihkosctl 0 kmsg > $recorddir/kmsg.log
2121
[[ "$(cat $recorddir/kmsg.log | wc -l)" != 1 ]] && echo "$(basename $0): WARNING: kmsg isn't empty."
2222

2323
# Check if process/thread structs remain
24-
! $AUTOTEST_HOME/bin/getnumprocess.sh && echo "$(basename $0): INFO: $nprocs process(es) remaining" && rc=1
25-
! $AUTOTEST_HOME/bin/getnumthread.sh && echo "$(basename $0): INFO: $nprocs thread(s) remaining" && rc=1
24+
nproc=$($AUTOTEST_HOME/bin/getnumprocess.sh)
25+
(( nproc != 0 )) && echo "$(basename $0): INFO: $nproc process(es) remaining" && rc=1
26+
nthr=$($AUTOTEST_HOME/bin/getnumthread.sh)
27+
(( nthr != 0 )) && echo "$(basename $0): INFO: $nthr thread(s) remaining" && rc=1
2628

2729
exit $rc

0 commit comments

Comments
 (0)