qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 4ac267: tests: Force Python I/O encoding for


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 4ac267: tests: Force Python I/O encoding for check-qapi-sc...
Date: Thu, 09 May 2019 15:30:24 +0000 (UTC)

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4ac2670bf955dbb3c785eb7e6c29ef684e670d7f
      
https://github.com/qemu/qemu/commit/4ac2670bf955dbb3c785eb7e6c29ef684e670d7f
  Author: Eduardo Habkost <address@hidden>
  Date:   2019-05-08 (Wed, 08 May 2019)

  Changed paths:
    M tests/Makefile.include

  Log Message:
  -----------
  tests: Force Python I/O encoding for check-qapi-schema

test-qapi.py doesn't force a specific encoding for stderr or
stdout, but the reference files used by check-qapi-schema are in
UTF-8.  This breaks check-qapi-schema under certain circumstances
(e.g. if using the C locale and Python < 3.7).

We need to make sure test-qapi.py always generate UTF-8 output
somehow.  On Python 3.7+ we can do it using
`sys.stdout.reconfigure(...)`, but we need a solution that works
with older Python versions.

Instead of trying a hack like reopening sys.stdout and
sys.stderr, we can just tell Python to use UTF-8 for I/O encoding
when running test-qapi.py.  Do it by setting PYTHONIOENCODING.

Reported-by: Thomas Huth <address@hidden>
Tested-by: Thomas Huth <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Tested-by: Alex Bennée <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 6bb58d200a9e68808e856df76a0e2fd3bf38e35d
      
https://github.com/qemu/qemu/commit/6bb58d200a9e68808e856df76a0e2fd3bf38e35d
  Author: Thomas Huth <address@hidden>
  Date:   2019-05-08 (Wed, 08 May 2019)

  Changed paths:
    M tests/tco-test.c

  Log Message:
  -----------
  tests/tco: Make test independent of global_qtest

Pass around the QTestState in the TestData, so we do not need the
global_qtest variable here anymore.

Message-Id: <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 2756f82af412c6a0a06030e8ff8df0861d639c7a
      
https://github.com/qemu/qemu/commit/2756f82af412c6a0a06030e8ff8df0861d639c7a
  Author: Thomas Huth <address@hidden>
  Date:   2019-05-08 (Wed, 08 May 2019)

  Changed paths:
    M tests/megasas-test.c

  Log Message:
  -----------
  tests/megasas: Make test independent of global_qtest

The test uses memwrite() and thus relies on global_qtest. Let's replace it
with qtest_memwrite(), so that we are independent from global_qtest here.

Message-Id: <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: da9cd2d06cd28fccf09d2e22361a19f9ce6ffc71
      
https://github.com/qemu/qemu/commit/da9cd2d06cd28fccf09d2e22361a19f9ce6ffc71
  Author: Thomas Huth <address@hidden>
  Date:   2019-05-08 (Wed, 08 May 2019)

  Changed paths:
    M tests/qmp-cmd-test.c

  Log Message:
  -----------
  tests/qmp-cmd-test: Use qtest_init() instead of qtest_start()

qtest_start() + qtest_end() should be avoided, since they use the
global_qtest variable that we want to get rid of in the long run
(since global_qtest can not be used in tests that have to track
multiple QEMU states, like migration tests). Use qtest_init() and
qtest_quit() instead.

Message-Id: <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 8c7eb0987b255ebb1f6b04fd460a1a7323f3bec3
      
https://github.com/qemu/qemu/commit/8c7eb0987b255ebb1f6b04fd460a1a7323f3bec3
  Author: Thomas Huth <address@hidden>
  Date:   2019-05-08 (Wed, 08 May 2019)

  Changed paths:
    M tests/test-hmp.c

  Log Message:
  -----------
  tests/test-hmp: Use qtest_init() instead of qtest_start()

qtest_start() + qtest_end() should be avoided, since they use the
global_qtest variable that we want to get rid of in the long run
Use qtest_init() and qtest_quit() instead.

Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 4a61c3abbb7f7f8c77c06d1576c2062f12ee9e5c
      
https://github.com/qemu/qemu/commit/4a61c3abbb7f7f8c77c06d1576c2062f12ee9e5c
  Author: Thomas Huth <address@hidden>
  Date:   2019-05-08 (Wed, 08 May 2019)

  Changed paths:
    M tests/ide-test.c

  Log Message:
  -----------
  tests/ide-test: Make test independent of global_qtest

Pass around the QTestState, so we do not need the problematic global_qtest
variable (which causes trouble for tests that have multiple test states)
here anymore.

Message-Id: <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 8a17fbf640109076cbfda9bb5860c67367ae0020
      
https://github.com/qemu/qemu/commit/8a17fbf640109076cbfda9bb5860c67367ae0020
  Author: Thomas Huth <address@hidden>
  Date:   2019-05-08 (Wed, 08 May 2019)

  Changed paths:
    M tests/tpm-tests.c

  Log Message:
  -----------
  tests/tpm-tests: Use g_test_skip() to mark skipped tests

