qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] e166b4: qemu-iotests: qemu machine type suppo


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] e166b4: qemu-iotests: qemu machine type support
Date: Mon, 07 Sep 2015 05:30:05 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: e166b4148208656635ea2fe39df8b1e875a34fb8
      
https://github.com/qemu/qemu/commit/e166b4148208656635ea2fe39df8b1e875a34fb8
  Author: Bo Tu <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M tests/qemu-iotests/check
    M tests/qemu-iotests/common.config
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  qemu-iotests: qemu machine type support

This patch adds qemu machine type support to the io test suite.
Based on the qemu default machine type and alias of the default machine
type the reference output file can now vary from the default to a
machine specific output file if necessary. When using a machine specific
reference file if the default machine has an alias then use the alias as the 
output
file name otherwise use the default machine name as the output file name.

Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Michael Mueller <address@hidden>
Reviewed-by: Sascha Silbe <address@hidden>
Signed-off-by: Xiao Guang Chen <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 2711fd33a4b18c5e35a6f7efe57b5d868def829e
      
https://github.com/qemu/qemu/commit/2711fd33a4b18c5e35a6f7efe57b5d868def829e
  Author: Bo Tu <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M tests/qemu-iotests/067
    M tests/qemu-iotests/067.out
    M tests/qemu-iotests/071.out
    M tests/qemu-iotests/081.out
    M tests/qemu-iotests/087.out
    M tests/qemu-iotests/common
    M tests/qemu-iotests/common.qemu

  Log Message:
  -----------
  qemu-iotests: disable default qemu devices for cross-platform compatibility

This patch fixes an io test suite issue that was introduced with the
commit c88930a6866e74953e931ae749781e98e486e5c8 'qemu-char: Permit only
a single "stdio" character device'. The option supresses the creation of
default devices such as the floopy and cdrom. Output files for test case
067, 071, 081 and 087 need to be updated to accommodate this change.
Use virtio-blk instead of virtio-blk-pci as the device driver for test
case 067. For virtio-blk-pci is the same with virtio-blk as device
driver but other platform such as s390 may not recognize the virtio-blk-pci.

The default devices differ across machines. As the qemu output often
contains these devices (or events for them, like opening a CD tray on
reset), the reference output currently is rather machine-specific.

All existing qemu tests explicitly configure the devices they're working
with, so just pass -nodefaults to qemu by default to disable the default
devices. Update the reference outputs accordingly.

Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Michael Mueller <address@hidden>
Reviewed-by: Sascha Silbe <address@hidden>
Signed-off-by: Xiao Guang Chen <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: d8683155fa76cabff112271771e43e21034ff2ba
      
https://github.com/qemu/qemu/commit/d8683155fa76cabff112271771e43e21034ff2ba
  Author: Bo Tu <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M tests/qemu-iotests/041
    M tests/qemu-iotests/055

  Log Message:
  -----------
  qemu-iotests: s390x: fix test 041 and 055

There is no 'ide-cd' device defined on non-pc platform, so
test_medium_not_found() test should be skipped.

Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Michael Mueller <address@hidden>
Reviewed-by: Sascha Silbe <address@hidden>
Signed-off-by: Xiao Guang Chen <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 212789925efffe1c552b114321ee74081a7efb03
      
https://github.com/qemu/qemu/commit/212789925efffe1c552b114321ee74081a7efb03
  Author: Bo Tu <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M tests/qemu-iotests/049.out
    M util/qemu-option.c

  Log Message:
  -----------
  qemu-iotests: s390x: fix test 049, reject negative sizes in QemuOpts

when creating an image qemu-img enable us specifying the size of the
image using -o size=xx options. But when we specify an invalid size
such as a negtive size then different platform gives different result.

parse_option_size() function in util/qemu-option.c will be called to
parse the size, a cast was called in the function to cast the input
(saved as a double in the function) size to an unsigned int64 value,
when the input is a negtive value or exceeds the maximum of uint64, then
the result is undefined.

