qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] af74e8: iotests: fix the broken 026.nocache o


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] af74e8: iotests: fix the broken 026.nocache output
Date: Tue, 12 Apr 2016 11:00:04 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: af74e865c40d00c12e5fd0c556d7812305930b24
      
https://github.com/qemu/qemu/commit/af74e865c40d00c12e5fd0c556d7812305930b24
  Author: Pavel Butsykin <address@hidden>
  Date:   2016-04-12 (Tue, 12 Apr 2016)

  Changed paths:
    M tests/qemu-iotests/026.out.nocache

  Log Message:
  -----------
  iotests: fix the broken 026.nocache output

This patch fixes longstanding issue with 026 iotest. Unfortunately,
this test contains 2 versions of the correct output, one for cached
writes and one for non-cached ones. People tends to fix only one
version of output of the test and thus noncached version becomes
broken. Unfortunately, it is default in tests/check-block.sh

The following problematic commits were made:
    commit 3b5e14c76a6bb142bf250ddf99e24a0ac8c7bc12
    Author: Max Reitz <address@hidden>
    Date:   Tue Dec 2 18:32:51 2014 +0100
    qcow2: Flushing the caches in qcow2_close may fail

    commit a069e2f1372a0a823ab506fc019852a2a652aa54
    Author: John Snow <address@hidden>
    Date:   Fri Feb 6 16:26:17 2015 -0500
    blkdebug: fix "once" rule

    commit b106ad9185f35fc4ad669555ad0e79e276083bd7
    Author: Kevin Wolf <address@hidden>
    Date:   Fri Mar 28 18:06:31 2014 +0100
    qcow2: Don't rely on free_cluster_index in alloc_refcount_block()

Signed-off-by: Pavel Butsykin <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
CC: Max Reitz <address@hidden>
CC: John Snow <address@hidden>
CC: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 143605a200f9d418d62d25d91b1477b1d91c0b18
      
https://github.com/qemu/qemu/commit/143605a200f9d418d62d25d91b1477b1d91c0b18
  Author: Daniel P. Berrange <address@hidden>
  Date:   2016-04-12 (Tue, 12 Apr 2016)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: fix formatting of error message

The error_reportf_err() will not automatically append a
': ' before adding its suffix, so we must include that
in the message we pass it, otherwise we get a badly
formatted message lacking whitespace:

qemu-img: Could not open 
'driver=nbd,host=127.0.0.1,port=6666,tls-creds=tls0'Failed to connect socket: 
Connection refused

Signed-off-by: Daniel P. Berrange <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c229708848cc77b0277e7260f7e739d441c1d086
      
https://github.com/qemu/qemu/commit/c229708848cc77b0277e7260f7e739d441c1d086
  Author: Daniel P. Berrange <address@hidden>
  Date:   2016-04-12 (Tue, 12 Apr 2016)

  Changed paths:
    M qemu-img.c
    M qemu-io.c
    M qemu-nbd.c

  Log Message:
  -----------
  block: initialize qcrypto API at startup

Any programs which call the qcrypto APIs should ensure that
qcrypto_init() has been called before anything else which
can use crypto. Essentially this means right at the start
of the main method before initializing anything else.

This is important because some versions of gnutls/gcrypt
require explicit initialization before use.

Signed-off-by: Daniel P. Berrange <address@hidden>
Reviewed-by: Alex Bligh <address@hidden>
Tested-by: Alex Bligh <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 1fd06db03da73db868e54b838bb5ea02c10eea6c
      
https://github.com/qemu/qemu/commit/1fd06db03da73db868e54b838bb5ea02c10eea6c
  Author: Max Reitz <address@hidden>
  Date:   2016-04-12 (Tue, 12 Apr 2016)

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

  Log Message:
  -----------
  iotests: Make 150 use qemu-img map instead of du

The actual on-disk size of a file does not only depend on factors qemu
can control. Thus, we should not depend on this to determine whether a
file has indeed been fully allocated. Instead, use qemu-img map and hope
that if an area is referenced, it is indeed allocated, too.

Also, limit the supported image formats to raw and qcow2 because the
actual qemu-img map output may depend on the image format.

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


  Commit: 40a99aace3f9ffd65af07a89c381db3550b22316
      
https://github.com/qemu/qemu/commit/40a99aace3f9ffd65af07a89c381db3550b22316
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-04-12 (Tue, 12 Apr 2016)

  Changed paths:
    M block/vpc.c

  Log Message:
  -----------
  vpc: fix return value check for blk_pwrite

bdrv_pwrite_sync used to return zero or negative error, while blk_pwrite returns
the number of written bytes when successful.  This caused VPC image creation
to fail spectacularly: it wrote the first 512 bytes, and then exited immediately
because of the non-zero answer from blk_pwrite.  But the truly spectacular part
is that it returns a positive value (the 512 that blk_pwrite returned) causing
everyone to believe that it succeeded.

This fixes qemu-iotests with vpc format.

