diff mbox

[PULL,v2,0/7] Block patches

Message ID CAJ+F1CJwjt-pjs2ocub1LUBjDF4rs5xfabG4w+noZ6N1Rh9KnQ@mail.gmail.com
State New
Headers show

Commit Message

Marc-André Lureau Nov. 11, 2015, 8:59 p.m. UTC
Hi Peter

On Wed, Nov 11, 2015 at 9:33 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 10 November 2015 at 18:41, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 9 November 2015 at 17:50, Marc-André Lureau <mlureau@redhat.com> wrote:
>>> I can imagine a test starting a server thread and 2 qemu instances
>>> would take more than 5s on such configuration then.
>>>
>>> Could you try timing the test a few times to confirm this?
>>
>> petmay01@moonshot-dsg-11:~/qemu/build/all-a64$ time
>> QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386
>> QTEST_QEMU_IMG=qemu-img MALLOC_PERTURB_=${MALLOC_PERTURB_:-$((RANDOM %
>> 255 + 1))} gtester -k --verbose -m=quick tests/ivshmem-test
>> TEST: tests/ivshmem-test... (pid=10893)
>>   /i386/ivshmem/single:                                                OK
>>   /i386/ivshmem/pair:                                                  OK
>>   /i386/ivshmem/server:                                                OK
>>   /i386/ivshmem/hotplug:                                               OK
>>   /i386/ivshmem/memdev:                                                OK
>> PASS: tests/ivshmem-test
>>
>> real    0m11.945s
>> user    0m11.020s
>> sys     0m0.310s
>>
>> (almost all of the runtime seems to be in the "pair" subtest).
>
> This is now failing on practically every pull request I test.
> Please post a patch to fix this test or disable it...

This is the simplest patch I suggest for now.

Comments

Peter Maydell Nov. 12, 2015, 10:12 a.m. UTC | #1
On 11 November 2015 at 20:59, Marc-André Lureau
<marcandre.lureau@gmail.com> wrote:
> Hi Peter
>
> On Wed, Nov 11, 2015 at 9:33 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 10 November 2015 at 18:41, Peter Maydell <peter.maydell@linaro.org> wrote:
>>> On 9 November 2015 at 17:50, Marc-André Lureau <mlureau@redhat.com> wrote:
>>>> I can imagine a test starting a server thread and 2 qemu instances
>>>> would take more than 5s on such configuration then.
>>>>
>>>> Could you try timing the test a few times to confirm this?
>>>
>>> petmay01@moonshot-dsg-11:~/qemu/build/all-a64$ time
>>> QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386
>>> QTEST_QEMU_IMG=qemu-img MALLOC_PERTURB_=${MALLOC_PERTURB_:-$((RANDOM %
>>> 255 + 1))} gtester -k --verbose -m=quick tests/ivshmem-test
>>> TEST: tests/ivshmem-test... (pid=10893)
>>>   /i386/ivshmem/single:                                                OK
>>>   /i386/ivshmem/pair:                                                  OK
>>>   /i386/ivshmem/server:                                                OK
>>>   /i386/ivshmem/hotplug:                                               OK
>>>   /i386/ivshmem/memdev:                                                OK
>>> PASS: tests/ivshmem-test
>>>
>>> real    0m11.945s
>>> user    0m11.020s
>>> sys     0m0.310s
>>>
>>> (almost all of the runtime seems to be in the "pair" subtest).
>>
>> This is now failing on practically every pull request I test.
>> Please post a patch to fix this test or disable it...
>
> This is the simplest patch I suggest for now.

That will still mean that trying the slow tests gives random
failures, so this still needs attention (ie raising the timeouts
to something that won't actually be hit), but I guess it will
solve my immediate problem. Can you send it to the list as
a proper patch, please?

thanks
-- PMM
diff mbox

Patch

From 44f229675d4c9ea896fa83e8cbe5add4c5846541 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
Date: Wed, 11 Nov 2015 21:47:05 +0100
Subject: [PATCH] tests: classify some ivshmem tests as slow
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Some tests may take long to run, move them under g_test_slow()
condition.

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