KVM test: kvm_subprocess.py: use only unbound methods as close() hooks

close() will pass 'self' as a parameter to the hook functions, i.e. it will
call hook(self) instead of just hook(), thus allowing the use of unbound
methods rather than bound ones.

This allows us to avoid self referencing: if a bound method is used, a
reference to it is kept in the class instance, and if the method is bound to
the same instance then we have a self-reference that prevents garbage
collection.

Signed-off-by: Michael Goldish <mgoldish@redhat.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3846 592f7852-d20e-0410-864c-8624ca9c26a4
1 file changed