qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 28760e: tests/qtest: add various qtest_qmp_as


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 28760e: tests/qtest: add various qtest_qmp_assert_success(...
Date: Fri, 02 Jun 2023 19:36:44 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 28760edcd9589c1d8a39b25993ec46128865ca30
      
https://github.com/qemu/qemu/commit/28760edcd9589c1d8a39b25993ec46128865ca30
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-06-02 (Fri, 02 Jun 2023)

  Changed paths:
    M tests/qtest/libqtest.c
    M tests/qtest/libqtest.h

  Log Message:
  -----------
  tests/qtest: add various qtest_qmp_assert_success() variants

Add several counterparts of qtest_qmp_assert_success() that can

 * Use va_list instead of ...
 * Accept a list of FDs to send
 * Return the response data

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230601161347.1803440-2-berrange@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 0150e75d012b34182fa1951d346377f8196464e4
      
https://github.com/qemu/qemu/commit/0150e75d012b34182fa1951d346377f8196464e4
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-06-02 (Fri, 02 Jun 2023)

  Changed paths:
    M tests/qtest/libqtest.c
    M tests/qtest/libqtest.h

  Log Message:
  -----------
  tests/qtest: add support for callback to receive QMP events

Currently code must call one of the qtest_qmp_event* functions to
fetch events. These are only usable if the immediate caller knows
the particular event they want to capture, and are only interested
in one specific event type. Adding ability to register an event
callback lets the caller capture a range of events over any period
of time.

Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230601161347.1803440-3-berrange@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: ffd47275895633f2f21aa5f86ab184776b5ea9d1
      
https://github.com/qemu/qemu/commit/ffd47275895633f2f21aa5f86ab184776b5ea9d1
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-06-02 (Fri, 02 Jun 2023)

  Changed paths:
    M tests/qtest/migration-helpers.c
    M tests/qtest/migration-helpers.h
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests/qtest: get rid of 'qmp_command' helper in migration test

This function duplicates logic of qtest_qmp_assert_success_ref.
The qtest_qmp_assert_success_ref method has better diagnostics
on failure because it prints the entire QMP response, instead
of just asserting on existance of the 'error' key.

Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230601161347.1803440-4-berrange@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 11936f0ef6b29b1e7ba05ad888dd585210d74fd6
      
https://github.com/qemu/qemu/commit/11936f0ef6b29b1e7ba05ad888dd585210d74fd6
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-06-02 (Fri, 02 Jun 2023)

  Changed paths:
    M tests/qtest/migration-helpers.c
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests/qtest: get rid of some 'qtest_qmp' usage in migration test

Some of the usage is just a verbose way of re-inventing the
qtest_qmp_assert_success(_ref) methods.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230601161347.1803440-5-berrange@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: cdf5ab55872438bb3996d2b2a439c3a7b7425aa3
      
https://github.com/qemu/qemu/commit/cdf5ab55872438bb3996d2b2a439c3a7b7425aa3
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-06-02 (Fri, 02 Jun 2023)

  Changed paths:
    M tests/qtest/migration-helpers.c
    M tests/qtest/migration-helpers.h
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests/qtest: switch to using event callbacks for STOP event

Change the migration test to use the new qtest event callback to watch
for the stop event. This ensures that we only watch for the STOP event
on the source QEMU. The previous code would set the single 'got_stop'
flag when either source or dest QEMU got the STOP event.

Reviewed-by: Juan Quintela <quintela@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230601161347.1803440-6-berrange@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: aca040695890fe67b44402fdb167809809946068
      
https://github.com/qemu/qemu/commit/aca040695890fe67b44402fdb167809809946068
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-06-02 (Fri, 02 Jun 2023)

  Changed paths:
    M tests/qtest/migration-helpers.c
    M tests/qtest/migration-helpers.h
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests/qtest: replace wait_command() with qtest_qmp_assert_success

Most usage of wait_command() is followed by qobject_unref(), which
is just a verbose re-implementation of qtest_qmp_assert_success().

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230601161347.1803440-7-berrange@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 266ea334b2ea96890e268acff1a26b4a71804361
      
https://github.com/qemu/qemu/commit/266ea334b2ea96890e268acff1a26b4a71804361
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-06-02 (Fri, 02 Jun 2023)

  Changed paths:
    M tests/qtest/migration-helpers.c
    M tests/qtest/migration-helpers.h
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests/qtest: capture RESUME events during migration

When running migration tests we monitor for a STOP event so we can skip
redundant waits. This will be needed for the RESUME event too shortly.

Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230601161347.1803440-8-berrange@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 95014994e1a5846c55ee9f1bf9ddea03ac854dc3
      
https://github.com/qemu/qemu/commit/95014994e1a5846c55ee9f1bf9ddea03ac854dc3
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-06-02 (Fri, 02 Jun 2023)

  Changed paths:
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests/qtest: distinguish src/dst migration VM stop/resume events

The 'got_stop' and 'got_resume' global variables apply to the src and
dst migration VM respectively. Change their names to make this explicit
to developers.

Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230601161347.1803440-9-berrange@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 3c4fb177237a115c85c439422f08316e4b8d0d74
      
https://github.com/qemu/qemu/commit/3c4fb177237a115c85c439422f08316e4b8d0d74
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-06-02 (Fri, 02 Jun 2023)

  Changed paths:
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests/qtest: make more migration pre-copy scenarios run non-live

There are 27 pre-copy live migration scenarios being tested. In all of
these we force non-convergence and run for one iteration, then let it
converge and wait for completion during the second (or following)
iterations. At 3 mbps bandwidth limit the first iteration takes a very
long time (~30 seconds).

While it is important to test the migration passes and convergence
logic, it is overkill to do this for all 27 pre-copy scenarios. The
TLS migration scenarios in particular are merely exercising different
code paths during connection establishment.

To optimize time taken, switch most of the test scenarios to run
non-live (ie guest CPUs paused) with no bandwidth limits. This gives
a massive speed up for most of the test scenarios.

For test coverage the following scenarios are unchanged

 * Precopy with UNIX sockets
 * Precopy with UNIX sockets and dirty ring tracking
 * Precopy with XBZRLE
 * Precopy with UNIX compress
 * Precopy with UNIX compress (nowait)
 * Precopy with multifd

On a test machine this reduces execution time from 13 minutes to
8 minutes.

Tested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230601161347.1803440-10-berrange@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: b861383c2690501ff2687f9ef9268b128b0fb3b3
      
https://github.com/qemu/qemu/commit/b861383c2690501ff2687f9ef9268b128b0fb3b3
  Author: Peter Xu <peterx@redhat.com>
  Date:   2023-06-02 (Fri, 02 Jun 2023)

  Changed paths:
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  qtest/migration: Document live=true cases

Document every single live=true use cases on why it should be done in the
live manner.  Also document on the parameter so new precopy cases should
always use live=off unless with explicit reasonings.

Cc: Thomas Huth <thuth@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>
Cc: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20230601172935.175726-1-peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 848a6caa88b9f082c89c9b41afa975761262981d
      
https://github.com/qemu/qemu/commit/848a6caa88b9f082c89c9b41afa975761262981d
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-06-02 (Fri, 02 Jun 2023)

  Changed paths:
    M tests/qtest/libqtest.c
    M tests/qtest/libqtest.h
    M tests/qtest/migration-helpers.c
    M tests/qtest/migration-helpers.h
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  Merge tag 'migration-20230602-pull-request' of 
https://gitlab.com/juan.quintela/qemu into staging

Migration Pull request (20230602 vintage)

This PULL request get:
- All migration-test patches except last one (daniel)
- Documentation about live test cases (peter)

Please apply.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmR5yRwACgkQ9IfvGFhy
# 1yOLQQ/+NsrXEj7Bwp2PdGo+wBRkq4Gah/mc9F00pqtJc2CGNWgfgDohhZjBrhRv
# cTABsfEcIKgCYqGYwVCklJGlUMzxlJPPcMfvou5SWN59E4FBFSg4DWaBfDPCS8LW
# yjnz0JcpxJ+Ge0eqP6xpTPKQ0YGisdav/PjF8GZewBCjyrhZop062a92B2t59D8Y
# shJYKaZZU/5/4zx6KqOm9OClD/yJ+w5q6cGn89/rFE0RMSVywZ3Y1O8/LwIAEP6U
# oj88rczh3geGlsmtPIeyhA3BdnYuPonmyLz8CINFH9+y2tR9l1dN59q1uwEOIvff
# BhJvxTNmkTvsi5zeAmbp2CYmRTwhBmlanh8v2OLNj8zlt0cHYNpiYUZO9qxCHIyT
# LnNTTYhrpqAqINdm+Z8c3ymDKkTz0KECBa45hdFtNB4ZOXPDQTHVqkQRfe3CxDKz
# f/WM4TxHEzVMw/Ow1K9Kbk7/AEwIV6Ol2BSf9D+ZcU4ydmu6ENhV9G4cQ9Orlv8I
# opychxf+O/b6yhVFq7J1ufDhfn3aWQmUQC06npEgfrIV/fLrXhYfs2CXkNZs78v6
# MTMNPNBN/UasM8hx+ldsjZEHf625lO3eNWoNY1Xxog5YICnNLA+tG6n69uybew2+
# UOVyoHwX7iqaToK6bQNCS4H/PjCp3v7fzw1Nsz48Pfaklpivz/k=
# =4exy
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 02 Jun 2023 03:49:00 AM PDT
# gpg:                using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [unknown]
# gpg:                 aka "Juan Quintela <quintela@trasno.org>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723

* tag 'migration-20230602-pull-request' of 
https://gitlab.com/juan.quintela/qemu:
  qtest/migration: Document live=true cases
  tests/qtest: make more migration pre-copy scenarios run non-live
  tests/qtest: distinguish src/dst migration VM stop/resume events
  tests/qtest: capture RESUME events during migration
  tests/qtest: replace wait_command() with qtest_qmp_assert_success
  tests/qtest: switch to using event callbacks for STOP event
  tests/qtest: get rid of some 'qtest_qmp' usage in migration test
  tests/qtest: get rid of 'qmp_command' helper in migration test
  tests/qtest: add support for callback to receive QMP events
  tests/qtest: add various qtest_qmp_assert_success() variants

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/24bc242c91ae...848a6caa88b9



reply via email to

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