qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 2c58c2: tests: Clean up wait for event


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 2c58c2: tests: Clean up wait for event
Date: Thu, 15 Feb 2018 06:15:48 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 2c58c27beeba1a5be4bceeb283cbc90d4233a090
      
https://github.com/qemu/qemu/commit/2c58c27beeba1a5be4bceeb283cbc90d4233a090
  Author: Markus Armbruster <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/boot-order-test.c
    M tests/libqos/pci-pc.c
    M tests/tco-test.c
    M tests/wdt_ib700-test.c

  Log Message:
  -----------
  tests: Clean up wait for event

We still use hacks like qmp("") to wait for an event, even though we
have qmp_eventwait() since commit 8fe941f, and qmp_eventwait_ref()
since commit 7ffe312.  Both commits neglected to convert all the
existing hacks.  Make up what they missed.

Bonus: gets rid of empty format strings.  A step towards compile-time
format string checking without triggering -Wformat-zero-length.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
[thuth: dropped the hunks from the usb tests - not needed anymore]
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 50990b162c471a8de992d43a170a3ccf24462720
      
https://github.com/qemu/qemu/commit/50990b162c471a8de992d43a170a3ccf24462720
  Author: Eric Blake <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/libqtest.c

  Log Message:
  -----------
  libqtest: Use qemu_strtoul()

This will keep checkpatch happy when the next patch does code motion.
Fix the include order to match HACKING when adding the needed header.

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: e5d1730d1e5c1f341d2d692ab2ad0d8d2d7f47e1
      
https://github.com/qemu/qemu/commit/e5d1730d1e5c1f341d2d692ab2ad0d8d2d7f47e1
  Author: Eric Blake <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/ahci-test.c
    M tests/e1000e-test.c
    M tests/i440fx-test.c
    M tests/ide-test.c
    M tests/libqos/ahci.c
    M tests/libqos/ahci.h
    M tests/libqos/libqos.c
    M tests/libqos/libqos.h
    M tests/libqos/pci-pc.c
    M tests/libqos/pci-pc.h
    M tests/libqos/pci-spapr.c
    M tests/libqos/pci-spapr.h
    M tests/libqos/pci.h
    M tests/q35-test.c
    M tests/rtl8139-test.c
    M tests/sdhci-test.c
    M tests/tco-test.c
    M tests/usb-hcd-ehci-test.c
    M tests/vhost-user-test.c

  Log Message:
  -----------
  libqos: Track QTestState with QPCIBus

When initializing a QPCIBus, track which QTestState the bus is
associated with (so that a later patch can then explicitly use
that test state for all communication on the bus, rather than
blindly relying on global_qtest).  Update the initialization
functions to take another parameter, and update all callers to
pass in state (for now, most callers get away with passing the
current global_qtest as the current state, although this required
fixing the order of initialization to ensure qtest_start() is
called before qpci_init*() in rtl8139-test, and provided an
opportunity to pass in the allocator in e1000e-test).

Touch up some allocations to use g_new0() rather than g_malloc()
while in the area, and simplify some code (all implementations
of QOSOps provide a .init_allocator() that never fails).

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: John Snow <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
[thuth: Removed hunk from vhost-user-test.c that is not required anymore,
 fixed conflict in qtest_vboot() and adjusted qpci_init_pc() in sdhci-test]
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 05e520f1c7f6ac7a142c616883e00c8924e81331
      
https://github.com/qemu/qemu/commit/05e520f1c7f6ac7a142c616883e00c8924e81331
  Author: Eric Blake <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/boot-order-test.c
    M tests/e1000e-test.c
    M tests/fw_cfg-test.c
    M tests/ide-test.c
    M tests/libqos/fw_cfg.c
    M tests/libqos/fw_cfg.h
    M tests/libqos/libqos.c
    M tests/libqos/libqos.h
    M tests/libqos/malloc-pc.c
    M tests/libqos/malloc-pc.h
    M tests/libqos/malloc-spapr.c
    M tests/libqos/malloc-spapr.h
    M tests/libqos/malloc.h
    M tests/vhost-user-test.c

  Log Message:
  -----------
  libqos: Use explicit QTestState for fw_cfg operations

Drop one more client of global_qtest by teaching all fw_cfg test
functionality (invoked through alloc-pc) to pass in an explicit
QTestState, adjusting all callers.  In particular, fw_cfg-test
had to reorder things to create the test state prior to creating
the fw_cfg (and drop a pointless strdup in the meantime), but that
test now no longer depends on global_qtest.

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: John Snow <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
[thuth: Fixed conflict wrt pc_alloc_init() in vhost-user-test.c]
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 9b67af76dbe62960794055a732f1e47680621192
      
