1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00
lvm2/test
Ondrej Kozina 8c9ab2a4dd 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)
2015-04-28 22:31:40 +02:00
..
api tests: drop DEBUG log after success 2015-04-22 10:55:37 +02:00
lib tests: simplify removal of dangling bg procs 2015-04-28 22:31:40 +02:00
shell tests: simplify removal of dangling bg procs 2015-04-28 22:31:40 +02:00
unit makefiles: cleanup update 2013-06-04 15:57:18 +02:00
.gitignore gitignore: Remove redundant test dir entry 2012-06-08 23:34:15 +01:00
Makefile.in tests: more help# 2015-04-28 11:35:56 +02:00