[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 04/12] libqos/qgraph: add qos_dump_graph()
From: |
Thomas Huth |
Subject: |
Re: [PATCH v4 04/12] libqos/qgraph: add qos_dump_graph() |
Date: |
Sat, 24 Oct 2020 08:04:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 08/10/2020 20.34, Christian Schoenebeck wrote:
> This new function is purely for debugging purposes. It prints the
> current qos graph to stdout and allows to identify problems in the
> created qos graph e.g. when writing new qos tests.
>
> Coloured output is used to mark available nodes in green colour,
> whereas unavailable nodes are marked in red colour.
>
> Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
> ---
> tests/qtest/libqos/qgraph.c | 56 +++++++++++++++++++++++++++++++++++++
> tests/qtest/libqos/qgraph.h | 20 +++++++++++++
> 2 files changed, 76 insertions(+)
>
> diff --git a/tests/qtest/libqos/qgraph.c b/tests/qtest/libqos/qgraph.c
> index 61faf6b27d..af93e38dcb 100644
> --- a/tests/qtest/libqos/qgraph.c
> +++ b/tests/qtest/libqos/qgraph.c
> @@ -805,3 +805,59 @@ void qos_delete_cmd_line(const char *name)
> node->command_line = NULL;
> }
> }
> +
> +#define RED(txt) ( \
> + "\033[0;91m" txt \
> + "\033[0m" \
> +)
> +
> +#define GREEN(txt) ( \
> + "\033[0;92m" txt \
> + "\033[0m" \
> +)
I don't think this is very portable - and it will only make logs ugly to
read in text editors. Could you please simply drop these macros?
Thomas
[PATCH v4 05/12] tests/qtest/qos-test: dump qos graph if verbose, Christian Schoenebeck, 2020/10/08
[PATCH v4 06/12] tests/qtest/qos-test: dump environment variables if verbose, Christian Schoenebeck, 2020/10/08