https://github.com/qemu/qemu/commit/9b67af76dbe62960794055a732f1e47680621192
  Author: Eric Blake <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/libqos/pci-spapr.c
    M tests/libqos/rtas.c
    M tests/libqos/rtas.h
    M tests/rtas-test.c

  Log Message:
  -----------
  libqos: Use explicit QTestState for rtas operations

Drop one more client of global_qtest by teaching all rtas test
functionality to pass in an explicit QTestState, adjusting all
callers.

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
[thuth: Use nicer indentation in rtas.h]
Signed-off-by: Thomas Huth <address@hidden>


  Commit: f1dfd507325f25a73d777db5f5d9b3fcac89287b
      
https://github.com/qemu/qemu/commit/f1dfd507325f25a73d777db5f5d9b3fcac89287b
  Author: Eric Blake <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/ds1338-test.c
    M tests/libqos/i2c-imx.c
    M tests/libqos/i2c-omap.c
    M tests/libqos/i2c.h
    M tests/tmp105-test.c

  Log Message:
  -----------
  libqos: Use explicit QTestState for i2c operations

Drop one more client of global_qtest by teaching all i2c test
functionality to pass in an explicit QTestState, adjusting all
callers.

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


  Commit: 10747e55d53d32f1f062456cac1e4fa32f58c44e
      
https://github.com/qemu/qemu/commit/10747e55d53d32f1f062456cac1e4fa32f58c44e
  Author: Eric Blake <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/libqos/ahci.c

  Log Message:
  -----------
  libqos: Use explicit QTestState for ahci operations

Drop one more client of global_qtest by teaching all ahci test
functionality to pass in an explicit QTestState.  The state was
already available, so no callers had to be adjusted.

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: John Snow <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 3d95fb9770f0fbf4396879bb6152b0e78edf0546
      
https://github.com/qemu/qemu/commit/3d95fb9770f0fbf4396879bb6152b0e78edf0546
  Author: Eric Blake <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/ahci-test.c
    M tests/ivshmem-test.c
    M tests/libqos/libqos-pc.c
    M tests/libqos/libqos.c
    M tests/megasas-test.c
    M tests/rtas-test.c
    M tests/usb-hcd-uhci-test.c
    M tests/virtio-9p-test.c
    M tests/virtio-blk-test.c
    M tests/virtio-net-test.c
    M tests/virtio-scsi-test.c

  Log Message:
  -----------
  libqos: Use explicit QTestState for remaining libqos operations

Drop one more client of global_qtest by teaching all remaining
libqos stragglers to pass in an explicit QTestState.  Change the
setting of global_qtest from being implicit in libqos' call to
qtest_start() to instead be explicit in all clients that are
still relying on global_qtest.

Note that qmp_execute() can be greatly simplified in the process,
and that we also get rid of interpolation of a JSON string into a
temporary variable when qtest_qmp() can do it more reliably.

Signed-off-by: Eric Blake <address@hidden>
Acked-by: Greg Kurz <address@hidden>
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 6a5c88f5728d33994b828ad4a333752269f08d92
      
https://github.com/qemu/qemu/commit/6a5c88f5728d33994b828ad4a333752269f08d92
  Author: Eric Blake <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/qmp-test.c

  Log Message:
  -----------
  qmp-test: Drop dependence on global_qtest

As a general rule, we prefer avoiding implicit global state
because it makes code harder to safely copy and paste without
thinking about the global state.  Although qmp-test does not
maintain parallel qtest connections, it was the last test
assigning to global_qtest.  It's just as easy to be explicit
about the state; once all tests have been cleaned up, a later
patch can then get rid of global_qtest and a layer of wrappers
in libqtest.

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


  Commit: 8b19f2b77e72c4b0d5f26a2ab6327b407bca195c
      
https://github.com/qemu/qemu/commit/8b19f2b77e72c4b0d5f26a2ab6327b407bca195c
  Author: Eric Blake <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/bios-tables-test.c
    M tests/boot-sector.c
    M tests/boot-sector.h
    M tests/pxe-test.c
    M tests/vmgenid-test.c

  Log Message:
  -----------
  tests/boot-sector: Drop dependence on global_qtest

As a general rule, we prefer avoiding implicit global state
because it makes code harder to safely copy and paste without
thinking about the global state.  Adjust the helper code to
use explicit state instead, and update all callers.

Fix some trailing whitespace while touching the file.

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: db57d7a3c284db2315d92f55962597cc7276579a
      
https://github.com/qemu/qemu/commit/db57d7a3c284db2315d92f55962597cc7276579a
  Author: Eric Blake <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/wdt_ib700-test.c

  Log Message:
  -----------
  wdt_ib700-test: Drop dependence on global_qtest

