[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/10] tests/qtest/boot-sector: Check that the guest did not panic
From: |
Thomas Huth |
Subject: |
[PULL 08/10] tests/qtest/boot-sector: Check that the guest did not panic |
Date: |
Fri, 19 Feb 2021 08:57:36 +0100 |
The s390-ccw bios code panics if it can not boot successfully. In
this case, it does not make sense that we wait the full 600 seconds
for the boot sector test to finish and can signal the failure
immediately, thus let's check the status of the guest with the
"query-status" QMP command here, too.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210212113141.854871-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/boot-sector.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/qtest/boot-sector.c b/tests/qtest/boot-sector.c
index 24df5c4734..ea8f264661 100644
--- a/tests/qtest/boot-sector.c
+++ b/tests/qtest/boot-sector.c
@@ -138,6 +138,7 @@ void boot_sector_test(QTestState *qts)
uint8_t signature_low;
uint8_t signature_high;
uint16_t signature;
+ QDict *qrsp, *qret;
int i;
/* Wait at most 600 seconds (test is slow with TCI and --enable-debug) */
@@ -155,6 +156,14 @@ void boot_sector_test(QTestState *qts)
if (signature == SIGNATURE) {
break;
}
+
+ /* check that guest is still in "running" state and did not panic */
+ qrsp = qtest_qmp(qts, "{ 'execute': 'query-status' }");
+ qret = qdict_get_qdict(qrsp, "return");
+ g_assert_nonnull(qret);
+ g_assert_cmpstr(qdict_get_try_str(qret, "status"), ==, "running");
+ qobject_unref(qrsp);
+
g_usleep(TEST_DELAY);
}
--
2.27.0
- [PULL 00/10] gitlab and qtest patches, Thomas Huth, 2021/02/19
- [PULL 01/10] tests/qtest/boot-serial-test: Test Virt machine with 'max', Thomas Huth, 2021/02/19
- [PULL 02/10] gitlab: always build container images, Thomas Huth, 2021/02/19
- [PULL 03/10] gitlab: add fine grained job deps for all build jobs, Thomas Huth, 2021/02/19
- [PULL 04/10] gitlab: fix inconsistent indentation, Thomas Huth, 2021/02/19
- [PULL 05/10] gitlab-ci: Display Avocado log content when tests timeout, Thomas Huth, 2021/02/19
- [PULL 08/10] tests/qtest/boot-sector: Check that the guest did not panic,
Thomas Huth <=
- [PULL 06/10] scripts/checkpatch: Improve the check for authors mangled by the mailing list, Thomas Huth, 2021/02/19
- [PULL 10/10] travis.yml: Limit simultaneous jobs to 3, Thomas Huth, 2021/02/19
- [PULL 09/10] gitlab-ci.yml: Run check-tcg with TCI, Thomas Huth, 2021/02/19
- [PULL 07/10] gitlab-ci: Disable vhost-kernel in build-disable job, Thomas Huth, 2021/02/19
- Re: [PULL 00/10] gitlab and qtest patches, Peter Maydell, 2021/02/19