From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Goldish Subject: [KVM-AUTOTEST PATCH 09/14] KVM test: remove reference to _screendump_thread at postprocessing Date: Sun, 13 Jun 2010 17:33:40 +0300 Message-ID: <1276439625-32472-9-git-send-email-mgoldish@redhat.com> References: <1276439625-32472-1-git-send-email-mgoldish@redhat.com> <1276439625-32472-2-git-send-email-mgoldish@redhat.com> <1276439625-32472-3-git-send-email-mgoldish@redhat.com> <1276439625-32472-4-git-send-email-mgoldish@redhat.com> <1276439625-32472-5-git-send-email-mgoldish@redhat.com> <1276439625-32472-6-git-send-email-mgoldish@redhat.com> <1276439625-32472-7-git-send-email-mgoldish@redhat.com> <1276439625-32472-8-git-send-email-mgoldish@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: autotest@test.kernel.org, kvm@vger.kernel.org Return-path: In-Reply-To: <1276439625-32472-8-git-send-email-mgoldish@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org _screendump_thread contains a reference to 'env' which prevents VMs from being garbage collected. This makes a difference for multi-iteration tests where several tests run consecutively in the same process. Removing the reference to _screendump_thread also removes a reference to VMs, thus allowing them to be garbage collected. This is mainly important for the new monitor classes. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_preprocessing.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py index 318bf3f..76c8268 100644 --- a/client/tests/kvm/kvm_preprocessing.py +++ b/client/tests/kvm/kvm_preprocessing.py @@ -285,6 +285,8 @@ def postprocess(test, params, env): logging.debug("Terminating screendump thread...") _screendump_thread_termination_event.set() _screendump_thread.join(10) + _screendump_thread = None + _screendump_thread_termination_event = None # Warn about corrupt PPM files for f in glob.glob(os.path.join(test.debugdir, "*.ppm")): -- 1.5.4.1