According to C99 6.3.1.4, the result of converting a floating point
number to an integer that cannot represent the (integer part of) number
is undefined.  And sure enough the results are different on x86 and
s390.

C99 Language spec 6.3.1.4 Real floating and integers:
the result of this assignment/cast is undefined if the float is not
in the open interval (-1, U<type>_MAX+1).

Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Sascha Silbe <address@hidden>
Signed-off-by: Bo Tu <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 137a905fdf43880c077438d57ef2d319569da9eb
      
https://github.com/qemu/qemu/commit/137a905fdf43880c077438d57ef2d319569da9eb
  Author: Bo Tu <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M tests/qemu-iotests/130
    M tests/qemu-iotests/130.out

  Log Message:
  -----------
  qemu-iotests: s390x: fix test 130

The default device id of hard disk on the s390 platform is "virtio0"
which differs to the "ide0-hd0" for the x86 platform. Setting id in
the drive definition, ie:"qemu -drive id=testdisk", will be the same
on all platforms.

Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Bo Tu <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: bdd03cdf5dc3176bc7169a1d5709303e9279fffb
      
https://github.com/qemu/qemu/commit/bdd03cdf5dc3176bc7169a1d5709303e9279fffb
  Author: Max Reitz <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M block/raw-posix.c

  Log Message:
  -----------
  block/raw-posix: Use raw_normalize_devicepath()

The filename given to qemu_open() in block/raw-posix.c should generally
have been processed by raw_normalize_devicepath(); unless we are only
probing (in which case the caller often checks whether the file is a
block device or not, and this property will be changed by
raw_normalize_devicepath() on NetBSD) or it is about a deprecated device
(i.e. floppy).

Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: e814dffcc9810ed77fe99081be9751b620a894c4
      
https://github.com/qemu/qemu/commit/e814dffcc9810ed77fe99081be9751b620a894c4
  Author: Max Reitz <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: Fix crash in amend invocation

Example:
$ ./qemu-img create -f qcow2 /tmp/t.qcow2 64M
$ ./qemu-img amend -f qcow2 -o backing_file=/tmp/t.qcow2, -o help \
    /tmp/t.qcow2

This should not crash. This actually is tested by iotest 082, but not
caught due to the segmentation fault being silent (which is something
that needs to be fixed, too).

Reported-by: Dr. David Alan Gilbert <address@hidden>
Cc: qemu-stable <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 8e4922535b6479c7a2fa6b14b0148c6ae4fcc003
      
https://github.com/qemu/qemu/commit/8e4922535b6479c7a2fa6b14b0148c6ae4fcc003
  Author: Max Reitz <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: More options for VM.add_drive()

This patch allows specifying the interface to be used for the drive, and
makes specifying a path optional (if the path is None, the "file" option
will be omitted, thus creating an empty drive).

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 0ed82f7a096537923ef3705946f254d2f61eaf93
      
https://github.com/qemu/qemu/commit/0ed82f7a096537923ef3705946f254d2f61eaf93
  Author: Max Reitz <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M tests/qemu-iotests/041
    M tests/qemu-iotests/055

  Log Message:
  -----------
  iotests: Respect -nodefaults in tests 41 and 55

While -nodefaults is set in $QEMU_OPTIONS, this is currently (wrongly)
ignored for Python iotests. In order to be prepared for when this is
fixed, we should explicitly add an IDE CD-ROM drive instead of relying
on it being created automatically.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 934659c460d46c948cf348822fda1d38556ed9a4
      
https://github.com/qemu/qemu/commit/934659c460d46c948cf348822fda1d38556ed9a4
  Author: Max Reitz <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M tests/qemu-iotests/039
    M tests/qemu-iotests/039.out
    M tests/qemu-iotests/061
    M tests/qemu-iotests/061.out
    M tests/qemu-iotests/check
    M tests/qemu-iotests/common.config
    M tests/qemu-iotests/common.rc
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: Do not suppress segfaults in bash tests