As a general rule, we prefer avoiding implicit global state
because it makes code harder to safely copy and paste without
thinking about the global state.  Improve this test to be
explicit about the state.

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


  Commit: e74fbf1f582f927919c54bb09091bc96f45386da
      
https://github.com/qemu/qemu/commit/e74fbf1f582f927919c54bb09091bc96f45386da
  Author: Thomas Huth <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/Makefile.include
    M tests/boot-serial-test.c

  Log Message:
  -----------
  tests/boot-serial: Enable the boot-serial test on SPARC machines, too

OpenBIOS prints out the name of the detected CPU here, so looking for
this string is a nice test to verify that the CPU detection is still
working correctly.

Acked-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: d3d4f757d34995ec01f794f382a210d9e4a019a4
      
https://github.com/qemu/qemu/commit/d3d4f757d34995ec01f794f382a210d9e4a019a4
  Author: Thomas Huth <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/boot-serial-test.c

  Log Message:
  -----------
  tests/boot-serial: Add tests for PowerPC Mac machines

OpenBIOS prints out the CPU type on these machine types, so we can use
this string to test whether the CPU detection is working correctly.

Acked-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>


  Commit: ec2e988fce1b262b802ef7285981629a8417cd8c
      
https://github.com/qemu/qemu/commit/ec2e988fce1b262b802ef7285981629a8417cd8c
  Author: Wei Huang <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/Makefile.include
    M tests/boot-serial-test.c

  Log Message:
  -----------
  tests/boot-serial-test: Add support for the aarch64 virt machine

This patch adds a small binary kernel to test aarch64 virt machine's
UART.

Signed-off-by: Wei Huang <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
[thuth: Fixed contextual conflicts with the hppa and sdhci patches]
Signed-off-by: Thomas Huth <address@hidden>


  Commit: 9c29830c90d82f27f2152da187b29c71995e63b1
      
https://github.com/qemu/qemu/commit/9c29830c90d82f27f2152da187b29c71995e63b1
  Author: Thomas Huth <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/Makefile.include
    M tests/m48t59-test.c

  Log Message:
  -----------
  tests/m48t59: Fix and re-enable the test for sparc

The m48t59 test has been disabled in commit baeddded5fe6fa37d13fb94bf8d
("sparc: disable qtest in make check"), likely due to some timing issues
in the bcd_check_time tests which might fail if it gets interrupted for
too long. It should be OK to re-enable this test if we make sure that we
do not run it on timing-sensitive machines, thus it should be OK if we only
run it in the g_test_slow() mode.

Additionally, there are two other issues:

First, the test can not run so easily on sparc64 anymore, since commit
f3b18f35a23c60edbda6420cd ("sun4u: switch m48t59 NVRAM to MMIO access")
moved the m48t59 device to the ebus instead, and for this you first
have to set up the corresponding PCI device (which is currently not
possible from within the m48t59 test). So we can only re-enable this
test on sparc, but not the sparc64 target.

Second, the fuzzing test is executed before the bcd-check-time test
(due to the naming of the tests), without having the base address set
up properly, so the fuzzing test does not really check anything at all.
Fix it by setting up the base address from the main function already
and by moving the qtest_start() to the tests themselves, so that each
test starts with a clean environment (since after the fuzzing, the clock
is unusable for the bcd-check-time test).

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


  Commit: 7cbe423c2399e172d4a3ca3c7fe94c19a575dc8e
      
https://github.com/qemu/qemu/commit/7cbe423c2399e172d4a3ca3c7fe94c19a575dc8e
  Author: Thomas Huth <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/m48t59-test.c

  Log Message:
  -----------
  tests/m48t59: Make the test independent of global_qtest

Stop using the functions that require global_qtest here and pass
around the QTestState instead (global_qtest should finally get
removed since this causes problems with tests running in parallel).

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


  Commit: 9697ce405f07c055f8a1f0c7b0873ed222a12576
      
https://github.com/qemu/qemu/commit/9697ce405f07c055f8a1f0c7b0873ed222a12576
  Author: Thomas Huth <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/Makefile.include

  Log Message:
  -----------
  tests/Makefile: Derive check-qtest-ppc64-y from check-qtest-ppc-y

ppc64 is a superset of ppc, so the ppc64 tests should include all
the ppc tests.

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


  Commit: 02f4fbecb93da2125d22d3f0b62c6ee44aea84d4
      
