qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] block: report errno when flock fcntl fails
@ 2020-12-21 13:49 David Edmondson
  2020-12-21 13:49 ` [PATCH v2 1/2] " David Edmondson
  2020-12-21 13:49 ` [PATCH v2 2/2] tests: Collapse echoed JSON input to a single line David Edmondson
  0 siblings, 2 replies; 8+ messages in thread
From: David Edmondson @ 2020-12-21 13:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, David Edmondson, qemu-block, Max Reitz

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-01-06 17:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-21 13:49 [PATCH v2 0/2] block: report errno when flock fcntl fails David Edmondson
2020-12-21 13:49 ` [PATCH v2 1/2] " David Edmondson
2020-12-22 14:31   ` Philippe Mathieu-Daudé
2021-01-06  9:48   ` Max Reitz
2021-01-06 11:58     ` David Edmondson
2020-12-21 13:49 ` [PATCH v2 2/2] tests: Collapse echoed JSON input to a single line David Edmondson
2021-01-06  9:49   ` Max Reitz
2021-01-06 17:20     ` David Edmondson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).