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_...@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