Since we do not use gtester anymore (which had a bug here),
we can now use g_test_skip() to mark skipped tests.

Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Stefan Berger <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 1e47ac8216d9b45d11498c5b863a8cfc782b0054
      
https://github.com/qemu/qemu/commit/1e47ac8216d9b45d11498c5b863a8cfc782b0054
  Author: Thomas Huth <address@hidden>
  Date:   2019-05-08 (Wed, 08 May 2019)

  Changed paths:
    M tests/Makefile.include

  Log Message:
  -----------
  tests/Makefile: Remove unused test-obj-y variable

I recently noticed that test-obj-y contains a file called
tests/check-block-qtest.o which simply does not belong to any .c
file and thus wondered why this is not causing any trouble. It is
only used to add -Itests to the command line (which refers to the
build directory). However, it is not needed because "-iquote $(@D)"
already sets this up in rules.mak. Thus we can simply remove this
variable.

Reviewed-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: a771729cdf450881cbe66261aea740ccbd02b8ff
      
https://github.com/qemu/qemu/commit/a771729cdf450881cbe66261aea740ccbd02b8ff
  Author: Thomas Huth <address@hidden>
  Date:   2019-05-08 (Wed, 08 May 2019)

  Changed paths:
    M tests/drive_del-test.c

  Log Message:
  -----------
  tests/drive_del-test: Use qtest_init() instead of qtest_start()

qtest_start() + qtest_end() should be avoided, since they use the
global_qtest variable that we want to get rid of in the long run
Use qtest_init() and qtest_quit() instead.

Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 6ebb8d2a210f21c7d4f168564f812833320a8fc4
      
https://github.com/qemu/qemu/commit/6ebb8d2a210f21c7d4f168564f812833320a8fc4
  Author: Thomas Huth <address@hidden>
  Date:   2019-05-08 (Wed, 08 May 2019)

  Changed paths:
    M tests/e1000e-test.c
    M tests/ivshmem-test.c
    M tests/libqos/pci-pc.c
    M tests/libqos/pci.h
    M tests/virtio-blk-test.c
    M tests/virtio-net-test.c
    M tests/virtio-rng-test.c

  Log Message:
  -----------
  tests: qpci_unplug_acpi_device_test() should not rely on global_qtest

libqos functions should not use functions that require global_qtest to
be set, since such library functions could also be used by tests that
deal with multiple test states. Add a parameter to this function to
explicitly specify the test state.

Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 6086e300265391a02932b8acd8ba44a624cbc94f
      
https://github.com/qemu/qemu/commit/6086e300265391a02932b8acd8ba44a624cbc94f
  Author: Thomas Huth <address@hidden>
  Date:   2019-05-08 (Wed, 08 May 2019)

  Changed paths:
    M hw/i2c/smbus_ich9.c

  Log Message:
  -----------
  hw/i2c/smbus_ich9: Fix the confusing contributions-after-2012 statement

The license information in this file is rather confusing. The text
declares LGPL first, but then says that contributions after Jan 2012
are licensed under the GPL instead. How should the average user who
just downloaded the release tarball know which part is now GPL and
which is LGPL? Also, as far as I can see, the file has been added to
QEMU *after* January in 2012, so the whole file should be GPL by
default instead.

Furthermore, looking at the text of the LGPL (see COPYING.LIB in the
top directory), the license clearly states in section "3." that one
should rather replace the license information in such a case instead.
Thus let's clean up the confusing statements and use the proper GPL
text only.

Message-Id: <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 198a2d214f5fa7389f407dad893e414314aeaa40
      
https://github.com/qemu/qemu/commit/198a2d214f5fa7389f407dad893e414314aeaa40
  Author: Thomas Huth <address@hidden>
  Date:   2019-05-08 (Wed, 08 May 2019)

  Changed paths:
    M hw/openrisc/cputimer.c
    M hw/openrisc/openrisc_sim.c
    M hw/openrisc/pic_cpu.c
    M linux-user/openrisc/target_cpu.h
    M linux-user/openrisc/target_structs.h
    M target/openrisc/cpu.h
    M target/openrisc/exception.c
    M target/openrisc/exception_helper.c
    M target/openrisc/fpu_helper.c
    M target/openrisc/insns.decode
    M target/openrisc/interrupt.c
    M target/openrisc/machine.c
    M target/openrisc/mmu.c

  Log Message:
  -----------
  target/openrisc: Fix LGPL information in the file headers

It's either "GNU *Library* General Public License version 2" or "GNU
Lesser General Public License version *2.1*", but there was no "version
2.0" of the "Lesser" license. So assume that version 2.1 is meant here.

Acked-by: Stafford Horne <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 6faf2b6c4d70e5c3df523ee0f95c1bed95284ced
      
