multiop_bg_pause under test-framework starts multiop
in background and waits for signal if "_" option is
provided. On 'verbose' mode the PAUSING string is
printed on console which is checked and if not found
error is reported by multiop_bg_pause function.
On error, it is required to kill the existing running
multiop binary and if not done will eventually timeout
and not exit the test.
Currently on error multiop_bg_pause function incorrectly
sends signal to wrong PID. This patch fixes this issue.
Test-Parameters: trivial testlist=replay-single mdscount=2 mdtcount=4
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I3fb505302615512a891725e7339a6f0238c2cdab
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51589
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
echo "$MULTIOP_PROG $FILE v$ARGS"
$MULTIOP_PROG $FILE v$ARGS > $TMPPIPE &
+ local pid=$!
echo "TMPPIPE=${TMPPIPE}"
read -t 60 multiop_output < $TMPPIPE
rm -f $TMPPIPE
if [ "$multiop_output" != "PAUSING" ]; then
echo "Incorrect multiop output: $multiop_output"
- kill -9 $PID
+ kill -9 $pid
return 1
fi