All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tests: classify some ivshmem tests as slow
@ 2015-11-12 11:10 marcandre.lureau
  2015-11-12 11:57 ` Markus Armbruster
  2015-11-12 12:58 ` Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: marcandre.lureau @ 2015-11-12 11:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

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.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 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();
 
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] tests: classify some ivshmem tests as slow
  2015-11-12 11:10 [Qemu-devel] [PATCH] tests: classify some ivshmem tests as slow marcandre.lureau
@ 2015-11-12 11:57 ` Markus Armbruster
  2015-11-12 12:58 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Markus Armbruster @ 2015-11-12 11:57 UTC (permalink / raw)
  To: marcandre.lureau; +Cc: qemu-devel

marcandre.lureau@redhat.com writes:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> 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.

Sounds like you need a FIXME comment there.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] tests: classify some ivshmem tests as slow
  2015-11-12 11:10 [Qemu-devel] [PATCH] tests: classify some ivshmem tests as slow marcandre.lureau
  2015-11-12 11:57 ` Markus Armbruster
@ 2015-11-12 12:58 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2015-11-12 12:58 UTC (permalink / raw)
  To: Marc-André Lureau; +Cc: QEMU Developers

On 12 November 2015 at 11:10,  <marcandre.lureau@redhat.com> wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> 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 <marcandre.lureau@redhat.com>
> ---
>  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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-12 12:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-12 11:10 [Qemu-devel] [PATCH] tests: classify some ivshmem tests as slow marcandre.lureau
2015-11-12 11:57 ` Markus Armbruster
2015-11-12 12:58 ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.