https://github.com/qemu/qemu/commit/6faf2b6c4d70e5c3df523ee0f95c1bed95284ced
  Author: Thomas Huth <address@hidden>
  Date:   2019-05-08 (Wed, 08 May 2019)

  Changed paths:
    M linux-user/sh4/target_cpu.h
    M linux-user/sh4/target_structs.h
    M target/sh4/cpu.h
    M target/sh4/gdbstub.c
    M target/sh4/helper.c
    M target/sh4/op_helper.c
    M target/sh4/translate.c

  Log Message:
  -----------
  target/sh4: Fix LGPL information in the file headers

It's either "GNU *Library* General Public License version 2" or "GNU
Lesser General Public License version *2.1*", but there was no "version
2.0" of the "Lesser" license. So assume that version 2.1 is meant here.

Message-Id: <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 2c8fcd8f9ef2394b9933a52c157df4ef67ca1eba
      
https://github.com/qemu/qemu/commit/2c8fcd8f9ef2394b9933a52c157df4ef67ca1eba
  Author: Thomas Huth <address@hidden>
  Date:   2019-05-09 (Thu, 09 May 2019)

  Changed paths:
    M include/exec/poison.h

  Log Message:
  -----------
  include/exec/poison: Mark TARGET_FMT_lu as poisoned, too

We already poison TARGET_FMT_lx and TARGET_FMT_ld, but apparently
forgot to poison TARGET_FMT_lu, too. Do it now.

Reviewed-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 9d86d9eac9555bb60110460311109dd0c32a21f0
      
https://github.com/qemu/qemu/commit/9d86d9eac9555bb60110460311109dd0c32a21f0
  Author: Peter Maydell <address@hidden>
  Date:   2019-05-09 (Thu, 09 May 2019)

  Changed paths:
    M hw/i2c/smbus_ich9.c
    M hw/openrisc/cputimer.c
    M hw/openrisc/openrisc_sim.c
    M hw/openrisc/pic_cpu.c
    M include/exec/poison.h
    M linux-user/openrisc/target_cpu.h
    M linux-user/openrisc/target_structs.h
    M linux-user/sh4/target_cpu.h
    M linux-user/sh4/target_structs.h
    M target/openrisc/cpu.h
    M target/openrisc/exception.c
    M target/openrisc/exception_helper.c
    M target/openrisc/fpu_helper.c
    M target/openrisc/insns.decode
    M target/openrisc/interrupt.c
    M target/openrisc/machine.c
    M target/openrisc/mmu.c
    M target/sh4/cpu.h
    M target/sh4/gdbstub.c
    M target/sh4/helper.c
    M target/sh4/op_helper.c
    M target/sh4/translate.c
    M tests/Makefile.include
    M tests/drive_del-test.c
    M tests/e1000e-test.c
    M tests/ide-test.c
    M tests/ivshmem-test.c
    M tests/libqos/pci-pc.c
    M tests/libqos/pci.h
    M tests/megasas-test.c
    M tests/qmp-cmd-test.c
    M tests/tco-test.c
    M tests/test-hmp.c
    M tests/tpm-tests.c
    M tests/virtio-blk-test.c
    M tests/virtio-net-test.c
    M tests/virtio-rng-test.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/huth-gitlab/tags/pull-request-2019-05-09' into staging

- Fix "make check" problem that occurred with LANG=C and Python 3.5 / 3.6
- Get rid of some more dependencies on the global_qtest variable in the qtests
- Some other small test clean-ups
- Some copyright statement clarifications
- Mark TARGET_FMT_lu as poisoned

# gpg: Signature made Thu 09 May 2019 08:45:47 BST
# gpg:                using RSA key 2ED9D774FE702DB5
# gpg: Good signature from "Thomas Huth <address@hidden>" [full]
# gpg:                 aka "Thomas Huth <address@hidden>" [full]
# gpg:                 aka "Thomas Huth <address@hidden>" [full]
# gpg:                 aka "Thomas Huth <address@hidden>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/huth-gitlab/tags/pull-request-2019-05-09:
  include/exec/poison: Mark TARGET_FMT_lu as poisoned, too
  target/sh4: Fix LGPL information in the file headers
  target/openrisc: Fix LGPL information in the file headers
  hw/i2c/smbus_ich9: Fix the confusing contributions-after-2012 statement
  tests: qpci_unplug_acpi_device_test() should not rely on global_qtest
  tests/drive_del-test: Use qtest_init() instead of qtest_start()
  tests/Makefile: Remove unused test-obj-y variable
  tests/tpm-tests: Use g_test_skip() to mark skipped tests
  tests/ide-test: Make test independent of global_qtest
  tests/test-hmp: Use qtest_init() instead of qtest_start()
  tests/qmp-cmd-test: Use qtest_init() instead of qtest_start()
  tests/megasas: Make test independent of global_qtest
  tests/tco: Make test independent of global_qtest
  tests: Force Python I/O encoding for check-qapi-schema

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/68a7b9724fe8...9d86d9eac955



reply via email to

[Prev in Thread] Current Thread [Next in Thread]