[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/12] fuzz: Change the way we write qtest log to stderr
From: |
Darren Kenny |
Subject: |
Re: [PATCH 01/12] fuzz: Change the way we write qtest log to stderr |
Date: |
Thu, 23 Jul 2020 14:15:17 +0100 |
On Wednesday, 2020-07-22 at 23:39:22 -04, Alexander Bulekov wrote:
> Telling QTest to log to /dev/fd/2, essentially results in dup(2). This
> is fine, if other code isn't logging to stderr. Otherwise, the order of
> the logs is mixed due to buffering issues, since two file-descriptors
> are used to write to the same file. We can avoid this, since just
> specifying "-qtest" sets the log fd to stderr. If we want to disable
> qtest logs, we can just add -qtest-log none.
>
> Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
> ---
> tests/qtest/fuzz/fuzz.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/tests/qtest/fuzz/fuzz.c b/tests/qtest/fuzz/fuzz.c
> index 031594a686..8234b68754 100644
> --- a/tests/qtest/fuzz/fuzz.c
> +++ b/tests/qtest/fuzz/fuzz.c
> @@ -202,9 +202,8 @@ int LLVMFuzzerInitialize(int *argc, char ***argv, char
> ***envp)
>
> /* Run QEMU's softmmu main with the fuzz-target dependent arguments */
> GString *cmd_line = fuzz_target->get_init_cmdline(fuzz_target);
> - g_string_append_printf(cmd_line,
> - " -qtest /dev/null -qtest-log %s",
> - getenv("QTEST_LOG") ? "/dev/fd/2" : "/dev/null");
> + g_string_append_printf(cmd_line, " %s -qtest /dev/null ",
> + getenv("QTEST_LOG") ? "" : "-qtest-log none");
>
> /* Split the runcmd into an argv and argc */
> wordexp_t result;
> --
> 2.27.0
- [PATCH 00/12] Add a General Virtual Device Fuzzer, Alexander Bulekov, 2020/07/22
- [PATCH 01/12] fuzz: Change the way we write qtest log to stderr, Alexander Bulekov, 2020/07/22
- Re: [PATCH 01/12] fuzz: Change the way we write qtest log to stderr,
Darren Kenny <=
- [PATCH 02/12] fuzz: Add general virtual-device fuzzer, Alexander Bulekov, 2020/07/22
- [PATCH 03/12] fuzz: Add PCI features to the general fuzzer, Alexander Bulekov, 2020/07/22
- [PATCH 04/12] fuzz: Add DMA support to the generic-fuzzer, Alexander Bulekov, 2020/07/22
- [PATCH 05/12] fuzz: Declare DMA Read callback function, Alexander Bulekov, 2020/07/22
- [PATCH 06/12] fuzz: Add fuzzer callbacks to DMA-read functions, Alexander Bulekov, 2020/07/22
- [PATCH 07/12] scripts/oss-fuzz: Add wrapper program for generic fuzzer, Alexander Bulekov, 2020/07/22
- [PATCH 08/12] scripts/oss-fuzz: Add general-fuzzer build script, Alexander Bulekov, 2020/07/22
- [PATCH 09/12] scripts/oss-fuzz: Add general-fuzzer configs for oss-fuzz, Alexander Bulekov, 2020/07/22
- [PATCH 10/12] scripts/oss-fuzz: build the general-fuzzer configs, Alexander Bulekov, 2020/07/22