On 20/7/23 15:15, Peter Maydell wrote:
The "expected failure" tests for decodetree result in the
error messages from decodetree ending up in logs and in
V=1 output:

MALLOC_PERTURB_=226 
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86/pyvenv/bin/python3 
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/scripts/decodetree.py --output-null 
--test-for-error 
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86/../../tests/decode/err_argset1.decode
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― 
✀  
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86/../../tests/decode/err_argset1.decode:5:
 error: duplicate argument "a"
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
  1/44 qemu:decodetree / err_argset1                OK              0.05s

This then produces false positives when scanning the
logfiles for strings like "error: ".

For the expected-failure tests, make decodetree print
"detected:" instead of "error:".

Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>
---
My initial thought was "just get meson to suppress stderr for these
tests", but AFAICT meson has no way to do that, and we already have a
command line option to decodetree to request specific behaviour for
the tests that expect failure, so this seemed simplest.

  scripts/decodetree.py | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>


Reply via email to