From: Arshad Hussain Date: Thu, 6 Jul 2023 10:25:04 +0000 (+0530) Subject: LU-16947 tests: On error correctly kill multiop X-Git-Tag: 2.15.57~19 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=15a6c58e862c73ec4756a4b7e4f4a4eb92e2b3c6;p=fs%2Flustre-release.git LU-16947 tests: On error correctly kill multiop 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 Change-Id: I3fb505302615512a891725e7339a6f0238c2cdab Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51589 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index d68eb37..59a6a96 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -7691,6 +7691,7 @@ multiop_bg_pause() { echo "$MULTIOP_PROG $FILE v$ARGS" $MULTIOP_PROG $FILE v$ARGS > $TMPPIPE & + local pid=$! echo "TMPPIPE=${TMPPIPE}" read -t 60 multiop_output < $TMPPIPE @@ -7701,7 +7702,7 @@ multiop_bg_pause() { rm -f $TMPPIPE if [ "$multiop_output" != "PAUSING" ]; then echo "Incorrect multiop output: $multiop_output" - kill -9 $PID + kill -9 $pid return 1 fi