From 25869054ded6c5ca90abff6096efe101c66d11bc Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Fri, 13 Apr 2018 13:26:08 +0200 Subject: [PATCH] qa: krbd_exclusive_option.sh: be more lax about ps states Allow running this script by hand -- foreground process group vs background process groups, etc. Signed-off-by: Ilya Dryomov --- qa/workunits/rbd/krbd_exclusive_option.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qa/workunits/rbd/krbd_exclusive_option.sh b/qa/workunits/rbd/krbd_exclusive_option.sh index dae18d83e68..c616b643360 100755 --- a/qa/workunits/rbd/krbd_exclusive_option.sh +++ b/qa/workunits/rbd/krbd_exclusive_option.sh @@ -126,7 +126,7 @@ dd if=/dev/urandom of=$OTHER_DEV bs=4k count=10 oflag=direct & PID=$! sleep 20 assert_locked $DEV -[ "$(ps -o stat= $PID)" = "D" ] +[[ "$(ps -o stat= $PID)" =~ ^D ]] sudo rbd unmap $DEV wait $PID assert_locked $OTHER_DEV @@ -140,7 +140,7 @@ SUDO_PID=$! sleep 20 assert_locked $DEV PID="$(ps -o pid= --ppid $SUDO_PID)" -[ "$(ps -o stat= $PID)" = "Dl" ] +[[ "$(ps -o stat= $PID)" =~ ^D ]] sudo rbd unmap $DEV wait $SUDO_PID assert_locked $OTHER_DEV -- 2.39.5