https://github.com/qemu/qemu/commit/02f4fbecb93da2125d22d3f0b62c6ee44aea84d4
  Author: Thomas Huth <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/Makefile.include
    M tests/m48t59-test.c

  Log Message:
  -----------
  tests/m48t59: Use the m48t59 test on ppc, too

The ref405ep machine has a memory-mapped m48t59 device, so
we can run the m48t59 test on this machine, too.

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


  Commit: 8c5e7bddc22dac9d4dc3526996babce4c7242d9d
      
https://github.com/qemu/qemu/commit/8c5e7bddc22dac9d4dc3526996babce4c7242d9d
  Author: Peter Maydell <address@hidden>
  Date:   2018-02-15 (Thu, 15 Feb 2018)

  Changed paths:
    M tests/Makefile.include
    M tests/ahci-test.c
    M tests/bios-tables-test.c
    M tests/boot-order-test.c
    M tests/boot-sector.c
    M tests/boot-sector.h
    M tests/boot-serial-test.c
    M tests/ds1338-test.c
    M tests/e1000e-test.c
    M tests/fw_cfg-test.c
    M tests/i440fx-test.c
    M tests/ide-test.c
    M tests/ivshmem-test.c
    M tests/libqos/ahci.c
    M tests/libqos/ahci.h
    M tests/libqos/fw_cfg.c
    M tests/libqos/fw_cfg.h
    M tests/libqos/i2c-imx.c
    M tests/libqos/i2c-omap.c
    M tests/libqos/i2c.h
    M tests/libqos/libqos-pc.c
    M tests/libqos/libqos.c
    M tests/libqos/libqos.h
    M tests/libqos/malloc-pc.c
    M tests/libqos/malloc-pc.h
    M tests/libqos/malloc-spapr.c
    M tests/libqos/malloc-spapr.h
    M tests/libqos/malloc.h
    M tests/libqos/pci-pc.c
    M tests/libqos/pci-pc.h
    M tests/libqos/pci-spapr.c
    M tests/libqos/pci-spapr.h
    M tests/libqos/pci.h
    M tests/libqos/rtas.c
    M tests/libqos/rtas.h
    M tests/libqtest.c
    M tests/m48t59-test.c
    M tests/megasas-test.c
    M tests/pxe-test.c
    M tests/q35-test.c
    M tests/qmp-test.c
    M tests/rtas-test.c
    M tests/rtl8139-test.c
    M tests/sdhci-test.c
    M tests/tco-test.c
    M tests/tmp105-test.c
    M tests/usb-hcd-ehci-test.c
    M tests/usb-hcd-uhci-test.c
    M tests/vhost-user-test.c
    M tests/virtio-9p-test.c
    M tests/virtio-blk-test.c
    M tests/virtio-net-test.c
    M tests/virtio-scsi-test.c
    M tests/vmgenid-test.c
    M tests/wdt_ib700-test.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/huth/tags/pull-request-2018-02-14' into 
staging

Various improvements to the qtest checks:
- Clean-ups by Eric Blake with regards to the global_qtest variable
- Some more test cases for the boot-serial tester
- Re-activation of the m48t59-test

# gpg: Signature made Wed 14 Feb 2018 11:07:44 GMT
# gpg:                using RSA key 2ED9D774FE702DB5
# gpg: Good signature from "Thomas Huth <address@hidden>"
# gpg:                 aka "Thomas Huth <address@hidden>"
# gpg:                 aka "Thomas Huth <address@hidden>"
# gpg:                 aka "Thomas Huth <address@hidden>"
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/huth/tags/pull-request-2018-02-14:
  tests/m48t59: Use the m48t59 test on ppc, too
  tests/Makefile: Derive check-qtest-ppc64-y from check-qtest-ppc-y
  tests/m48t59: Make the test independent of global_qtest
  tests/m48t59: Fix and re-enable the test for sparc
  tests/boot-serial-test: Add support for the aarch64 virt machine
  tests/boot-serial: Add tests for PowerPC Mac machines
  tests/boot-serial: Enable the boot-serial test on SPARC machines, too
  wdt_ib700-test: Drop dependence on global_qtest
  tests/boot-sector: Drop dependence on global_qtest
  qmp-test: Drop dependence on global_qtest
  libqos: Use explicit QTestState for remaining libqos operations
  libqos: Use explicit QTestState for ahci operations
  libqos: Use explicit QTestState for i2c operations
  libqos: Use explicit QTestState for rtas operations
  libqos: Use explicit QTestState for fw_cfg operations
  libqos: Track QTestState with QPCIBus
  libqtest: Use qemu_strtoul()
  tests: Clean up wait for event

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


Compare: https://github.com/qemu/qemu/compare/9f9c53368b21...8c5e7bddc22d

reply via email to

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