qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Li Qiang <liq3ea@gmail.com>
To: pbonzini@redhat.com, thuth@redhat.com, lvivier@redhat.com,
	philmd@redhat.com
Cc: qemu-devel@nongnu.org, Li Qiang <liq3ea@gmail.com>
Subject: [Qemu-devel] [PATCH v2 2/2] tests: fw_cfg: add reboot_timeout test case
Date: Mon, 29 Oct 2018 21:28:52 -0700	[thread overview]
Message-ID: <1540873732-3503-3-git-send-email-liq3ea@gmail.com> (raw)
In-Reply-To: <1540873732-3503-1-git-send-email-liq3ea@gmail.com>

Signed-off-by: Li Qiang <liq3ea@gmail.com>
---
 tests/fw_cfg-test.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/fw_cfg-test.c b/tests/fw_cfg-test.c
index 1c5103fe1c..aeabd17ec0 100644
--- a/tests/fw_cfg-test.c
+++ b/tests/fw_cfg-test.c
@@ -99,6 +99,15 @@ static void test_fw_cfg_boot_menu(void)
     g_assert_cmpint(qfw_cfg_get_u16(fw_cfg, FW_CFG_BOOT_MENU), ==, boot_menu);
 }
 
+static void test_fw_cfg_reboot_timeout(void)
+{
+    uint32_t reboot_timeout;
+
+    qfw_cfg_get_file(fw_cfg, "etc/boot-fail-wait",
+                     &reboot_timeout, sizeof(reboot_timeout));
+    g_assert_cmpint(reboot_timeout, <=, 65535);
+}
+
 int main(int argc, char **argv)
 {
     QTestState *s;
@@ -125,6 +134,7 @@ int main(int argc, char **argv)
     qtest_add_func("fw_cfg/max_cpus", test_fw_cfg_max_cpus);
     qtest_add_func("fw_cfg/numa", test_fw_cfg_numa);
     qtest_add_func("fw_cfg/boot_menu", test_fw_cfg_boot_menu);
+    qtest_add_func("fw_cfg/reboot_timeout", test_fw_cfg_reboot_timeout);
 
     ret = g_test_run();
 
-- 
2.11.0

  parent reply	other threads:[~2018-10-30  4:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-30  4:28 [Qemu-devel] [PATCH v2 0/2] test: fw_cfg: add reboot-timeout test case Li Qiang
2018-10-30  4:28 ` [Qemu-devel] [PATCH v2 1/2] tests: fw_cfg: add a function to get the fw_cfg file entry Li Qiang
2018-10-30  4:28 ` Li Qiang [this message]
2018-10-30 10:52   ` [Qemu-devel] [PATCH v2 2/2] tests: fw_cfg: add reboot_timeout test case Paolo Bonzini
2018-10-30 13:31     ` Li Qiang
2018-11-01  9:51 ` [Qemu-devel] [PATCH v2 0/2] test: fw_cfg: add reboot-timeout " no-reply
2018-11-01 11:19   ` Li Qiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1540873732-3503-3-git-send-email-liq3ea@gmail.com \
    --to=liq3ea@gmail.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).