qemu-devel
[Top][All Lists]
Advanced

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

[PATCH v2 0/2] block: report errno when flock fcntl fails


From: David Edmondson
Subject: [PATCH v2 0/2] block: report errno when flock fcntl fails
Date: Mon, 21 Dec 2020 13:49:29 +0000

As Kevin pointed out, adding the error reported by fcntl to the
reported error required updates to the tests.

When running the tests there were lots of failures due to output
comparison problems, such as:

@@ -6,7 +6,9 @@
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE
 { 'execute': 'qmp_capabilities' }
 {"return": {}}
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 
'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}}
+{'execute':'drive-mirror', 'arguments':{
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT',
+            'mode': 'existing', 'sync': 'full'}}
 WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing 
guessed raw.
          Automatically detecting the format is dangerous for raw images, write 
operations on block 0 will be restricted.
          Specify the 'raw' format explicitly to remove the restrictions.

To avoid this, the second patch flattens the input command that will
be sent to the tool before it is echoed back for later comparison.

v2:
- Update the tests appropriately (Kevin).
- Removed qemu-trivial given that there was debate.
- Filter the input echoed before sending to qemu* during testing such
  that comparisons succeed.

David Edmondson (2):
  block: report errno when flock fcntl fails
  tests: Collapse echoed JSON input to a single line

 block/file-posix.c               | 20 ++++-----
 tests/qemu-iotests/153.out       | 76 ++++++++++++++++----------------
 tests/qemu-iotests/182.out       |  2 +-
 tests/qemu-iotests/common.filter |  6 +++
 tests/qemu-iotests/common.qemu   |  2 +-
 5 files changed, 56 insertions(+), 50 deletions(-)

-- 
2.29.2




reply via email to

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