Patchwork [for-4.0,5/5] tests/pxe: Make test independent from global_qtest

login
register
mail settings
Submitter Thomas Huth
Date Dec. 6, 2018, 4:49 p.m.
Message ID <1544114998-1513-6-git-send-email-thuth@redhat.com>
Download mbox | patch
Permalink /patch/674365/
State New
Headers show

Comments

Thomas Huth - Dec. 6, 2018, 4:49 p.m.
global_qtest is not really required here, since boot_sector_test()
is already independent from that global variable.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/pxe-test.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Eric Blake - Dec. 6, 2018, 6:50 p.m.
On 12/6/18 10:49 AM, Thomas Huth wrote:
> global_qtest is not really required here, since boot_sector_test()
> is already independent from that global variable.

Inconsistency in the use of 'independent of' and 'independent from' 
across the series. I think both work grammatically (English is screwy 
that way), but I prefer 'independent of'; it also matches your existing 
commits such as 7cbe423c.

> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   tests/pxe-test.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

Patch

diff --git a/tests/pxe-test.c b/tests/pxe-test.c
index 6e36796..73ac1d1 100644
--- a/tests/pxe-test.c
+++ b/tests/pxe-test.c
@@ -61,6 +61,7 @@  static testdef_t s390x_tests[] = {
 
 static void test_pxe_one(const testdef_t *test, bool ipv6)
 {
+    QTestState *qts;
     char *args;
 
     args = g_strdup_printf(
@@ -70,9 +71,9 @@  static void test_pxe_one(const testdef_t *test, bool ipv6)
         test->machine, disk, ipv6 ? "off" : "on", ipv6 ? "on" : "off",
         test->model);
 
-    qtest_start(args);
-    boot_sector_test(global_qtest);
-    qtest_quit(global_qtest);
+    qts = qtest_init(args);
+    boot_sector_test(qts);
+    qtest_quit(qts);
     g_free(args);
 }