qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 645acd: iotests: Fix test 156


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 645acd: iotests: Fix test 156
Date: Tue, 01 Aug 2017 10:01:29 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 645acdc0e66277712c7af8a7d8de6a62dc5eb48a
      
https://github.com/qemu/qemu/commit/645acdc0e66277712c7af8a7d8de6a62dc5eb48a
  Author: Max Reitz <address@hidden>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

  Changed paths:
    M tests/qemu-iotests/156

  Log Message:
  -----------
  iotests: Fix test 156

On one hand, the _make_test_img invocation for creating the target image
was missing a -u because its backing file is not supposed to exist at
that point.

On the other hand, nobody noticed probably because the backing file is
created later on and _cleanup failed to remove it: The quotation marks
were misplaced so bash tried to delete a file literally called
"$TEST_IMG{,.target}..." instead of performing brace expansion. Thus, the
files stayed around after the first run and qemu-img create did not
complain about a missing backing file on any run but the first.

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


  Commit: c09bd34d820d686c18a59cf3d4261240167db695
      
https://github.com/qemu/qemu/commit/c09bd34d820d686c18a59cf3d4261240167db695
  Author: Max Reitz <address@hidden>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

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

  Log Message:
  -----------
  iotests: Redirect stderr to stdout in 186

Without redirecting qemu's stderr to stdout, _filter_qemu will not apply
to warnings.  This results in $QEMU_PROG not being replaced by QEMU_PROG
which is not great if your qemu executable is not called
qemu-system-x86_64 (e.g. qemu-system-i386).

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


  Commit: 1e2b1f6487ae26256a42f017fc1b06e19bb98f5a
      
https://github.com/qemu/qemu/commit/1e2b1f6487ae26256a42f017fc1b06e19bb98f5a
  Author: Eric Blake <address@hidden>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

  Changed paths:
    M tests/qemu-iotests/124

  Log Message:
  -----------
  iotests: Check dirty bitmap statistics in 124

We had a bug for multiple releases where dirty-bitmap count was
documented in bytes but reported in sectors; enhance the testsuite
to add coverage of DirtyBitmapInfo to ensure we do not regress again.

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: b81b74bfb2ea3d23dc06cb0c84841dbea201b8de
      
https://github.com/qemu/qemu/commit/b81b74bfb2ea3d23dc06cb0c84841dbea201b8de
  Author: Eric Blake <address@hidden>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

  Changed paths:
    A tests/qemu-iotests/190
    A tests/qemu-iotests/190.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  iotests: Add test of recent fix to 'qemu-img measure'

The new test 190 ensures we don't regress back to an infinite loop when
measuring the size of a 2T+ qcow2 image.  I did not append to test 178,
because that test is also designed to run with format 'raw'; also, this
gives us some coverage of the measure command under the quick group.

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 998cbd6a44cd96044f56713274bdf6a94cd721c0
      
https://github.com/qemu/qemu/commit/998cbd6a44cd96044f56713274bdf6a94cd721c0
  Author: Manos Pitsidianakis <address@hidden>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: fix dangling bs->explicit_options in block.c

In some error paths it is possible to QDECREF a freed dangling
explicit_options, resulting in a heap overflow crash.  For example
bdrv_open_inherit()'s fail unrefs it, then calls bdrv_unref which calls
bdrv_close which also unrefs it.

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


  Commit: 180ca19ae02be70f9b158bfd7dec1ff123b9cf8c
      
https://github.com/qemu/qemu/commit/180ca19ae02be70f9b158bfd7dec1ff123b9cf8c
  Author: Manos Pitsidianakis <address@hidden>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: fix leaks in bdrv_open_driver()

bdrv_open_driver() is called in two places, bdrv_new_open_driver() and
bdrv_open_common(). In the latter, failure cleanup in is in its caller,
bdrv_open_inherit(), which unrefs the bs->file of the failed driver open
if it exists.

