qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Li Qiang <liq3ea@gmail.com>,
	thuth@redhat.com, lvivier@redhat.com, philmd@redhat.com
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 2/2] tests: fw_cfg: add reboot_timeout test case
Date: Tue, 30 Oct 2018 11:52:31 +0100	[thread overview]
Message-ID: <8554a03c-4409-c7f5-bd9e-613d03779e73@redhat.com> (raw)
In-Reply-To: <1540873732-3503-3-git-send-email-liq3ea@gmail.com>

On 30/10/2018 05:28, Li Qiang wrote:
> 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();

This test is not doing much; you could add "-boot reboot-timeout=15" and
check the value.

Paolo

  reply	other threads:[~2018-10-30 10:52 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 ` [Qemu-devel] [PATCH v2 2/2] tests: fw_cfg: add reboot_timeout test case Li Qiang
2018-10-30 10:52   ` Paolo Bonzini [this message]
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=8554a03c-4409-c7f5-bd9e-613d03779e73@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=liq3ea@gmail.com \
    --cc=lvivier@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).