dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

Blame 0007-tests-Ensure-TAP-version-is-printed-before-other-mes.patch

f48e9e
From 4021e0a116b568c312b864dfc27dfeed3317538a Mon Sep 17 00:00:00 2001
f48e9e
From: "Richard W.M. Jones" <rjones@redhat.com>
f48e9e
Date: Mon, 27 Feb 2023 17:37:10 +0000
f48e9e
Subject: [PATCH 7/7] tests: Ensure TAP version is printed before other
f48e9e
 messages
f48e9e
f48e9e
These two tests were failing with this error:
f48e9e
f48e9e
  stderr:
f48e9e
  TAP parsing error: version number must be on the first line
f48e9e
  [...]
f48e9e
  Unknown TAP version. The first line MUST be `TAP version <int>`. Assuming version 12.
f48e9e
f48e9e
This can be fixed by ensuring we always call g_test_init first in the
f48e9e
body of main.
f48e9e
f48e9e
Thanks: Daniel Berrange, for diagnosing the problem
f48e9e
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
f48e9e
---
f48e9e
 tests/qtest/rtl8139-test.c | 5 +++--
f48e9e
 1 file changed, 3 insertions(+), 2 deletions(-)
f48e9e
f48e9e
diff --git a/tests/qtest/rtl8139-test.c b/tests/qtest/rtl8139-test.c
f48e9e
index 8fa3313cc3..90bb616974 100644
f48e9e
--- a/tests/qtest/rtl8139-test.c
f48e9e
+++ b/tests/qtest/rtl8139-test.c
f48e9e
@@ -196,9 +196,10 @@ int main(int argc, char **argv)
f48e9e
 {
f48e9e
     int ret;
f48e9e
 
f48e9e
-    qtest_start("-device rtl8139");
f48e9e
-
f48e9e
     g_test_init(&argc, &argv, NULL);
f48e9e
+
f48e9e
+    qtest_start("-device rtl8139");
f48e9e
+
f48e9e
     qtest_add_func("/rtl8139/nop", nop);
f48e9e
     qtest_add_func("/rtl8139/timer", test_init);
f48e9e
 
f48e9e
-- 
f48e9e
2.37.3
f48e9e