Let's move the bs->file cleanup to bdrv_open_driver() to take care of
all callers and do not set bs->drv to NULL unless the driver's open
function failed. When bs is destroyed by removing its last reference, it
calls bdrv_close() which checks bs->drv to perform the needed cleanups
and also call the driver's close function. Since it cleans up options
and opaque we must take care not leave dangling pointers.

The error paths in bdrv_open_driver() are now two:
If open fails, drv->bdrv_close() should not be called. Unref the child
if it exists, free what we allocated and set bs->drv to NULL. Return the
error and let callers free their stuff.

If open succeeds but we fail after, return the error and let callers
unref and delete their bs, while cleaning up their allocations.

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


  Commit: db11d1ee85497e9e581f632d319b55e43f752baf
      
https://github.com/qemu/qemu/commit/db11d1ee85497e9e581f632d319b55e43f752baf
  Author: Kevin Wolf <address@hidden>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

  Changed paths:
    M tests/qemu-iotests/041

  Log Message:
  -----------
  qemu-iotests/041: Fix leaked scratch images

qemu-iotests 041 left quorum_snapshot.img and target.img behind in the
scratch directory. Make sure to clean up after completing the tests.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 0e5960761d5e804df48bb85c435e2c92f616b140
      
https://github.com/qemu/qemu/commit/0e5960761d5e804df48bb85c435e2c92f616b140
  Author: Kevin Wolf <address@hidden>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

  Changed paths:
    M tests/qemu-iotests/074
    M tests/qemu-iotests/179

  Log Message:
  -----------
  qemu-iotests: Remove blkdebug.conf after tests

qemu-iotests 074 and 179 left a blkdebug.conf behind in the scratch
directory. Make sure to clean up after completing the tests.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 0a1505d56a7811244d3cd59cece7cc2bd8286197
      
https://github.com/qemu/qemu/commit/0a1505d56a7811244d3cd59cece7cc2bd8286197
  Author: Kevin Wolf <address@hidden>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

  Changed paths:
    M tests/qemu-iotests/141

  Log Message:
  -----------
  qemu-iotests/141: Fix image cleanup

qemu-iotests 141 attempted to use brace expansion to remove all images
with a single command. However, for this to work, the braces shouldn't
be quoted.

With this fix, the tests correctly cleans up its scratch images.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 6a1e9096206f65525d1fec418b91d5ac82c77934
      
https://github.com/qemu/qemu/commit/6a1e9096206f65525d1fec418b91d5ac82c77934
  Author: Kevin Wolf <address@hidden>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

  Changed paths:
    M tests/qemu-iotests/153

  Log Message:
  -----------
  qemu-iotests/153: Fix leaked scratch images

qemu-iotests 153 left t.qcow2.c behind in the scratch directory. Make
sure to clean it up after completing the tests.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: a8e9c8480e30ee91d05ea096016526af46b1337e
      
https://github.com/qemu/qemu/commit/a8e9c8480e30ee91d05ea096016526af46b1337e
  Author: Kevin Wolf <address@hidden>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

  Changed paths:
    M tests/qemu-iotests/162

  Log Message:
  -----------
  qemu-iotests/162: Fix leaked temporary files

qemu-iotests 162 left qemu-nbd.pid behind in the scratch directory, and
potentially a file called '42' in the current directory. Make sure to
clean it up after completing the tests.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 1803f3f6cfcc900e185a7b94652b7f0f026038f9
      
https://github.com/qemu/qemu/commit/1803f3f6cfcc900e185a7b94652b7f0f026038f9
  Author: Kevin Wolf <address@hidden>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

  Changed paths:
    M tests/qemu-iotests/063

  Log Message:
  -----------
  qemu-iotests/063: Fix leaked image

qemu-iotests 063 left t.raw.raw1 behind in the scratch directory because
it used the wrong suffix. Make sure to clean it up after completing the
test.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 59fa68f3f39cc596f93205f0862c8978c503f2c8
      