Fixes: b8f45cdf7827e39f9a1e6cc446f5972cc6144237
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 4e876bcf2bdb3a7353df92d19bfec0afd1650bc4
      
https://github.com/qemu/qemu/commit/4e876bcf2bdb3a7353df92d19bfec0afd1650bc4
  Author: Max Reitz <address@hidden>
  Date:   2016-04-12 (Tue, 12 Apr 2016)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: Prevent backing file names longer than 1023

We reject backing file names with a length of more than 1023 characters
when opening a qcow2 file, so we should not produce such files
ourselves.

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


  Commit: c4189d85bcdaa27a9ec892146a652092fec704d0
      
https://github.com/qemu/qemu/commit/c4189d85bcdaa27a9ec892146a652092fec704d0
  Author: Max Reitz <address@hidden>
  Date:   2016-04-12 (Tue, 12 Apr 2016)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Block layer core, qcow2 and blkdebug

As agreed with Kevin and already practiced for a while, I am adding
myself as co-maintainer of the block layer core, qcow2 and blkdebug.

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


  Commit: 0145b4e130994fab778b38a490e7d72ffb740589
      
https://github.com/qemu/qemu/commit/0145b4e130994fab778b38a490e7d72ffb740589
  Author: Sascha Silbe <address@hidden>
  Date:   2016-04-12 (Tue, 12 Apr 2016)

  Changed paths:
    M tests/qemu-iotests/check

  Log Message:
  -----------
  qemu-iotests: check: don't place files with predictable names in /tmp

Placing files with predictable or even hard-coded names in /tmp is a
security risk and can prevent or disturb operation on a multi-user
machine. Place them inside the "scratch" directory instead, as we
already do for most other test-related files.

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


  Commit: 1759386b7cfdd36f11cb4228d2237468814b0989
      
https://github.com/qemu/qemu/commit/1759386b7cfdd36f11cb4228d2237468814b0989
  Author: Sascha Silbe <address@hidden>
  Date:   2016-04-12 (Tue, 12 Apr 2016)

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

  Log Message:
  -----------
  qemu-iotests: fix 051 on non-PC architectures

Commit 61de4c68 [block: Remove BDRV_O_CACHE_WB] updated the reference
output for PCs, but neglected to do the same for the generic reference
output file. Fix 051 on all non-PC architectures by applying the same
change to the generic output file.

Fixes: 61de4c68 ("block: Remove BDRV_O_CACHE_WB")
Signed-off-by: Sascha Silbe <address@hidden>
Reviewed-by: Bo Tu <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: c1c71e49bcf8a0e6f5ba2a41845678d4954c8106
      
https://github.com/qemu/qemu/commit/c1c71e49bcf8a0e6f5ba2a41845678d4954c8106
  Author: Sascha Silbe <address@hidden>
  Date:   2016-04-12 (Tue, 12 Apr 2016)

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

  Log Message:
  -----------
  qemu-iotests: iotests.VM: remove qtest socket on error

On error, VM.launch() cleaned up the monitor unix socket, but left the
qtest unix socket behind. This caused the remaining sub-tests to fail
with EADDRINUSE:

+======================================================================
+ERROR: testQuorum (__main__.TestFifoQuorumEvents)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "148", line 63, in setUp
+    self.vm.launch()
+  File "/home6/silbe/qemu/tests/qemu-iotests/iotests.py", line 247, in launch
+    self._qmp.accept()
+  File "/home6/silbe/qemu/tests/qemu-iotests/../../scripts/qmp/qmp.py", line 
141, in accept
+    return self.__negotiate_capabilities()
+  File "/home6/silbe/qemu/tests/qemu-iotests/../../scripts/qmp/qmp.py", line 
57, in __negotiate_capabilities
+    raise QMPConnectError
+QMPConnectError
+
+======================================================================
+ERROR: testQuorum (__main__.TestQuorumEvents)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "148", line 63, in setUp
+    self.vm.launch()
+  File "/home6/silbe/qemu/tests/qemu-iotests/iotests.py", line 244, in launch
+    self._qtest = qtest.QEMUQtestProtocol(self._qtest_path, server=True)
+  File "/home6/silbe/qemu/tests/qemu-iotests/../../scripts/qtest.py", line 33, 
in __init__
+    self._sock.bind(self._address)
+  File "/usr/lib64/python2.7/socket.py", line 224, in meth
+    return getattr(self._sock,name)(*args)
+error: [Errno 98] Address already in use

Fix this by cleaning up both the monitor socket and the qtest socket iff
they exist.

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


  Commit: 3f647b510f1f68e549425cd9671b1aa63c93ec3c
      
https://github.com/qemu/qemu/commit/3f647b510f1f68e549425cd9671b1aa63c93ec3c
  Author: Sascha Silbe <address@hidden>
  Date:   2016-04-12 (Tue, 12 Apr 2016)

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

  Log Message:
  -----------
  qemu-iotests: 148: properly skip test if quorum support is missing

