[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 43/54] tests/qtest: migration-test: Make sure QEMU process
From: |
Bin Meng |
Subject: |
Re: [PATCH v4 43/54] tests/qtest: migration-test: Make sure QEMU process "to" exited after migration is canceled |
Date: |
Tue, 27 Sep 2022 21:21:33 +0800 |
On Tue, Sep 27, 2022 at 9:15 PM Marc-André Lureau
<marcandre.lureau@gmail.com> wrote:
>
> Hi
>
> On Tue, Sep 27, 2022 at 5:02 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>>
>> From: Xuzhou Cheng <xuzhou.cheng@windriver.com>
>>
>> Make sure QEMU process "to" exited before launching another target
>> for migration in the test_multifd_tcp_cancel case.
>>
>> Signed-off-by: Xuzhou Cheng <xuzhou.cheng@windriver.com>
>> Signed-off-by: Bin Meng <bin.meng@windriver.com>
>> ---
>>
>> (no changes since v3)
>>
>> Changes in v3:
>> - Add a usleep(1) in the busy wait loop
>>
>> Changes in v2:
>> - Change to a busy wait after migration is canceled
>>
>> tests/qtest/migration-test.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
>> index 45c5f5761b..6f9fe13488 100644
>> --- a/tests/qtest/migration-test.c
>> +++ b/tests/qtest/migration-test.c
>> @@ -2132,6 +2132,10 @@ static void test_multifd_tcp_cancel(void)
>> wait_for_migration_pass(from);
>>
>> migrate_cancel(from);
>> + /* Make sure QEMU process "to" exited */
>> + while (qtest_probe_child(to)) {
>> + usleep(1);
>
>
> Why not add a qtest_wait_qemu() ? (I think qtest_probe_child() should also be
> renamed)
>
Do you mean adding:
void qtest_wait_qemu(QTestState *s)
{
while (qtest_probe_child(s)) {
usleep(1);
}
}
Do you have a better name for qtest_probe_child()?
Regards,
Bin
- [PATCH v4 35/54] tests/qtest: libqtest: Install signal handler via signal(), (continued)
- [PATCH v4 35/54] tests/qtest: libqtest: Install signal handler via signal(), Bin Meng, 2022/09/27
- [PATCH v4 36/54] tests/qtest: Support libqtest to build and run on Windows, Bin Meng, 2022/09/27
- [PATCH v4 38/54] tests/qtest: bios-tables-test: Adapt the case for win32, Bin Meng, 2022/09/27
- [PATCH v4 39/54] tests/qtest: boot-serial-test: Close the serial file before starting QEMU, Bin Meng, 2022/09/27
- [PATCH v4 32/54] tests/qtest: libqtest: Adapt global_qtest declaration for win32, Bin Meng, 2022/09/27
- [PATCH v4 34/54] tests/qtest: libqtest: Exclude the *_fds APIs for win32, Bin Meng, 2022/09/27
- [PATCH v4 37/54] tests/qtest: {ahci, ide}-test: Use relative path for temporary files for win32, Bin Meng, 2022/09/27
- [PATCH v4 43/54] tests/qtest: migration-test: Make sure QEMU process "to" exited after migration is canceled, Bin Meng, 2022/09/27
- [PATCH v4 46/54] tests/qtest: libqtest: Correct the timeout unit of blocking receive calls for win32, Bin Meng, 2022/09/27
- [PATCH v4 40/54] tests/qtest: ide-test: Open file in binary mode, Bin Meng, 2022/09/27
- [PATCH v4 41/54] tests/qtest: microbit-test: Fix socket access for win32, Bin Meng, 2022/09/27
- [PATCH v4 42/54] tests/qtest: migration-test: Disable IO redirection for win32, Bin Meng, 2022/09/27
- [PATCH v4 45/54] tests/qtest: libqtest: Replace the call to close a socket with closesocket(), Bin Meng, 2022/09/27
- [PATCH v4 44/54] tests/qtest: virtio-net-failover: Disable migration tests for win32, Bin Meng, 2022/09/27
- [PATCH v4 47/54] io/channel-watch: Drop a superfluous '#ifdef WIN32', Bin Meng, 2022/09/27
- [PATCH v4 48/54] io/channel-watch: Drop the unnecessary cast, Bin Meng, 2022/09/27
- [PATCH v4 49/54] io/channel-watch: Fix socket watch on Windows, Bin Meng, 2022/09/27