On 09/25/2012 02:02 PM, Eric Blake wrote: > On 09/25/2012 10:29 AM, Jeff Cody wrote: >> Derived from the streaming test cases (030), this adds the >> following tests: >> >> 1. For the following image chain, commit [mid] into [backing], >> and use qemu-io to verify [backing] has its original data, as >> well as the data from [mid] >> >> [backing] <-- [mid] <-- [test] >> >> 2. Verifies that 'block-commit' with the 'speed' parameter sets the >> speed parameter, as reported by 'query-block-jobs' >> >> 3. Verifies that a bogus 'device' parameter to 'block-commit' >> results in error > > I think you are missing a test; you should also verify that: > > { "command":"block-commit", "arguments":{ > "device":"drive0", "base":"mid", "top":"backing" } } > > properly fails, since 'mid' is not a backing file of 'backing'. I saw > code in patch 1/7 that bdrv_drop_intermediate() should detect the > situation, but I'm not confident enough in my reading of patch 2/7 to > know if that detection point was early enough, or whether the coroutine > stuff in 2/7 ends up corrupting 'mid' prior to failure. >
Good idea. This seems like a good test to have in place.