]> sourceware.org Git - lvm2.git/commit
tests: simplify removal of dangling bg procs
authorOndrej Kozina <okozina@redhat.com>
Mon, 27 Apr 2015 08:33:45 +0000 (10:33 +0200)
committerOndrej Kozina <okozina@redhat.com>
Tue, 28 Apr 2015 20:31:40 +0000 (22:31 +0200)
commit8c9ab2a4dd827b575a7a8b501c5ca3474508f964
tree337237cd21da431f47be8b0be59c7d71a97ad099
parent3f0434057b8b77efd63fe0c502a962bc9dd13223
tests: simplify removal of dangling bg procs

some tests left dangling bg processes originating in
lvm2 commands being able to spawn any bg polling process
(lvchange, vgchange, pvmove, lvconvert...)

Initial fn 'add_to_kill_list' should collect processes with
specific parameters (proc's command line and parent processes ID).
After testing finishes the fn kill_listed_processes should remove these
listed by 'add_to_kill_list'.

Unfortunately it proved to be prone to an error especially in scenarios
where cmd line of initiating command contained characters required to
be espaced before passing to shell script to make it work correctly.
(Or if cmd spawned more than one bg process with same cmd line. i.e.:
vgchange or lvchange).

The new implementation is much simpler. It uses env. variable (LVM_TEST_TAG)
for marking a process desired to be killed later or during test env. teardown.
(i.e.: LVM_TEST_TAG=kill_me_$PREFIX to kill only processes related to
current test environment)
test/lib/aux.sh
test/shell/pvmove-abort-all.sh
test/shell/pvmove-abort.sh
test/shell/pvmove-basic.sh
test/shell/pvmove-restart.sh
This page took 0.039089 seconds and 5 git commands to generate.