Nir Soffer has posted comments on this change.
Change subject: [WIP] core: Expose API for qemuimg commit ......................................................................
Patch Set 4:
(2 comments)
https://gerrit.ovirt.org/#/c/64222/4/tests/qemuimg_test.py File tests/qemuimg_test.py:
Line 363: op = qemuimg.commit(top) Line 364: op.wait_for_completion() Line 365: Line 366: # top should not change after commit Line 367: qemu_pattern_verify(top, qemuimg.FORMAT.RAW, '0', 0xf1) Issues: - Top always use qemuimg.FORMAT.QCOW2 - Use kwargs - 0xf1 is the length in this call, so the verification is incorrect Line 368: Line 369: # base now should include original data and top's data Line 370: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '0', 0xf2) Line 371: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '512', 0xf1)
Line 367: qemu_pattern_verify(top, qemuimg.FORMAT.RAW, '0', 0xf1) Line 368: Line 369: # base now should include original data and top's data Line 370: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '0', 0xf2) Line 371: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '512', 0xf1) Issues: - Both call must use baseFormat - Use offset and len in 1k units - The pattern should be 0xf0 for the first 1k and 0xf1 for the second 1k. Line 372: Line 373: @MonkeyPatch(qemuimg, 'config', CONFIG) Line 374: def test_commit_backing_chain(self): Line 375: with namedTemporaryDir() as tmpdir: