qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH qemu 4/4] iotests: add test for bitmap mirror


From: Max Reitz
Subject: Re: [PATCH qemu 4/4] iotests: add test for bitmap mirror
Date: Thu, 1 Oct 2020 19:31:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 22.09.20 11:14, Fabian Grünbichler wrote:
> heavily based on/practically forked off iotest 257 for bitmap backups,
> but:
> 
> - no writes to filter node 'mirror-top' between completion and
> finalization, as those seem to deadlock?
> - no inclusion of not-yet-available full/top sync modes in combination
> with bitmaps
> - extra set of reference/test mirrors to verify that writes in parallel
> with active mirror work
> 
> intentionally keeping copyright and ownership of original test case to
> honor provenance.
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
>  tests/qemu-iotests/306     |  546 +++++++
>  tests/qemu-iotests/306.out | 2846 ++++++++++++++++++++++++++++++++++++
>  tests/qemu-iotests/group   |    1 +
>  3 files changed, 3393 insertions(+)
>  create mode 100755 tests/qemu-iotests/306
>  create mode 100644 tests/qemu-iotests/306.out
> 
> diff --git a/tests/qemu-iotests/306 b/tests/qemu-iotests/306
> new file mode 100755
> index 0000000000..1bb8bd4138
> --- /dev/null
> +++ b/tests/qemu-iotests/306

[...]

> +def test_bitmap_sync(bsync_mode, msync_mode='bitmap', failure=None):
> +    """
> +    Test bitmap mirror routines.
> +
> +    :param bsync_mode: Is the Bitmap Sync mode, and can be any of:
> +        - on-success: This is the "incremental" style mode. Bitmaps are
> +                      synchronized to what was copied out only on success.
> +                      (Partial images must be discarded.)
> +        - never:      This is the "differential" style mode.
> +                      Bitmaps are never synchronized.
> +        - always:     This is a "best effort" style mode.
> +                      Bitmaps are always synchronized, regardless of failure.
> +                      (Partial images must be kept.)
> +
> +    :param msync_mode: The mirror sync mode to use for the first mirror.
> +                       Can be any one of:
> +        - bitmap: mirrors based on bitmap manifest.
> +        - full:   Full mirrors.
> +        - top:    Full mirrors of the top layer only.
> +
> +    :param failure: Is the (optional) failure mode, and can be any of:
> +        - None:         No failure. Test the normative path. Default.
> +        - simulated:    Cancel the job right before it completes.
> +                        This also tests writes "during" the job.
> +        - intermediate: This tests a job that fails mid-process and produces
> +                        an incomplete mirror. Testing limitations prevent
> +                        testing competing writes.
> +    """
> +    with iotests.FilePath('img', 'bsync1', 'bsync2', 'bsync3',
> +                            'fmirror0', 'fmirror1', 'fmirror2', 'fmirror3') 
> as \

The indentation is off now.

> +                            (img_path, bsync1, bsync2, bsync3,
> +                             fmirror0, fmirror1, fmirror2, fmirror3), \
> +         iotests.VM() as vm:
Hm.  On tmpfs, this test fails for me:

($ TEST_DIR=/tmp/iotest ./check -qcow2 306)

@@ -170,7 +170,7 @@
     "drive0": [
       {
         "busy": false,
-        "count": 262144,
+        "count": 458752,
         "granularity": 65536,
         "persistent": false,
         "recording": true,
@@ -464,7 +464,7 @@
     "drive0": [
       {
         "busy": false,
-        "count": 262144,
+        "count": 458752,
         "granularity": 65536,
         "persistent": false,
         "recording": true,
@@ -760,7 +760,7 @@
     "drive0": [
       {
         "busy": false,
-        "count": 262144,
+        "count": 393216,
         "granularity": 65536,
         "persistent": false,
         "recording": true,
@@ -1056,7 +1056,7 @@
     "drive0": [
       {
         "busy": false,
-        "count": 262144,
+        "count": 458752,
         "granularity": 65536,
         "persistent": false,
         "recording": true,
@@ -1350,7 +1350,7 @@
     "drive0": [
       {
         "busy": false,
-        "count": 262144,
+        "count": 458752,
         "granularity": 65536,
         "persistent": false,
         "recording": true,
@@ -2236,7 +2236,7 @@
     "drive0": [
       {
         "busy": false,
-        "count": 262144,
+        "count": 458752,
         "granularity": 65536,
         "persistent": false,
         "recording": true,

Can you see the same?

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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