OSDN Git Service

tests: Ensure TAP version is printed before other messages
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 28 Feb 2023 19:06:45 +0000 (19:06 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 1 Mar 2023 12:45:03 +0000 (12:45 +0000)
commitae4b01b3497934849278b49f3dfd28420f75e300
tree2affac06bd5f22581fa6918c518fd3f29adffd4c
parent94b8b146df84ba472f461398d93fb9cdf0db8f94
tests: Ensure TAP version is printed before other messages

These two tests were failing with this error:

  stderr:
  TAP parsing error: version number must be on the first line
  [...]
  Unknown TAP version. The first line MUST be `TAP version <int>`. Assuming version 12.

This can be fixed by ensuring we always call g_test_init first in the
body of main.

Thanks: Daniel Berrange, for diagnosing the problem
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20230227174019.1164205-1-rjones@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230228190653.1602033-17-alex.bennee@linaro.org>
tests/qtest/fuzz-lsi53c895a-test.c
tests/qtest/rtl8139-test.c