qemu-iotests test case 148 already had some code for skipping the test
if quorum support is missing, but it didn't work in all
cases. TestQuorumEvents.setUp() gets run before the actual test class
(which contains the skipping code) and tries to start qemu with a drive
using the quorum driver. For some reason this works fine when using
qcow2, but fails for raw.

As the entire test case requires quorum, just check for availability
before even starting the test suite. Introduce a verify_quorum()
function in iotests.py for this purpose so future test cases can make
use of it.

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


  Commit: 9bf8027dde31923b08a09d5cf2ddd47efe9146e8
      
https://github.com/qemu/qemu/commit/9bf8027dde31923b08a09d5cf2ddd47efe9146e8
  Author: Sascha Silbe <address@hidden>
  Date:   2016-04-12 (Tue, 12 Apr 2016)

  Changed paths:
    M tests/qemu-iotests/068

  Log Message:
  -----------
  qemu-iotests: 068: don't require KVM

None of the other test cases explicitly enable KVM and there's no
obvious reason for 068 to require it. Drop this so all test cases can be
executed in environments where KVM is not available (e.g. because the
user doesn't have sufficient permissions to access /dev/kvm).

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


  Commit: 3ef3dcef563e231a13543264975b9ef75080f9b3
      
https://github.com/qemu/qemu/commit/3ef3dcef563e231a13543264975b9ef75080f9b3
  Author: Sascha Silbe <address@hidden>
  Date:   2016-04-12 (Tue, 12 Apr 2016)

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

  Log Message:
  -----------
  qemu-iotests: iotests.py: get rid of __all__

The __all__ list contained a typo for as long as the iotests module
existed. That typo prevented "from iotests import *" (which is the
only case where iotests.__all__ is used at all) from ever working.

The names used by iotests are highly prone to name collisions, so
importing them all unconditionally is a bad idea anyway. Since __all__
is not adding any value, let's just get rid of it.

Fixes: f345cfd0 ("qemu-iotests: add iotests Python module")
Signed-off-by: Sascha Silbe <address@hidden>
Reviewed-by: Bo Tu <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: 5158ac58306b3e8644fc020730f651fe74aa6674
      
https://github.com/qemu/qemu/commit/5158ac58306b3e8644fc020730f651fe74aa6674
  Author: Kevin Wolf <address@hidden>
  Date:   2016-04-12 (Tue, 12 Apr 2016)

  Changed paths:
    M tests/qemu-iotests/051.out
    M tests/qemu-iotests/068
    M tests/qemu-iotests/148
    M tests/qemu-iotests/check
    M tests/qemu-iotests/iotests.py

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

Block patches for 2.6-rc2.

# gpg: Signature made Tue Apr 12 18:08:20 2016 CEST using RSA key ID E838ACAD
# gpg: Good signature from "Max Reitz <address@hidden>"

* mreitz/tags/pull-block-for-kevin-2016-04-12:
  qemu-iotests: iotests.py: get rid of __all__
  qemu-iotests: 068: don't require KVM
  qemu-iotests: 148: properly skip test if quorum support is missing
  qemu-iotests: iotests.VM: remove qtest socket on error
  qemu-iotests: fix 051 on non-PC architectures
  qemu-iotests: check: don't place files with predictable names in /tmp

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


  Commit: d44122ecd0fa62d20762bdd8f214f077cb8e011b
      
https://github.com/qemu/qemu/commit/d44122ecd0fa62d20762bdd8f214f077cb8e011b
  Author: Peter Maydell <address@hidden>
  Date:   2016-04-12 (Tue, 12 Apr 2016)

  Changed paths:
    M MAINTAINERS
    M block/qcow2.c
    M block/vpc.c
    M qemu-img.c
    M qemu-io.c
    M qemu-nbd.c
    M tests/qemu-iotests/026.out.nocache
    M tests/qemu-iotests/051.out
    M tests/qemu-iotests/068
    M tests/qemu-iotests/148
    M tests/qemu-iotests/150
    M tests/qemu-iotests/150.out
    M tests/qemu-iotests/check
    M tests/qemu-iotests/iotests.py

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

Block layer patches for 2.6

# gpg: Signature made Tue 12 Apr 2016 17:10:29 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"

* remotes/kevin/tags/for-upstream:
  qemu-iotests: iotests.py: get rid of __all__
  qemu-iotests: 068: don't require KVM
  qemu-iotests: 148: properly skip test if quorum support is missing
  qemu-iotests: iotests.VM: remove qtest socket on error
  qemu-iotests: fix 051 on non-PC architectures
  qemu-iotests: check: don't place files with predictable names in /tmp
  MAINTAINERS: Block layer core, qcow2 and blkdebug
  qcow2: Prevent backing file names longer than 1023
  vpc: fix return value check for blk_pwrite
  iotests: Make 150 use qemu-img map instead of du
  block: initialize qcrypto API at startup
  qemu-img: fix formatting of error message
  iotests: fix the broken 026.nocache output

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


Compare: https://github.com/qemu/qemu/compare/42bb626f7ebc...d44122ecd0fa

reply via email to

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