qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tests: classify some ivshmem tests as slow


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] tests: classify some ivshmem tests as slow
Date: Thu, 12 Nov 2015 12:58:52 +0000

On 12 November 2015 at 11:10,  <address@hidden> wrote:
> From: Marc-André Lureau <address@hidden>
>
> Some tests may take long to run, move them under g_test_slow()
> condition.
>
> The 5s timeout for the "server" test will have to be adjusted to the worst
> known time (for the records, it takes ~0.2s on my host). The "pair"
> test takes ~1.7, a quickest version could be implemented.

I assume your host is using KVM, so it's not very interesting
from the point of view of trying to measure worst-case runtime...
You need to find a moderately slow non-x86 host and time that.

> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
>  tests/ivshmem-test.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/ivshmem-test.c b/tests/ivshmem-test.c
> index c8f0cf0..f1793ba 100644
> --- a/tests/ivshmem-test.c
> +++ b/tests/ivshmem-test.c
> @@ -478,10 +478,12 @@ int main(int argc, char **argv)
>      tmpserver = g_strconcat(tmpdir, "/server", NULL);
>
>      qtest_add_func("/ivshmem/single", test_ivshmem_single);
> -    qtest_add_func("/ivshmem/pair", test_ivshmem_pair);
> -    qtest_add_func("/ivshmem/server", test_ivshmem_server);
>      qtest_add_func("/ivshmem/hotplug", test_ivshmem_hotplug);
>      qtest_add_func("/ivshmem/memdev", test_ivshmem_memdev);
> +    if (g_test_slow()) {
> +        qtest_add_func("/ivshmem/pair", test_ivshmem_pair);
> +        qtest_add_func("/ivshmem/server", test_ivshmem_server);
> +    }
>
>      ret = g_test_run();

I've applied this to master anyway, but we should look at
a more permanent/general fix too.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]