Skip to content
Snippets Groups Projects
  1. Jul 25, 2023
    • Peter Maydell's avatar
      tests/decode: Suppress "error: " string for expected-failure tests · 78cc9034
      Peter Maydell authored
      
      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: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20230720131521.1325905-1-peter.maydell@linaro.org
      78cc9034
  2. Jun 01, 2023
  3. May 30, 2023
  4. May 01, 2021
  5. Jan 13, 2021
    • Philippe Mathieu-Daudé's avatar
      decodetree: Open files with encoding='utf-8' · 4cacecaa
      Philippe Mathieu-Daudé authored
      
      When decodetree.py was added in commit 568ae7ef, QEMU was
      using Python 2 which happily reads UTF-8 files in text mode.
      Python 3 requires either UTF-8 locale or an explicit encoding
      passed to open(). Now that Python 3 is required, explicit
      UTF-8 encoding for decodetree source files.
      
      To avoid further problems with the user locale, also explicit
      UTF-8 encoding for the generated C files.
      
      Explicit both input/output are plain text by using the 't' mode.
      
      This fixes:
      
        $ /usr/bin/python3 scripts/decodetree.py test.decode
        Traceback (most recent call last):
          File "scripts/decodetree.py", line 1397, in <module>
            main()
          File "scripts/decodetree.py", line 1308, in main
            parse_file(f, toppat)
          File "scripts/decodetree.py", line 994, in parse_file
            for line in f:
          File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
            return codecs.ascii_decode(input, self.errors)[0]
        UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 80:
        ordinal not in range(128)
      
      Reported-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Suggested-by: default avatarYonggang Luo <luoyonggang@gmail.com>
      Reviewed-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20210110000240.761122-1-f4bug@amsat.org>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      4cacecaa
  6. Nov 15, 2020
  7. Oct 20, 2020
  8. Sep 17, 2020
  9. Sep 14, 2020
  10. Aug 21, 2020
  11. Jul 13, 2020
  12. Jun 09, 2020
  13. Jun 08, 2020
  14. May 31, 2020
  15. Mar 30, 2020
  16. Feb 07, 2020
  17. Aug 19, 2019
  18. Jun 13, 2019
  19. May 06, 2019
  20. Mar 12, 2019
Loading