[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 6/6] migration-test: Only hide error if !QTEST_LOG
From: |
Thomas Huth |
Subject: |
Re: [PATCH v6 6/6] migration-test: Only hide error if !QTEST_LOG |
Date: |
Thu, 22 Oct 2020 07:34:44 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 21/10/2020 23.27, Peter Xu wrote:
> The errors are very useful when debugging qtest failures, especially when
> QTEST_LOG=1 is set. Let's allow override MigrateStart.hide_stderr when
> QTEST_LOG=1 is specified, because that means the user wants to be verbose.
>
> Not very nice to introduce the first QTEST_LOG env access in migration-test.c,
> however it should be handy. Without this patch, I was hacking error_report()
> when debugging such errors. Let's make things easier.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> tests/qtest/migration-test.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
> index f410ec5996..f2142fbd3c 100644
> --- a/tests/qtest/migration-test.c
> +++ b/tests/qtest/migration-test.c
> @@ -464,6 +464,10 @@ static void migrate_postcopy_start(QTestState *from,
> QTestState *to)
> }
>
> typedef struct {
> + /*
> + * QTEST_LOG=1 may override this. When QTEST_LOG=1, we always dump
> errors
> + * unconditionally, because it means the user would like to be verbose.
> + */
> bool hide_stderr;
> bool use_shmem;
> /* only launch the target process */
> @@ -557,7 +561,7 @@ static int test_migrate_start(QTestState **from,
> QTestState **to,
>
> g_free(bootpath);
>
> - if (args->hide_stderr) {
> + if (!getenv("QTEST_LOG") && args->hide_stderr) {
> ignore_stderr = "2>/dev/null";
> } else {
> ignore_stderr = "";
Reviewed-by: Thomas Huth <thuth@redhat.com>
- [PATCH v6 0/6] migration/postcopy: Sync faulted addresses after network recovered, Peter Xu, 2020/10/21
- [PATCH v6 2/6] migration: Introduce migrate_send_rp_message_req_pages(), Peter Xu, 2020/10/21
- [PATCH v6 1/6] migration: Pass incoming state into qemu_ufd_copy_ioctl(), Peter Xu, 2020/10/21
- [PATCH v6 5/6] migration/postcopy: Release fd before going into 'postcopy-pause', Peter Xu, 2020/10/21
- [PATCH v6 6/6] migration-test: Only hide error if !QTEST_LOG, Peter Xu, 2020/10/21
- Re: [PATCH v6 6/6] migration-test: Only hide error if !QTEST_LOG,
Thomas Huth <=
- [PATCH v6 3/6] migration: Maintain postcopy faulted addresses, Peter Xu, 2020/10/21
- [PATCH v6 4/6] migration: Sync requested pages after postcopy recovery, Peter Xu, 2020/10/21
- Re: [PATCH v6 0/6] migration/postcopy: Sync faulted addresses after network recovered, Dr. David Alan Gilbert, 2020/10/26