Blame SOURCES/kvm-i440fx-test-qtest_start-should-be-paired-with-qtest_.patch

0a122b
From 79eec4a8ab4eb5897563cc140c0fc2ee0738dc0b Mon Sep 17 00:00:00 2001
0a122b
From: Laszlo Ersek <lersek@redhat.com>
0a122b
Date: Sat, 11 Jan 2014 18:00:04 +0100
0a122b
Subject: [PATCH 14/22] i440fx-test: qtest_start() should be paired with qtest_end()
0a122b
0a122b
RH-Author: Laszlo Ersek <lersek@redhat.com>
0a122b
Message-id: <1389463208-6278-15-git-send-email-lersek@redhat.com>
0a122b
Patchwork-id: 56627
0a122b
O-Subject: [RHEL-7.0 qemu-kvm PATCH 14/18] i440fx-test: qtest_start() should be paired with qtest_end()
0a122b
Bugzilla: 1032346
0a122b
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
0a122b
RH-Acked-by: Amos Kong <akong@redhat.com>
0a122b
RH-Acked-by: Andrew Jones <drjones@redhat.com>
0a122b
0a122b
Similarly to commit 1d9358e6
0a122b
("libqtest: New qtest_end() to go with qtest_start()").
0a122b
0a122b
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
0a122b
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
0a122b
(cherry picked from commit b817e3fb5401bfab49e3c212e6daa1ff1f5a4c9a)
0a122b
---
0a122b
 tests/i440fx-test.c | 10 ++++------
0a122b
 1 file changed, 4 insertions(+), 6 deletions(-)
0a122b
0a122b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
---
0a122b
 tests/i440fx-test.c |   10 ++++------
0a122b
 1 files changed, 4 insertions(+), 6 deletions(-)
0a122b
0a122b
diff --git a/tests/i440fx-test.c b/tests/i440fx-test.c
0a122b
index 65c786c..6ac46bf 100644
0a122b
--- a/tests/i440fx-test.c
0a122b
+++ b/tests/i440fx-test.c
0a122b
@@ -2,9 +2,11 @@
0a122b
  * qtest I440FX test case
0a122b
  *
0a122b
  * Copyright IBM, Corp. 2012-2013
0a122b
+ * Copyright Red Hat, Inc. 2013
0a122b
  *
0a122b
  * Authors:
0a122b
  *  Anthony Liguori   <aliguori@us.ibm.com>
0a122b
+ *  Laszlo Ersek      <lersek@redhat.com>
0a122b
  *
0a122b
  * This work is licensed under the terms of the GNU GPL, version 2 or later.
0a122b
  * See the COPYING file in the top-level directory.
0a122b
@@ -256,7 +258,6 @@ static void test_i440fx_pam(gconstpointer opaque)
0a122b
 
0a122b
 int main(int argc, char **argv)
0a122b
 {
0a122b
-    QTestState *s;
0a122b
     TestData data;
0a122b
     char *cmdline;
0a122b
     int ret;
0a122b
@@ -266,20 +267,17 @@ int main(int argc, char **argv)
0a122b
     data.num_cpus = 1;
0a122b
 
0a122b
     cmdline = g_strdup_printf("-smp %d", data.num_cpus);
0a122b
-    s = qtest_start(cmdline);
0a122b
+    qtest_start(cmdline);
0a122b
     g_free(cmdline);
0a122b
 
0a122b
     data.bus = qpci_init_pc();
0a122b
 
0a122b
     g_test_add_data_func("/i440fx/defaults", &data, test_i440fx_defaults);
0a122b
     g_test_add_data_func("/i440fx/pam", &data, test_i440fx_pam);
0a122b
-    
0a122b
 
0a122b
     ret = g_test_run();
0a122b
 
0a122b
-    if (s) {
0a122b
-        qtest_quit(s);
0a122b
-    }
0a122b
+    qtest_end();
0a122b
 
0a122b
     return ret;
0a122b
 }
0a122b
-- 
0a122b
1.7.1
0a122b