[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] a4d925: iotests: Test NBD client reconnection
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] a4d925: iotests: Test NBD client reconnection |
Date: |
Tue, 19 Nov 2019 03:28:39 -0800 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: a4d925f8f0634f72f1f03b23f0d172b7315e9ebf
https://github.com/qemu/qemu/commit/a4d925f8f0634f72f1f03b23f0d172b7315e9ebf
Author: Andrey Shinkevich <address@hidden>
Date: 2019-11-18 (Mon, 18 Nov 2019)
Changed paths:
A tests/qemu-iotests/277
A tests/qemu-iotests/277.out
M tests/qemu-iotests/group
M tests/qemu-iotests/iotests.py
M tests/qemu-iotests/nbd-fault-injector.py
Log Message:
-----------
iotests: Test NBD client reconnection
The test for an NBD client. The NBD server is disconnected after the
client write request. The NBD client should reconnect and complete
the write operation.
Suggested-by: Denis V. Lunev <address@hidden>
Suggested-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Andrey Shinkevich <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Tested-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Commit: f61ffad53f6d1cc4e23c557e22ed3d4f0ad0ae5e
https://github.com/qemu/qemu/commit/f61ffad53f6d1cc4e23c557e22ed3d4f0ad0ae5e
Author: Eric Blake <address@hidden>
Date: 2019-11-18 (Mon, 18 Nov 2019)
Changed paths:
M util/qemu-coroutine-sleep.c
Log Message:
-----------
qemu-coroutine-sleep: Silence Coverity warning
Coverity warns that we store the address of a stack variable through a
pointer passed in by the caller, which would let the caller trivially
trigger use-after-free if that stored value is still present when we
finish execution. However, the way coroutines work is that after our
call to qemu_coroutine_yield(), control is temporarily continued in
the caller prior to our function concluding, and in order to resume
our coroutine, the caller must poll until the variable has been set to
NULL. Thus, we can add an assert that we do not leak stack storage to
the caller on function exit.
Fixes: Coverity CID 1406474
CC: Peter Maydell <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Commit: 9d7ab222da5a9de61b34f26ec442d37ccdd18cf0
https://github.com/qemu/qemu/commit/9d7ab222da5a9de61b34f26ec442d37ccdd18cf0
Author: Eric Blake <address@hidden>
Date: 2019-11-18 (Mon, 18 Nov 2019)
Changed paths:
M include/block/nbd.h
M nbd/server.c
Log Message:
-----------
nbd/server: Prefer heap over stack for parsing client names
As long as we limit NBD names to 256 bytes (the bare minimum permitted
by the standard), stack-allocation works for parsing a name received
from the client. But as mentioned in a comment, we eventually want to
permit up to the 4k maximum of the NBD standard, which is too large
for stack allocation; so switch everything in the server to use heap
allocation. For now, there is no change in actually supported name
length.
Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
[eblake: fix uninit variable compile failure]
Reviewed-by: Maxim Levitsky <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Commit: cf7c49cf6aedb0486ca7ba7c32aa819fe51dadfb
https://github.com/qemu/qemu/commit/cf7c49cf6aedb0486ca7ba7c32aa819fe51dadfb
Author: Eric Blake <address@hidden>
Date: 2019-11-18 (Mon, 18 Nov 2019)
Changed paths:
M block/dirty-bitmap.c
M block/qcow2-bitmap.c
M include/block/dirty-bitmap.h
M qapi/block-core.json
Log Message:
-----------
bitmap: Enforce maximum bitmap name length
We document that for qcow2 persistent bitmaps, the name cannot exceed
1023 bytes. It is inconsistent if transient bitmaps do not have to
abide by the same limit, and it is unlikely that any existing client
even cares about using bitmap names this long. It's time to codify
that ALL bitmaps managed by qemu (whether persistent in qcow2 or not)
have a documented maximum length.
Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Maxim Levitsky <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Commit: 93676c88d7a5cd5971de94f9091eff8e9773b1af
https://github.com/qemu/qemu/commit/93676c88d7a5cd5971de94f9091eff8e9773b1af
Author: Eric Blake <address@hidden>
Date: 2019-11-18 (Mon, 18 Nov 2019)
Changed paths:
M block/nbd.c
M blockdev-nbd.c
M include/block/nbd.h
M nbd/client.c
M nbd/server.c
M qemu-nbd.c
Log Message:
-----------
nbd: Don't send oversize strings
Qemu as server currently won't accept export names larger than 256
bytes, nor create dirty bitmap names longer than 1023 bytes, so most
uses of qemu as client or server have no reason to get anywhere near
the NBD spec maximum of a 4k limit per string.
However, we weren't actually enforcing things, ignoring when the
remote side violates the protocol on input, and also having several
code paths where we send oversize strings on output (for example,
qemu-nbd --description could easily send more than 4k). Tighten
things up as follows:
client:
- Perform bounds check on export name and dirty bitmap request prior
to handing it to server
- Validate that copied server replies are not too long (ignoring
NBD_INFO_* replies that are not copied is not too bad)
server:
- Perform bounds check on export name and description prior to
advertising it to client
- Reject client name or metadata query that is too long
- Adjust things to allow full 4k name limit rather than previous
256 byte limit
Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Maxim Levitsky <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Commit: 052db8e71444d85036bee2d3e3225ba9a6d652ee
https://github.com/qemu/qemu/commit/052db8e71444d85036bee2d3e3225ba9a6d652ee
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2019-11-18 (Mon, 18 Nov 2019)
Changed paths:
M MAINTAINERS
Log Message:
-----------
MAINTAINERS: add more bitmap-related to Dirty Bitmaps section
Let's add bitmaps persistence qcow2 feature and postcopy bitmaps
migration to Dirty Bitmaps section.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Commit: 509e91c127390343b7688ddea0b908fa3e8b2707
https://github.com/qemu/qemu/commit/509e91c127390343b7688ddea0b908fa3e8b2707
Author: Eric Blake <address@hidden>
Date: 2019-11-18 (Mon, 18 Nov 2019)
Changed paths:
M tests/qemu-iotests/173
M tests/qemu-iotests/173.out
Log Message:
-----------
iotests: Fix 173
This test has been broken since 3.0. It used TEST_IMG to influence
the name of a file created during _make_test_img, but commit 655ae6bb
changed things so that the wrong file name is being created, which
then caused _launch_qemu to fail. In the meantime, the set of events
issued for the actions of the test has increased.
Why haven't we noticed the failure? Because the test rarely gets run:
'./check -qcow2 173' is insufficient (that defaults to using file protocol)
'./check -nfs 173' is insufficient (that defaults to using raw format)
so the test is only run with:
./check -qcow2 -nfs 173
Note that we already have a number of other problems with -nfs:
./check -nfs (fails 18/30)
./check -qcow2 -nfs (fails 45/76 after this patch, if exports does
not permit 'insecure')
and it's not on my priority list to fix those. Rather, I found this
because of my next patch's work on tests using _send_qemu_cmd.
Fixes: 655ae6b
Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-Id: <address@hidden>
Commit: f3923a72f199b2c63747a7032db74730546f55c6
https://github.com/qemu/qemu/commit/f3923a72f199b2c63747a7032db74730546f55c6
Author: Eric Blake <address@hidden>
Date: 2019-11-18 (Mon, 18 Nov 2019)
Changed paths:
M tests/qemu-iotests/common.filter
M tests/qemu-iotests/common.rc
Log Message:
-----------
iotests: Switch nbd tests to use Unix rather than TCP
Up to now, all it took to cause a lot of iotest failures was to have a
background process such as 'nbdkit -p 10810 null' running, because we
hard-coded the TCP port. Switching to a Unix socket eliminates this
contention. We still have TCP coverage in test 233, and that test is
more careful to not pick a hard-coded port.
Add a comment explaining where the format layer applies when using
NBD as protocol (until NBD gains support for a resize extension, we
only pipe raw bytes over the wire).
Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
[eblake: Tweak socket name per Max Reitz' review]
Commit: a98b1a1fefd53daf044d2267e6b9487541798918
https://github.com/qemu/qemu/commit/a98b1a1fefd53daf044d2267e6b9487541798918
Author: Eric Blake <address@hidden>
Date: 2019-11-18 (Mon, 18 Nov 2019)
Changed paths:
M tests/qemu-iotests/085.out
M tests/qemu-iotests/094.out
M tests/qemu-iotests/095.out
M tests/qemu-iotests/109.out
M tests/qemu-iotests/117.out
M tests/qemu-iotests/127.out
M tests/qemu-iotests/140.out
M tests/qemu-iotests/141.out
M tests/qemu-iotests/143.out
M tests/qemu-iotests/144.out
M tests/qemu-iotests/153.out
M tests/qemu-iotests/156.out
M tests/qemu-iotests/161.out
M tests/qemu-iotests/173.out
M tests/qemu-iotests/182.out
M tests/qemu-iotests/183.out
M tests/qemu-iotests/185.out
M tests/qemu-iotests/191.out
M tests/qemu-iotests/200.out
M tests/qemu-iotests/223.out
M tests/qemu-iotests/229.out
M tests/qemu-iotests/249.out
M tests/qemu-iotests/common.qemu
Log Message:
-----------
iotests: Include QMP input in .out files
We generally include relevant HMP input in .out files, by virtue of
the fact that HMP echoes its input. But QMP does not, so we have to
explicitly inject it in the output stream (appropriately filtered to
keep the tests passing), in order to make it easier to read .out files
to see what behavior is being tested (especially true where the output
file is a sequence of {'return': {}}).
Suggested-by: Max Reitz <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Commit: 296416ff0f519d762fbb87ac59f0770824267f3f
https://github.com/qemu/qemu/commit/296416ff0f519d762fbb87ac59f0770824267f3f
Author: Eric Blake <address@hidden>
Date: 2019-11-18 (Mon, 18 Nov 2019)
Changed paths:
M tests/qemu-iotests/223
M tests/qemu-iotests/223.out
Log Message:
-----------
tests: More iotest 223 improvements
Run the core of the test twice, once without iothreads, and again
with, for more coverage of both setups.
Suggested-by: Nir Soffer <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-Id: <address@hidden>
Commit: 385e43e6638464009e09cfaec254012e531f6342
https://github.com/qemu/qemu/commit/385e43e6638464009e09cfaec254012e531f6342
Author: Peter Maydell <address@hidden>
Date: 2019-11-19 (Tue, 19 Nov 2019)
Changed paths:
M MAINTAINERS
M block/dirty-bitmap.c
M block/nbd.c
M block/qcow2-bitmap.c
M blockdev-nbd.c
M include/block/dirty-bitmap.h
M include/block/nbd.h
M nbd/client.c
M nbd/server.c
M qapi/block-core.json
M qemu-nbd.c
M tests/qemu-iotests/085.out
M tests/qemu-iotests/094.out
M tests/qemu-iotests/095.out
M tests/qemu-iotests/109.out
M tests/qemu-iotests/117.out
M tests/qemu-iotests/127.out
M tests/qemu-iotests/140.out
M tests/qemu-iotests/141.out
M tests/qemu-iotests/143.out
M tests/qemu-iotests/144.out
M tests/qemu-iotests/153.out
M tests/qemu-iotests/156.out
M tests/qemu-iotests/161.out
M tests/qemu-iotests/173
M tests/qemu-iotests/173.out
M tests/qemu-iotests/182.out
M tests/qemu-iotests/183.out
M tests/qemu-iotests/185.out
M tests/qemu-iotests/191.out
M tests/qemu-iotests/200.out
M tests/qemu-iotests/223
M tests/qemu-iotests/223.out
M tests/qemu-iotests/229.out
M tests/qemu-iotests/249.out
A tests/qemu-iotests/277
A tests/qemu-iotests/277.out
M tests/qemu-iotests/common.filter
M tests/qemu-iotests/common.qemu
M tests/qemu-iotests/common.rc
M tests/qemu-iotests/group
M tests/qemu-iotests/iotests.py
M tests/qemu-iotests/nbd-fault-injector.py
M util/qemu-coroutine-sleep.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-11-19' into
staging
nbd patches for 2019-11-19
- iotests: more tests of NBD reconnect, various test output improvements
- nbd: fix spec compliance issue with long strings
- slience a Coverity warning on coroutines
# gpg: Signature made Tue 19 Nov 2019 03:06:41 GMT
# gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
# gpg: Good signature from "Eric Blake <address@hidden>" [full]
# gpg: aka "Eric Blake (Free Software Programmer)
<address@hidden>" [full]
# gpg: aka "[jpeg image of size 6874]" [full]
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A
* remotes/ericb/tags/pull-nbd-2019-11-19:
tests: More iotest 223 improvements
iotests: Include QMP input in .out files
iotests: Switch nbd tests to use Unix rather than TCP
iotests: Fix 173
MAINTAINERS: add more bitmap-related to Dirty Bitmaps section
nbd: Don't send oversize strings
bitmap: Enforce maximum bitmap name length
nbd/server: Prefer heap over stack for parsing client names
qemu-coroutine-sleep: Silence Coverity warning
iotests: Test NBD client reconnection
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/f086f22d6c06...385e43e66384
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] a4d925: iotests: Test NBD client reconnection,
Peter Maydell <=