Currently, if a qemu/qemu-io/qemu-img/qemu-nbd invocation receives a
segmentation fault, that message is invisible in most cases since the
output is generally filtered and bash suppresses the segmentation fault
notice for any but the last element of a pipe.

Most of the time, the test will then fail anyway because of missing
output, but not necessarily (as happened with test 82 recently).

Fix this by making the corresponding environment variables point to
wrapper functions which execute the respective command in a subshell.

Giving options to qemu/qemu-io/qemu-img and path names with spaces were
broken for the Python tests; this patch "accidentally" fixes that.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 2ef6093cd6990314304f2d3b18eb476ee418d73c
      
https://github.com/qemu/qemu/commit/2ef6093cd6990314304f2d3b18eb476ee418d73c
  Author: Max Reitz <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M tests/qemu-iotests/iotests.py

  Log Message:
  -----------
  iotests: Warn if python subprocess is killed

Currently, if a subprocess of a python test (i.e. qemu-io, qemu-img, or
qemu) receives a signal and is subsequently aborted, this is not logged.

This patch makes python tests always check the exit code of these
subprocesses, and emit a message if they have been killed.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 355ee2d0e8ca536a6278c9c763ddd2f136eace3f
      
https://github.com/qemu/qemu/commit/355ee2d0e8ca536a6278c9c763ddd2f136eace3f
  Author: Alberto Garcia <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M block/qcow2-cache.c

  Log Message:
  -----------
  qcow2: mark the memory as no longer needed after qcow2_cache_empty()

After having emptied the cache, the data in the cache tables is no
longer useful, so we can tell the kernel that we are done with it. In
Linux this frees the resources associated with it.

The effect of this can be seen in the HMP commit operation: it moves
data from the top to the base image (and fills both caches), then it
empties the top image. At this point the data in that cache is no
longer needed so it's just wasting memory.

Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 279621c046ce57de0af9e3c00663b48d3a7835ae
      
https://github.com/qemu/qemu/commit/279621c046ce57de0af9e3c00663b48d3a7835ae
  Author: Alberto Garcia <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M block/qcow2-cache.c
    M block/qcow2.c
    M block/qcow2.h
    M qapi/block-core.json

  Log Message:
  -----------
  qcow2: add option to clean unused cache entries after some time

This adds a new 'cache-clean-interval' option that cleans all qcow2
cache entries that haven't been used in a certain interval, given in
seconds.

This allows setting a large L2 cache size so it can handle scenarios
with lots of I/O and at the same time use little memory during periods
of inactivity.

This feature currently relies on MADV_DONTNEED to free that memory, so
it is not useful in systems that don't follow that behavior.

Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 7f65ce834accce0b7e4bc79313bacf229b957783
      
https://github.com/qemu/qemu/commit/7f65ce834accce0b7e4bc79313bacf229b957783
  Author: Alberto Garcia <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    A docs/qcow2-cache.txt

  Log Message:
  -----------
  docs: document how to configure the qcow2 L2/refcount caches

QEMU has options to configure the size of the L2 and refcount
caches for the qcow2 format. However, choosing the right sizes for
a particular disk image is not a straightforward operation since
the ratio between the cache size and the allocated disk space is
not obvious and depends on the size of the cluster and the refcount
entries.

This document attempts to give an overview of both caches and how to
configure their sizes.

Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 909c260c71d1bee7018e17034580ffd0743508db
      
https://github.com/qemu/qemu/commit/909c260c71d1bee7018e17034580ffd0743508db
  Author: Alberto Garcia <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M block/qcow2-cache.c

  Log Message:
  -----------
  qcow2: reorder fields in Qcow2CachedTable to reduce padding

Changing the current ordering saves 8 bytes per cache entry in x86_64.

Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>


  Commit: 834cb2ada5db197a11c99142d50222945d196fc0
      
https://github.com/qemu/qemu/commit/834cb2ada5db197a11c99142d50222945d196fc0
  Author: Wen Congyang <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  quorum: validate vote threshold against num_children even if read-pattern is 
fifo

We need to use threshold to check if too many write operation fails.
If threshold is larger than num children, we always get write error
event even if all write operations success.

