qemu-e2k/tests
Peter Maydell 673205379f Python patches for 5.1
- Reduce race conditions on QEMUMachine::shutdown()
 
  1. Remove the "bare except" pattern in the existing shutdown code,
     which can mask problems and make debugging difficult.
  2. Ensure that post-shutdown cleanup is always performed, even when
     graceful termination fails.
  3. Unify cleanup paths such that no matter how the VM is terminated,
     the same functions and steps are always taken to reset the object
     state.
  4. Rewrite shutdown() such that any error encountered when attempting
     a graceful shutdown will be raised as an AbnormalShutdown exception.
     The pythonic idiom is to allow the caller to decide if this is a
     problem or not.
 
 - Modify part of the python/qemu library to comply with:
 
   . mypy --strict
   . pylint
   . flake8
 
 - Script for the TCG Continuous Benchmarking project that uses
   callgrind to dissect QEMU execution into three main phases:
 
   . code generation
   . JIT execution
   . helpers execution
 
 CI jobs results:
 . https://cirrus-ci.com/build/5421349961203712
 . https://gitlab.com/philmd/qemu/-/pipelines/166556001
 . https://travis-ci.org/github/philmd/qemu/builds/708102347
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAl8OGCUACgkQ4+MsLN6t
 wN52ZQ//cB8pRhOeirMzPTamtAePAHhU9kRKSQ4fFzVM/AHxaO3qO3KrMKAv4JnR
 1fwdyAbum0Dv+HrRAXbIVz/lgrlTb6tLqwk20YWlmNUR2CtMmno9fPQzg6LeFWBe
 +qr2/anXWBqRZu5uHzQ3Ly3LxlVXE3qmStxlttNxed9wK9wdhsQ4ijOrExXPmMI5
 IQi9tKijsGvOczcSpIwJET6Px0L/GIYHSFGXfHv4LiJCMQUX4gqY1akr+/2adqlr
 ElcOHlvWG90GHftTC+hq+KbSNmpkwJEnXLHC+HwMaYmQuhH4+U6f9AcrnzYGHjoQ
 84muuYt5CBvT/Q38qO3dUsr42oD8uiDZe2cpD5DmcAHj6U9sza4UwU2Nkd4cNvRD
 OiYRWuHQDzQhwPGbzBym1GRxRlejmPXCpvZ4XqaYODkzhEHi8UVq5AOsNhpTGWVk
 WoDZ3NtnZb9WbU93wDordhWTtHKHOLHNk4CuJLbdRvkW+sg8aFqUObSRvc6RqyU8
 1DXWMMQr9UfCDfMMbp/OCymphn0VrAaixIRIjmYc6nL5mQlyugMwij55jzyugqBH
 rN5bdcsqxAhBTD03lu0lbDn1BYIqbZFXABXeDnJNbxmY/6gD0E1HKWRvIKjxzH+t
 L19QXsOWLoVUpUIjxlOgMlb9QJLPc9m/N3yVOanO0zVrMSBmOKQ=
 =Jp6n
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/philmd-gitlab/tags/python-next-20200714' into staging

Python patches for 5.1

- Reduce race conditions on QEMUMachine::shutdown()

 1. Remove the "bare except" pattern in the existing shutdown code,
    which can mask problems and make debugging difficult.
 2. Ensure that post-shutdown cleanup is always performed, even when
    graceful termination fails.
 3. Unify cleanup paths such that no matter how the VM is terminated,
    the same functions and steps are always taken to reset the object
    state.
 4. Rewrite shutdown() such that any error encountered when attempting
    a graceful shutdown will be raised as an AbnormalShutdown exception.
    The pythonic idiom is to allow the caller to decide if this is a
    problem or not.

- Modify part of the python/qemu library to comply with:

  . mypy --strict
  . pylint
  . flake8

- Script for the TCG Continuous Benchmarking project that uses
  callgrind to dissect QEMU execution into three main phases:

  . code generation
  . JIT execution
  . helpers execution

CI jobs results:
. https://cirrus-ci.com/build/5421349961203712
. https://gitlab.com/philmd/qemu/-/pipelines/166556001
. https://travis-ci.org/github/philmd/qemu/builds/708102347