https://github.com/qemu/qemu/commit/59fa68f3f39cc596f93205f0862c8978c503f2c8
  Author: Kevin Wolf <address@hidden>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

  Changed paths:
    M tests/qemu-iotests/059
    M tests/qemu-iotests/059.out
    M tests/qemu-iotests/common.rc

  Log Message:
  -----------
  qemu-iotests/059: Fix leaked image files

qemu-iotests 059 left a whole lot of image files behind in the scratch
directory because VMDK creates additional files for extents and cleaning
them up requires the original image intact (it parses qemu-img info
output to find all extent files), but the image overwrote it many times
like it works for all other image formats.

In addition, _use_sample_img overwrites the TEST_IMG variable, causing
new images created afterwards to reuse the name of the sample file
rather than the usual t.IMGFMT.

This patch adds an intermediate _cleanup_test_img after each subtest
that created an image file with additional extent files, and also after
each use of a sample image. _cleanup_test_img is also changed so that it
resets TEST_IMG after a sample image is cleaned up.

Note that this test was failing before this commit and continues to do
so after it. This failure was introduced in commit 9877860 ('block/vmdk:
Report failures in vmdk_read_cid()') and needs to be dealt with
separately.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 8e8eb0a9035e5b6c6447c82138570e388282cfa2
      
https://github.com/qemu/qemu/commit/8e8eb0a9035e5b6c6447c82138570e388282cfa2
  Author: Kevin Wolf <address@hidden>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

  Changed paths:
    M block/qapi.c

  Log Message:
  -----------
  block/qapi: Remove redundant NULL check to silence Coverity

When skipping implicit nodes in bdrv_block_device_info(), we know that
bs0 is always non-NULL; initially, because it's taken from a BdrvChild
and a BdrvChild never has a NULL bs, and after the first iteration
because implicit nodes always have a backing file.

Remove the NULL check and add an assertion that the implicit node does
indeed have a backing file.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>


  Commit: 3b64f272d36b310587e606217db92b0bcb6673a1
      
https://github.com/qemu/qemu/commit/3b64f272d36b310587e606217db92b0bcb6673a1
  Author: Peter Maydell <address@hidden>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

  Changed paths:
    M block.c
    M block/qapi.c
    M tests/qemu-iotests/041
    M tests/qemu-iotests/059
    M tests/qemu-iotests/059.out
    M tests/qemu-iotests/063
    M tests/qemu-iotests/074
    M tests/qemu-iotests/124
    M tests/qemu-iotests/141
    M tests/qemu-iotests/153
    M tests/qemu-iotests/156
    M tests/qemu-iotests/162
    M tests/qemu-iotests/179
    M tests/qemu-iotests/186
    M tests/qemu-iotests/186.out
    A tests/qemu-iotests/190
    A tests/qemu-iotests/190.out
    M tests/qemu-iotests/common.rc
    M tests/qemu-iotests/group

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

Block layer patches for 2.10.0-rc1

# gpg: Signature made Tue 01 Aug 2017 17:10:52 BST
# gpg:                using RSA key 0x7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream:
  block/qapi: Remove redundant NULL check to silence Coverity
  qemu-iotests/059: Fix leaked image files
  qemu-iotests/063: Fix leaked image
  qemu-iotests/162: Fix leaked temporary files
  qemu-iotests/153: Fix leaked scratch images
  qemu-iotests/141: Fix image cleanup
  qemu-iotests: Remove blkdebug.conf after tests
  qemu-iotests/041: Fix leaked scratch images
  block: fix leaks in bdrv_open_driver()
  block: fix dangling bs->explicit_options in block.c
  iotests: Add test of recent fix to 'qemu-img measure'
  iotests: Check dirty bitmap statistics in 124
  iotests: Redirect stderr to stdout in 186
  iotests: Fix test 156

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


Compare: https://github.com/qemu/qemu/compare/7d48cf8102a1...3b64f272d36b

reply via email to

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