Signed-off-by: Wen Congyang <address@hidden>
Message-id: address@hidden
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: c804b5791d51608c0e12e4cc2b40b3d763ce796c
      
https://github.com/qemu/qemu/commit/c804b5791d51608c0e12e4cc2b40b3d763ce796c
  Author: Kevin Wolf <address@hidden>
  Date:   2015-09-04 (Fri, 04 Sep 2015)

  Changed paths:
    M block/qcow2-cache.c
    M block/qcow2.c
    M block/qcow2.h
    M block/quorum.c
    A docs/qcow2-cache.txt
    M qapi/block-core.json

  Log Message:
  -----------
  Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2015-09-04' 
into queue-block

Block patches from 2015-08-24 until 2015-09-04.

# gpg: Signature made Fri Sep  4 21:02:10 2015 CEST using RSA key ID E838ACAD
# gpg: Good signature from "Max Reitz <address@hidden>"

* mreitz/tags/pull-block-for-kevin-2015-09-04:
  quorum: validate vote threshold against num_children even if read-pattern is 
fifo
  qcow2: reorder fields in Qcow2CachedTable to reduce padding
  docs: document how to configure the qcow2 L2/refcount caches
  qcow2: add option to clean unused cache entries after some time
  qcow2: mark the memory as no longer needed after qcow2_cache_empty()

Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4169198617dc8d3e80697964b91eaea551e7f956
      
https://github.com/qemu/qemu/commit/4169198617dc8d3e80697964b91eaea551e7f956
  Author: Peter Maydell <address@hidden>
  Date:   2015-09-07 (Mon, 07 Sep 2015)

  Changed paths:
    M block/qcow2-cache.c
    M block/qcow2.c
    M block/qcow2.h
    M block/quorum.c
    M block/raw-posix.c
    A docs/qcow2-cache.txt
    M qapi/block-core.json
    M qemu-img.c
    M tests/qemu-iotests/039
    M tests/qemu-iotests/039.out
    M tests/qemu-iotests/041
    M tests/qemu-iotests/049.out
    M tests/qemu-iotests/055
    M tests/qemu-iotests/061
    M tests/qemu-iotests/061.out
    M tests/qemu-iotests/067
    M tests/qemu-iotests/067.out
    M tests/qemu-iotests/071.out
    M tests/qemu-iotests/081.out
    M tests/qemu-iotests/087.out
    M tests/qemu-iotests/130
    M tests/qemu-iotests/130.out
    M tests/qemu-iotests/check
    M tests/qemu-iotests/common
    M tests/qemu-iotests/common.config
    M tests/qemu-iotests/common.qemu
    M tests/qemu-iotests/common.rc
    M tests/qemu-iotests/iotests.py
    M util/qemu-option.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block layer patches

# gpg: Signature made Fri 04 Sep 2015 20:45:33 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"

* remotes/kevin/tags/for-upstream:
  quorum: validate vote threshold against num_children even if read-pattern is 
fifo
  qcow2: reorder fields in Qcow2CachedTable to reduce padding
  docs: document how to configure the qcow2 L2/refcount caches
  qcow2: add option to clean unused cache entries after some time
  qcow2: mark the memory as no longer needed after qcow2_cache_empty()
  iotests: Warn if python subprocess is killed
  iotests: Do not suppress segfaults in bash tests
  iotests: Respect -nodefaults in tests 41 and 55
  iotests: More options for VM.add_drive()
  qemu-img: Fix crash in amend invocation
  block/raw-posix: Use raw_normalize_devicepath()
  qemu-iotests: s390x: fix test 130
  qemu-iotests: s390x: fix test 049, reject negative sizes in QemuOpts
  qemu-iotests: s390x: fix test 041 and 055
  qemu-iotests: disable default qemu devices for cross-platform compatibility
  qemu-iotests: qemu machine type support

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


Compare: https://github.com/qemu/qemu/compare/298fae38972c...4169198617dc

reply via email to

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