qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 9a76bd: nbd: Fix iotests failure due to chang


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 9a76bd: nbd: Fix iotests failure due to changed client err...
Date: Tue, 18 Jul 2017 12:23:23 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 9a76bd783d0421962e8c65bb853a57eef4897720
      
https://github.com/qemu/qemu/commit/9a76bd783d0421962e8c65bb853a57eef4897720
  Author: Eric Blake <address@hidden>
  Date:   2017-07-17 (Mon, 17 Jul 2017)

  Changed paths:
    M nbd/client.c
    M tests/qemu-iotests/140.out
    M tests/qemu-iotests/143.out

  Log Message:
  -----------
  nbd: Fix iotests failure due to changed client error message

Commit 8ecaeae8 changed the way the client requests an NBD export,
and in the process also changed the resulting error message when
the export is not present, breaking a couple of iotests.  The error
message is now directly given by the server (a failed NBD_OPT_GO)
instead of implied by the client (after exhausting NBD_OPT_LIST),
but looking at the testsuite changes, it proves worthwhile to
reword the error message to be slightly less verbose (as this is
one particular error message likely to be hit by a user).

Note that the error message is now sensitive to which binary is
running the server as well as the client (since the expected
output is replaying a message received from the server - for that
matter, it depends on a server new enough to understand NBD_OPT_GO);
in general iotests are run on client and server from the same source
code base so the default setup will pass; but if it proves
problematic for people overriding QEMU_PROG, QEMU_IMG_PROG,
QEMU_IO_PROG, and QEMU_NBD_PROG to point across multiple builds for
cross-version integration testing, we may have to later tweak or
sanitize the output somehow.

Reported-by: Kevin Wolf <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Tested-by: John Snow <address@hidden>
Reviewed-by: John Snow <address@hidden>


  Commit: 48000eb3ecfc91f6588dfafba51d57e7f8f28b7e
      
https://github.com/qemu/qemu/commit/48000eb3ecfc91f6588dfafba51d57e7f8f28b7e
  Author: Eric Blake <address@hidden>
  Date:   2017-07-17 (Mon, 17 Jul 2017)

  Changed paths:
    M nbd/client.c
    M nbd/trace-events

  Log Message:
  -----------
  nbd: Trace client command being sent

Make the client trace slightly more legible by including the name
of the command being sent.

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: John Snow <address@hidden>
Message-Id: <address@hidden>


  Commit: 5f66d060dbc37214c9d70305710c3e34c4531d7c
      
https://github.com/qemu/qemu/commit/5f66d060dbc37214c9d70305710c3e34c4531d7c
  Author: Eric Blake <address@hidden>
  Date:   2017-07-17 (Mon, 17 Jul 2017)

  Changed paths:
    M nbd/nbd-internal.h
    M nbd/server.c

  Log Message:
  -----------
  nbd: Fix server reply to NBD_OPT_EXPORT_NAME of older clients

A typo in commit 23e099c set the size of buf[] used in response
to NBD_OPT_EXPORT_NAME according to the length needed for old-style
negotiation (4 bytes of flag information) instead of the intended
2 bytes used in new style.  If the client doesn't enable
NBD_FLAG_C_NO_ZEROES, then the server sends two bytes too many,
and is then out of sync in response to the client's next command
(the bug is masked when modern qemu is the client, since we enable
the no zeroes flag).

While touching this code, add some more defines to nbd_internal.h
rather than having quite so many magic numbers in the .c; also,
use "" initialization rather than memset(), and tweak the oldstyle
negotiation to better match the spec description of the layout
(since the spec is big-endian, skipping two bytes as 0 followed by
writing a 2-byte flag is the same as writing a zero-extended 4-byte
flag), to make it a bit easier to follow compared to the spec.

[checkpatch.pl has some false positives in the comments]

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: John Snow <address@hidden>


  Commit: 20df6c7689eb89ab48fa5d5766d5c724c818148e
      
https://github.com/qemu/qemu/commit/20df6c7689eb89ab48fa5d5766d5c724c818148e
  Author: Peter Maydell <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M nbd/client.c
    M nbd/nbd-internal.h
    M nbd/server.c
    M nbd/trace-events
    M tests/qemu-iotests/140.out
    M tests/qemu-iotests/143.out

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2017-07-17' into 
staging

nbd patches for 2017-07-17

- Eric Blake: nbd: Fix iotests failure due to changed client error message
- Eric Blake: [0/2] NBD fixes before softfreeze

# gpg: Signature made Mon 17 Jul 2017 23:12:20 BST
# gpg:                using RSA key 0xA7A16B4A2527436A
# gpg: Good signature from "Eric Blake <address@hidden>"
# gpg:                 aka "Eric Blake (Free Software Programmer) 
<address@hidden>"
# gpg:                 aka "[jpeg image of size 6874]"
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A

* remotes/ericb/tags/pull-nbd-2017-07-17:
  nbd: Fix server reply to NBD_OPT_EXPORT_NAME of older clients
  nbd: Trace client command being sent
  nbd: Fix iotests failure due to changed client error message

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


Compare: https://github.com/qemu/qemu/compare/ff3351d4495c...20df6c7689eb

reply via email to

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