# gpg: Signature made Tue 14 Jul 2020 21:40:05 BST
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* remotes/philmd-gitlab/tags/python-next-20200714:
  python/qmp.py: add QMPProtocolError
  python/qmp.py: add casts to JSON deserialization
  python/qmp.py: Do not return None from cmd_obj
  python/qmp.py: re-absorb MonitorResponseError
  iotests.py: use qemu.qmp type aliases
  python/qmp.py: Define common types
  python/machine.py: change default wait timeout to 3 seconds
  python/machine.py: re-add sigkill warning suppression
  python/machine.py: split shutdown into hard and soft flavors
  tests/acceptance: Don't test reboot on cubieboard
  tests/acceptance: wait() instead of shutdown() where appropriate
  python/machine.py: Make wait() call shutdown()
  python/machine.py: Add a configurable timeout to shutdown()
  python/machine.py: Prohibit multiple shutdown() calls
  python/machine.py: Perform early cleanup for wait() calls, too
  python/machine.py: Add _early_cleanup hook
  python/machine.py: Close QMP socket in cleanup
  python/machine.py: consolidate _post_shutdown()
  scripts/performance: Add dissect.py script

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-07-15 13:04:27 +01:00
..
acceptance Python patches for 5.1 2020-07-15 13:04:27 +01:00
data virtio,acpi: features, fixes, cleanups. 2020-07-07 17:37:44 +01:00
decode decodetree: Drop check for less than 2 patterns in a group 2020-06-09 09:19:48 -07:00
docker tests/docker: update toolchain set in debian-xtensa-cross 2020-07-11 15:53:09 +01:00
fp softfloat: Change tininess_before_rounding to bool 2020-05-19 08:41:16 -07:00
guest-debug tests/guest-debug: catch hanging guests 2020-05-15 15:25:07 +01:00
image-fuzzer image-fuzzer: Use OSerror.strerror instead of tuple subscript 2019-11-05 16:36:11 +01:00
keys
migration tests/migration: fix unreachable path in stress test 2020-06-17 17:48:39 +01:00
multiboot tests/multiboot: Fix load address of test kernels 2019-07-30 12:25:43 +02:00
perf/block/qcow2 tests/perf: Test lseek influence on qcow2 block-status 2019-06-04 15:20:41 +02:00
plugin configure: Add -Wno-psabi 2020-06-18 10:26:02 +01:00
qapi-schema qapi: New special feature flag "deprecated" 2020-03-17 21:42:47 +01:00
qemu-iotests Python patches for 5.1 2020-07-15 13:04:27 +01:00
qtest tests/qtest/fuzz: Add missing spaces in description 2020-07-13 11:40:52 +02:00
rocker
tcg Testing and misc build updates: 2020-07-12 15:32:05 +01:00
tsan tests/docker: Added docker build support for TSan. 2020-06-16 14:49:05 +01:00
uefi-test-tools edk2 build scripts: work around TianoCore#1607 without forcing Python 2 2019-10-07 15:14:15 +02:00
vm tests/vm: allow us to take advantage of MTTCG 2020-07-11 15:53:00 +01:00
vmstate-static-checker-data
.gitignore tests/tcg/aarch64: add a gdbstub testcase for SVE registers 2020-03-17 17:38:47 +00:00
Makefile.include Testing and misc build updates: 2020-07-12 15:32:05 +01:00
atomic64-bench.c tests: use g_usleep instead of rem = sleep(time) 2019-01-14 14:52:30 +00:00
atomic_add-bench.c tests: use g_usleep instead of rem = sleep(time) 2019-01-14 14:52:30 +00:00
benchmark-crypto-cipher.c tests: benchmark crypto with fixed data size, not time period 2019-10-28 13:32:21 +01:00
benchmark-crypto-hash.c crypto: extend hash benchmark to cover more algorithms 2020-05-07 12:52:51 +01:00
benchmark-crypto-hmac.c tests/crypto: Use the IEC binary prefix definitions 2018-07-02 15:41:17 +02:00
check-block-qdict.c tests: Use error_free_or_abort() where appropriate 2020-07-02 06:25:28 +02:00
check-block.sh check-block: enable iotests with SafeStack 2020-06-23 15:46:05 +01:00
check-qdict.c tests: Move qdict-test-data.txt to tests/data/qobject/ 2019-03-07 22:05:54 +01:00
check-qjson.c test: Use g_strndup instead of plain strndup 2019-08-21 10:27:13 +02:00
check-qlist.c qobject: Eliminate qlist_iter(), use QLIST_FOREACH_ENTRY() instead 2020-04-30 06:51:15 +02:00
check-qlit.c
check-qnull.c
check-qnum.c
check-qobject.c tests: Use &error_abort where appropriate 2020-07-02 06:25:28 +02:00
check-qom-interface.c qom: make interface types abstract 2018-12-11 15:45:22 -02:00
check-qom-proplist.c tests: Use error_free_or_abort() where appropriate 2020-07-02 06:25:28 +02:00
check-qstring.c qstring: Move qstring_from_substr()'s @end one to the right 2018-07-28 09:09:58 +02:00
crypto-tls-psk-helpers.c crypto: Implement TLS Pre-Shared Keys (PSK). 2018-07-03 13:04:38 +01:00
crypto-tls-psk-helpers.h Supply missing header guards 2019-06-12 13:20:21 +02:00
crypto-tls-x509-helpers.c tests: call qcrypto_init instead of gnutls_global_init 2018-07-24 17:33:39 +01:00
crypto-tls-x509-helpers.h Supply missing header guards 2019-06-12 13:20:21 +02:00
dbus-vmstate-daemon.sh tests: add dbus-vmstate-test 2020-01-06 18:41:32 +04:00
io-channel-helpers.c
io-channel-helpers.h Normalize position of header guard 2019-06-12 13:20:20 +02:00
iothread.c tests/iothread: Always connect iothread GSource to a GMainContext 2020-01-07 14:32:57 +00:00
iothread.h
pkix_asn1_tab.c
ptimer-test-stubs.c util/qemu-timer: refactor deadline calculation for external timers 2019-08-20 17:26:21 +02:00
ptimer-test.c tests/ptimer: Remove unnecessary inclusion of libqtest.h 2020-01-12 11:42:40 +01:00
ptimer-test.h
qht-bench.c tests/qht-bench: Adjust threshold computation 2020-07-11 15:53:00 +01:00
rcutorture.c tests/rcutorture: mild documenting refactor of update thread 2020-02-25 17:42:59 +00:00
requirements.txt Acceptance test: add "boot_linux" tests 2020-03-17 18:55:52 -04:00
socket-helpers.c tests: specify the address family when checking bind 2019-08-22 17:30:25 +04:00
socket-helpers.h tests: specify the address family when checking bind 2019-08-22 17:30:25 +04:00
test-aio-multithread.c tests: Do not use "\n" in g_test_message() strings 2019-03-07 22:16:22 +01:00
test-aio.c util/async: make bh_aio_poll() O(1) 2020-02-22 08:26:47 +00:00
test-authz-list.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
test-authz-listfile.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
test-authz-pam.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
test-authz-simple.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
test-base64.c tests: Use error_free_or_abort() where appropriate 2020-07-02 06:25:28 +02:00
test-bdrv-drain.c block: Drop @child_class from bdrv_child_perm() 2020-05-18 19:05:25 +02:00
test-bdrv-graph-mod.c tests: Use error_free_or_abort() where appropriate 2020-07-02 06:25:28 +02:00
test-bitcnt.c
test-bitmap.c tests: use g_test_rand_int 2019-12-17 09:05:23 +01:00
test-bitops.c
test-block-backend.c Include qemu/main-loop.h less 2019-08-16 13:31:52 +02:00
test-block-iothread.c tests: Use error_free_or_abort() where appropriate 2020-07-02 06:25:28 +02:00
test-blockjob-txn.c job: drop job_drain 2019-09-10 08:58:43 +02:00
test-blockjob.c job: take each job's lock individually in job_txn_apply 2020-04-07 14:34:47 +02:00
test-bufferiszero.c
test-char.c tests/test-char: Remove unused "chardev/char-mux.h" include 2020-07-13 11:59:47 +04:00
test-clone-visitor.c tests: Rename UserDefNativeListUnion to UserDefListUnion 2019-03-05 14:43:11 +01:00
test-coroutine.c tests: Do not use "\n" in g_test_message() strings 2019-03-07 22:16:22 +01:00
test-crypto-afsplit.c
test-crypto-block.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
test-crypto-cipher.c tests: Use error_free_or_abort() where appropriate 2020-07-02 06:25:28 +02:00
test-crypto-hash.c
test-crypto-hmac.c
test-crypto-ivgen.c
test-crypto-pbkdf.c test: execute g_test_run when tests are skipped 2019-01-11 13:57:25 +01:00
test-crypto-secret.c test-crypto-secret: add 'secret_keyring' object tests. 2020-06-15 11:33:51 +01:00
test-crypto-tlscredsx509.c glib: use portable g_setenv() 2019-12-17 09:05:23 +01:00
test-crypto-tlssession.c glib: use portable g_setenv() 2019-12-17 09:05:23 +01:00
test-crypto-xts.c crypto: add testing for unaligned buffers with XTS cipher mode 2018-10-24 19:03:37 +01:00
test-cutils.c cutils: Fix qemu_strtosz() & friends to reject non-finite sizes 2018-12-13 19:10:06 +01:00
test-hbitmap.c block/dirty-bitmap: improve _next_dirty_area API 2020-03-18 14:03:46 -04:00
test-image-locking.c Include qemu/main-loop.h less 2019-08-16 13:31:52 +02:00
test-int128.c
test-io-channel-buffer.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
test-io-channel-command.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
test-io-channel-file.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
test-io-channel-socket.c socket: Add num connections to qio_channel_socket_async() 2019-09-03 23:24:42 +02:00
test-io-channel-tls.c glib: use portable g_setenv() 2019-12-17 09:05:23 +01:00
test-io-task.c tests: Use error_free_or_abort() where appropriate 2020-07-02 06:25:28 +02:00
test-iov.c
test-keyval.c test-keyval: Tighten test of trailing crap after size 2019-12-18 12:28:44 +01:00
test-logging.c tests: Use &error_abort where appropriate 2020-07-02 06:25:28 +02:00
test-mul64.c
test-opts-visitor.c
test-qapi-util.c
test-qdev-global-props.c qdev: Convert bus-less devices to qdev_realize() with Coccinelle 2020-06-15 22:06:04 +02:00
test-qdist.c
test-qemu-opts.c tests: Use &error_abort where appropriate 2020-07-02 06:25:28 +02:00
test-qga.c tests: use g_test_rand_int 2019-12-17 09:05:23 +01:00
test-qgraph.c tests: test-qgraph: fix a memory leak 2019-03-11 16:33:49 +01:00
test-qht-par.c
test-qht.c qht: drop ht argument from qht iterators 2018-09-26 08:55:54 -07:00
test-qmp-cmds.c qapi: Add feature flags to remaining definitions 2020-03-17 19:58:34 +01:00
test-qmp-event.c tests/test-qmp-event: Check event is actually emitted 2020-03-17 19:58:34 +01:00
test-qobject-input-visitor.c tests: Rename UserDefNativeListUnion to UserDefListUnion 2019-03-05 14:43:11 +01:00
test-qobject-output-visitor.c qapi: Assert output visitors see only valid enum values 2020-04-30 07:26:09 +02:00
test-rcu-list.c tests: Fix a bug with count variables 2020-03-06 10:35:15 +00:00
test-rcu-simpleq.c tests: add test-list-simpleq 2018-08-23 18:46:25 +02:00
test-rcu-slist.c rcu_queue: add QSLIST functions 2020-02-22 08:26:47 +00:00
test-rcu-tailq.c tests: add test-rcu-tailq 2018-08-23 18:46:25 +02:00
test-replication.c tests: Use &error_abort where appropriate 2020-07-02 06:25:28 +02:00
test-shift128.c
test-string-input-visitor.c tests: Use &error_abort where appropriate 2020-07-02 06:25:28 +02:00
test-string-output-visitor.c tests: Use &error_abort where appropriate 2020-07-02 06:25:28 +02:00
test-thread-pool.c test-thread-pool: be more reliable 2019-06-03 14:03:00 +02:00
test-throttle.c test-throttle: Fix uninitialized use of burst_length 2019-08-20 17:26:19 +02:00
test-timed-average.c
test-util-filemonitor.c test-util-filemonitor: Plug unlikely memory leak 2020-07-02 06:25:29 +02:00
test-util-sockets.c tests/util-sockets: add abstract unix socket cases 2020-05-20 10:34:45 +01:00
test-uuid.c
test-visitor-serialization.c
test-vmstate.c test-vmstate: Fix memleaks in test_load_qlist 2020-02-28 09:25:49 +01:00
test-write-threshold.c
test-x86-cpuid.c hw/i386: Update structures to save the number of nodes per package 2020-03-17 19:48:10 -04:00
test-xbzrle.c
vhost-user-bridge.c core: replace getpagesize() with qemu_real_host_page_size 2019-10-26 15:38:06 +02:00