1. 08 3月, 2019 10 次提交
    • P
      tests/bios-tables: Improve portability by searching bash in the $PATH · d6837581
      Philippe Mathieu-Daudé 提交于
      Bash is not always installed as /bin/bash. In particular on OpenBSD,
      the package installs it in /usr/local/bin.
      Use the 'env' shebang to search bash in the $PATH.
      Reviewed-by: NKamil Rytarowski <n54@gmx.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Acked-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      d6837581
    • P
      tests/multiboot: Improve portability by searching bash in the $PATH · a03700fd
      Philippe Mathieu-Daudé 提交于
      Bash is not always installed as /bin/bash. In particular on OpenBSD,
      the package installs it in /usr/local/bin.
      Use the 'env' shebang to search bash in the $PATH.
      Reviewed-by: NKamil Rytarowski <n54@gmx.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a03700fd
    • A
      iotests: check whitelisted formats · d9df28e7
      Andrey Shinkevich 提交于
      Some test cases require specific formats. The method decorator
      skip_if_unsupported() checks if requested formats are whitelisted.
      The test #139 was selected for a sample output, after running
      $ ./check -qcow2 131-140
      
      137 3s ...
      138 0s ...
      139 2s ...
          [case not run] testBlkDebug (__main__.TestBlockdevDel): formats ['blkdebug'] are not whitelisted
          [case not run] testBlkVerify (__main__.TestBlockdevDel): formats ['blkverify'] are not whitelisted
          [case not run] testQuorum (__main__.TestBlockdevDel): formats ['quorum'] are not whitelisted
      140 0s ...
      Not run: 131 135 136
      Some cases not run in: 139
      Passed all 7 tests
      Signed-off-by: NAndrey Shinkevich <andrey.shinkevich@virtuozzo.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      d9df28e7
    • A
      iotests: ask QEMU for supported formats · 57ed557f
      Andrey Shinkevich 提交于
      Supported formats listed by 'qemu' may differ from those listed by
      'qemu-img' due to whitelists. Some test cases require specific formats
      that may be used with qemu. They can be inquired directly by running
      'qemu -drive format=help'. The response takes whitelists into account.
      The method supported_formats() serves for that. The method decorator
      skip_if_unsupported() checks if all requested formats are whitelisted.
      If not, the test case will be skipped. That has been implemented in
      the 'check' file in the way similar to the 'test notrun' mechanism.
      Suggested-by: NRoman Kagan <rkagan@virtuozzo.com>
      Suggested-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Suggested-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NAndrey Shinkevich <andrey.shinkevich@virtuozzo.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      57ed557f
    • A
      block: iterate_format with account of whitelisting · 9ac404c5
      Andrey Shinkevich 提交于
      bdrv_iterate_format (which is currently only used for printing out the
      formats supported by the block layer) doesn't take format whitelisting
      into account.
      
      This creates a problem for tests: they enumerate supported formats to
      decide which tests to enable, but then discover that QEMU doesn't let
      them actually use some of those formats.
      
      To avoid that, exclude formats that are not whitelisted from
      enumeration, if whitelisting is in use.  Since we have separate
      whitelists for r/w and r/o, take this a parameter to
      bdrv_iterate_format, and print two lists of supported formats (r/w and
      r/o) in main qemu.
      Signed-off-by: NRoman Kagan <rkagan@virtuozzo.com>
      Signed-off-by: NAndrey Shinkevich <andrey.shinkevich@virtuozzo.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      9ac404c5
    • A
      iotests: open notrun files in text mode · ce090f65
      Andrey Shinkevich 提交于
      Replace the binary mode with the default text one when *.notrun
      files are opened for skipped tests. That change is made for the
      compatibility with Python 3 which returns error otherwise.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NAndrey Shinkevich <andrey.shinkevich@virtuozzo.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      ce090f65
    • A
      qcow2: Default to 4KB for the qcow2 cache entry size · af39bd0d
      Alberto Garcia 提交于
      QEMU 2.12 (commit 1221fe6f) introduced
      a new setting called l2-cache-entry-size that allows making entries on
      the qcow2 L2 cache smaller than the cluster size.
      
      I have been performing several tests with different cluster and entry
      sizes and all of them show that reducing the entry size (aka L2 slice)
      consistently improves I/O performance, notably during random I/O (all
      tests done with sequential I/O show similar results). This is to be
      expected because loading and evicting an L2 slice is more expensive
      the larger the slice is.
      
      Here are some numbers on fully populated 40GB qcow2 images. The
      rightmost column represents the maximum L2 cache size in both cases.
      
         Cluster size = 64 KB
         |-------------+--------------+--------------+--------------|
         |             | 1MB L2 cache | 3MB L2 cache | 5MB L2 cache |
         |-------------+--------------+--------------+--------------|
         |  4KB slices |    6545 IOPS |   12045 IOPS |   55680 IOPS |
         | 16KB slices |    5177 IOPS |    9798 IOPS |   56278 IOPS |
         | 64KB slices |    2718 IOPS |    5326 IOPS |   57355 IOPS |
         |-------------+--------------+--------------+--------------|
      
         Cluster size = 256 KB
         |--------------+----------------+--------------+-----------------|
         |              | 512KB L2 cache | 1MB L2 cache | 1280KB L2 cache |
         |--------------+----------------+--------------+-----------------|
         |   4KB slices |      8539 IOPS |   21071 IOPS |      55417 IOPS |
         |  64KB slices |      3598 IOPS |    9772 IOPS |      57687 IOPS |
         | 256KB slices |      1415 IOPS |    4120 IOPS |      58001 IOPS |
         |--------------+----------------+--------------+-----------------|
      
      As can be seen in the numbers, the only exception to the rule is when
      the cache is large enough to hold all L2 tables. This is also to be
      expected because in this case no cache entry is ever evicted so
      reducing its size doesn't bring any benefit.
      
      This patch sets the default L2 cache entry size to 4KB except when the
      cache is large enough for the whole disk.
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      af39bd0d
    • S
      iotests: use iotests.VM in 238 · b74b1ade
      Stefan Hajnoczi 提交于
      Test 238 does not require the kvm accelerator.  Using the qtest
      accelerator allows the test to run in both non-kvm and non-tcg
      environments.
      
      iotests.VM implicitly uses the qtest accelerator and is really the class
      that this test should be using.  Switch to that instead of
      qemu.QEMUMachine.
      Suggested-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b74b1ade
    • P
      Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-4.0-pull-request' into staging · c4e0780e
      Peter Maydell 提交于
      - Update netlink types to linux v5.0
      - fix accept4/getpeername/getsockname/recvfrom/recvmsg/read
      - add/fix ELF_PLATFORM ofr aarch64 and arm
      - fix "may be used uninitialized" warnings
      - Fix breakpoint support in Nios
      - Nicer strace output of chroot() syscall
      
      # gpg: Signature made Thu 07 Mar 2019 10:06:16 GMT
      # gpg:                using RSA key F30C38BD3F2FBE3C
      # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
      # gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
      # gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
      # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C
      
      * remotes/vivier2/tags/linux-user-for-4.0-pull-request:
        linux-user: add new netlink types
        linux-user: Nicer strace output of chroot() syscall
        linux-user: fix "may be used uninitialized" warnings
        linux-user: don't short-circuit read with zero length
        Fix breakpoint support in Nios II user-mode emulation.
        linux-user: fix emulation of accept4/getpeername/getsockname/recvfrom syscalls
        linux-user: Fix ELF_PLATFORM for aarch64_be-linux-user
        linux-user: Add ELF_PLATFORM for arm
        linux-user: fix recvmsg emulation
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      c4e0780e
    • P
      Merge remote-tracking branch 'remotes/cleber/tags/python-next-pull-request' into staging · 6cb4f6db
      Peter Maydell 提交于
      Python queue, 2019-02-22
      
      Python:
      * introduce "python" directory with module namespace
      * log QEMU launch command line on qemu.QEMUMachine
      
      Acceptance Tests:
      * initrd 4GiB+ test
      * migration test
      * multi vm support in test class
      * bump Avocado version and drop "🥑 enable"
      
      # gpg: Signature made Fri 22 Feb 2019 19:37:07 GMT
      # gpg:                using RSA key 657E8D33A5F209F3
      # gpg: Good signature from "Cleber Rosa <crosa@redhat.com>" [marginal]
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: 7ABB 96EB 8B46 B94D 5E0F  E9BB 657E 8D33 A5F2 09F3
      
      * remotes/cleber/tags/python-next-pull-request:
        Acceptance tests: expect boot to extract 2GiB+ initrd with linux-v4.16
        Acceptance tests: use linux-3.6 and set vm memory to 4GiB
        tests.acceptance: adds simple migration test
        tests.acceptance: adds multi vm capability for acceptance tests
        scripts/qemu.py: log QEMU launch command line
        Introduce a Python module structure
        Acceptance tests: drop usage of "🥑 enable"
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      6cb4f6db
  2. 07 3月, 2019 28 次提交
  3. 06 3月, 2019 2 次提交
    • D
      qdev: Provide qdev_get_bus_hotplug_handler() · 14405c27
      David Hildenbrand 提交于
      Let's use a wrapper instead of looking it up manually. This function can
      than be reused when we explicitly want to have the bus hotplug handler
      (e.g. when the bus hotplug handler was overwritten by the machine
      hotplug handler).
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NDavid Hildenbrand <david@redhat.com>
      Message-Id: <20190228122849.4296-4-david@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      14405c27
    • I
      qdev: Let machine hotplug handler to override bus hotplug handler · 17cc0128
      Igor Mammedov 提交于
      it will allow to return another hotplug handler than the default
      one for a specific bus based device type. Which is needed to handle
      non trivial plug/unplug sequences that need the access to resources
      configured outside of bus where device is attached.
      
      That will allow for returned hotplug handler to orchestrate wiring
      in arbitrary order, by chaining other hotplug handlers when
      it's needed.
      
      PS:
      It could be used for hybrid virtio-mem and virtio-pmem devices
      where it will return machine as hotplug handler which will do
      necessary wiring at machine level and then pass control down
      the chain to bus specific hotplug handler.
      
      Example of top level hotplug handler override and custom plug sequence:
      
        some_machine_get_hotplug_handler(machine){
            if (object_dynamic_cast(OBJECT(dev), TYPE_SOME_BUS_DEVICE)) {
                return HOTPLUG_HANDLER(machine);
            }
            return NULL;
        }
      
        some_machine_device_plug(hotplug_dev, dev) {
            if (object_dynamic_cast(OBJECT(dev), TYPE_SOME_BUS_DEVICE)) {
                /* do machine specific initialization */
                some_machine_init_special_device(dev)
      
                /* pass control to bus specific handler */
                hotplug_handler_plug(dev->parent_bus->hotplug_handler, dev)
            }
        }
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NDavid Hildenbrand <david@redhat.com>
      Message-Id: <20190228122849.4296-3-david@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      17cc0128