summaryrefslogtreecommitdiff
path: root/tests/libqtest.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2017-09-11 12:19:49 -0500
committerThomas Huth <thuth@redhat.com>2017-09-15 09:05:19 +0200
commit4fb609adc91c9352ae72b82cef53002c2e32d7fb (patch)
tree2f82b4d9d5417cd526eac22db05b636c0b067f42 /tests/libqtest.c
parente8fc894b6718e3e8bee783e5492cce4519423bdf (diff)
downloadqemu-4fb609adc91c9352ae72b82cef53002c2e32d7fb.tar.gz
libqtest: Remove dead qtest_instances variable
Prior to commit 063c23d9, we were tracking a list of parallel qtest objects, in order to safely clean up a SIGABRT handler only after the last connection quits. But when we switched to more of glib's infrastructure, the list became dead code that is never assigned to. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/libqtest.c')
-rw-r--r--tests/libqtest.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 3daa0e3917..cbd709470b 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -42,7 +42,6 @@ struct QTestState
};
static GHookList abrt_hooks;
-static GList *qtest_instances;
static struct sigaction sigact_old;
#define g_assert_no_errno(ret) do { \
@@ -247,13 +246,10 @@ QTestState *qtest_init(const char *extra_args)
void qtest_quit(QTestState *s)
{
- qtest_instances = g_list_remove(qtest_instances, s);
g_hook_destroy_link(&abrt_hooks, g_hook_find_data(&abrt_hooks, TRUE, s));
/* Uninstall SIGABRT handler on last instance */
- if (!qtest_instances) {
- cleanup_sigabrt_handler();
- }
+ cleanup_sigabrt_handler();
kill_qemu(s);
close(s->fd);