[lvm-devel] [PATCH 22/24] Testing: Try to prioritize locking process
Zdenek Kabelac
zkabelac at redhat.com
Sun Jan 30 12:57:45 UTC 2011
This is rather 'hotfix' - it will run lvm command with lower
prioritu - thus flock process should exit sooner before it's
checked by 'ps' for it's existance.
Think about better way how to test this.
Signed-off-by: Zdenek Kabelac <zkabelac at redhat.com>
---
test/t-lock-blocking.sh | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/test/t-lock-blocking.sh b/test/t-lock-blocking.sh
index e3ec63c..3e6985b 100644
--- a/test/t-lock-blocking.sh
+++ b/test/t-lock-blocking.sh
@@ -20,17 +20,17 @@ vgcreate $vg $dev1 $dev2
# if wait_for_locks set, vgremove should wait for orphan lock
# flock process should have exited by the time first vgremove completes
-flock -w 5 $TESTDIR/var/lock/lvm/P_orphans -c "sleep 10" &
+flock -w 4 $TESTDIR/var/lock/lvm/P_orphans -c "sleep 6" &
flock_pid=`jobs -p`
-vgremove --config 'global { wait_for_locks = 1 }' $vg
-not vgremove --config 'global { wait_for_locks = 1 }' $vg
+nice vgremove -vvvv --config 'global { wait_for_locks = 1 }' $vg
+nice not vgremove -vvvv --config 'global { wait_for_locks = 1 }' $vg
not ps $flock_pid # finished
# if wait_for_locks not set, vgremove should fail on non-blocking lock
# we must wait for flock process at the end - vgremove won't wait
vgcreate $vg $dev1 $dev2
-flock -w 5 $TESTDIR/var/lock/lvm/P_orphans -c "sleep 10" &
+flock -w 4 $TESTDIR/var/lock/lvm/P_orphans -c "sleep 6" &
flock_pid=`jobs -p`
-not vgremove --config 'global { wait_for_locks = 0 }' $vg
+nice not vgremove --config 'global { wait_for_locks = 0 }' $vg
ps $flock_pid # still running
kill $flock_pid
--
1.7.3.5
More information about the lvm-devel
mailing list