[{"id":1760601,"web_url":"http://patchwork.ozlabs.org/comment/1760601/","msgid":"<20170831020210.GF17741@lemon.lan>","list_archive_url":null,"date":"2017-08-31T02:02:10","subject":"Re: [Qemu-devel] [PATCH 3/3] Backup Tool: Test for Incremental\n\tBackup","submitter":{"id":24872,"url":"http://patchwork.ozlabs.org/api/people/24872/","name":"Fam Zheng","email":"famz@redhat.com"},"content":"On Thu, 08/31 00:45, Ishani Chugh wrote:\n> This patch is the test for incremental backup implementation in Backup tool.\n> The test employs two basic subtests:\n> 1) Backing up an empty guest and comparing it with base image.\n> 2) Writing a pattern to the guest, creating backup, writing\n>    a pattern again, creating backup and comparing with base image.\n> \n> Signed-off-by: Ishani Chugh <chugh.ishani@research.iiit.ac.in>\n> ---\n>  tests/qemu-iotests/193     | 86 ++++++++++++++++++++++++++++++++++++++++++++++\n>  tests/qemu-iotests/193.out | 34 ++++++++++++++++++\n>  tests/qemu-iotests/group   |  1 +\n>  3 files changed, 121 insertions(+)\n>  create mode 100755 tests/qemu-iotests/193\n>  create mode 100644 tests/qemu-iotests/193.out\n> \n> diff --git a/tests/qemu-iotests/193 b/tests/qemu-iotests/193\n> new file mode 100755\n> index 0000000..500e5df\n> --- /dev/null\n> +++ b/tests/qemu-iotests/193\n> @@ -0,0 +1,86 @@\n> +#!/bin/bash\n> +#\n> +# Test Incremental backup functionality of qemu-backup tool\n> +#\n> +# Copyright (C) 2009 Red Hat, Inc.\n\nYear is off, probably the copyright holder too?\n\n> +#\n> +# This program is free software; you can redistribute it and/or modify\n> +# it under the terms of the GNU General Public License as published by\n> +# the Free Software Foundation; either version 2 of the License, or\n> +# (at your option) any later version.\n> +#\n> +# This program is distributed in the hope that it will be useful,\n> +# but WITHOUT ANY WARRANTY; without even the implied warranty of\n> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n> +# GNU General Public License for more details.\n> +#\n> +# You should have received a copy of the GNU General Public License\n> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n> +#\n> +\n> +# creator\n> +owner=chugh.ishani@research.iiit.ac.in\n> +\n> +seq=`basename $0`\n> +echo \"QA output created by $seq\"\n> +\n> +here=`pwd`\n> +status=1\t# failure is the default!\n\ns/\\t/ /\n\n> +\n> +\n> +# get standard environment, filters and checks\n> +. ./common.rc\n> +. ./common.filter\n> +. ./common.qemu\n> +\n> +_supported_fmt generic\n> +_supported_proto generic\n> +_supported_os Linux\n> +\n> +\n> +CONFIG_FILE=$TEST_DIR/backup-config\n> +SOCKET=unix:$TEST_DIR/backup_socket\n> +size=128M\n> +\n> +_make_test_img $size\n> +export QEMU_BACKUP_CONFIG=$CONFIG_FILE\n> +qemu_comm_method=\"monitor\"\n> +echo\n> +_launch_qemu -drive if=virtio,file=$TEST_IMG -qmp $SOCKET,server,nowait\n> +$PYTHON ../../contrib/backup/qemu-backup.py guest add --guest adad --qmp $SOCKET\n> +$PYTHON ../../contrib/backup/qemu-backup.py drive add --id virtio0 --guest adad --target $TEST_DIR/virtio0\n> +echo\n> +echo \"== Creating backup ==\"\n> +$PYTHON ../../contrib/backup/qemu-backup.py backup --inc --guest adad\n> +_send_qemu_cmd $QEMU_HANDLE 'quit' ''\n> +wait=1 _cleanup_qemu\n> +echo\n> +echo \"== Comparing images ==\"\n> +$QEMU_IMG compare $TEST_DIR/virtio0_inc_0 $TEST_IMG\n> +\n> +rm $TEST_DIR/virtio0_inc_0\n> +\n> +_launch_qemu -drive if=virtio,id=virtio0,file=$TEST_IMG -qmp $SOCKET,server,nowait\n> +echo\n> +echo \"== Writing Pattern ==\"\n> +_send_qemu_cmd $QEMU_HANDLE 'qemu-io virtio0 \"write -P 0x22 0 1M\"' \"(qemu)\" | _filter_qemu_io\n> +echo\n> +\n> +echo \"== Creating backup ==\"\n> +$PYTHON ../../contrib/backup/qemu-backup.py backup --inc --guest adad\n> +\n> +echo \"== Writing Pattern ==\"\n> +_send_qemu_cmd $QEMU_HANDLE 'qemu-io virtio0 \"write -P 0x22 0 1M\"' \"(qemu)\" | _filter_qemu_io\n> +echo\n> +$PYTHON ../../contrib/backup/qemu-backup.py backup --inc --guest adad\n> +_send_qemu_cmd $QEMU_HANDLE 'quit' ''\n> +wait=1 _cleanup_qemu\n> +echo\n> +echo \"== Comparing images ==\"\n> +$QEMU_IMG compare $TEST_DIR/virtio0_inc_1 $TEST_IMG\n> +rm $TEST_DIR/virtio0_inc_0\n> +rm $TEST_DIR/virtio0_inc_1\n> +rm $CONFIG_FILE\n> +\n> +echo \"*** done\"\n> +status=0\n> \\ No newline at end of file\n> diff --git a/tests/qemu-iotests/193.out b/tests/qemu-iotests/193.out\n> new file mode 100644\n> index 0000000..3a836c2\n> --- /dev/null\n> +++ b/tests/qemu-iotests/193.out\n> @@ -0,0 +1,34 @@\n> +QA output created by 193\n> +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728\n> +\n> +Successfully Added Guest\n> +Successfully Added Drive\n> +\n> +== Creating backup ==\n> +QEMU X.Y.Z monitor - type 'help' for more information\n> +(qemu) Formatting 'TEST_DIR/virtio0_inc_0', fmt=qcow2 size=134217728 cluster_size=65536 lazy_refcounts=off refcount_bits=16\n> +quit\n> +\n> +== Comparing images ==\n> +Images are identical.\n> +\n> +== Writing Pattern ==\n> +QEMU X.Y.Z monitor - type 'help' for more information\n> +(qemu) qemu-io virtio0 \"write -P 0x22 0 1M\"\n> +\n> +== Creating backup ==\n> +Initial Backup does not exist\n> +== Writing Pattern ==\n> +wrote 1048576/1048576 bytes at offset 0\n> +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n> +(qemu) Formatting 'TEST_DIR/virtio0_inc_0', fmt=qcow2 size=134217728 cluster_size=65536 lazy_refcounts=off refcount_bits=16\n> +\n> +Formatting '/home/ishani/Desktop/opw/qemu/tests/qemu-iotests/scratch/virtio0_inc_1', fmt=qcow2 size=134217728 backing_file=/home/ishani/Desktop/opw/qemu/tests/qemu-iotests/scratch/virtio0_inc_0 backing_fmt=qcow2 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16\n> +qemu-io virtio0 \"write -P 0x22 0 1M\"\n> +wrote 1048576/1048576 bytes at offset 0\n> +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n> +(qemu) quit\n> +\n> +== Comparing images ==\n> +Images are identical.\n> +*** done\n> diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group\n> index 33c945b..6b9e034 100644\n> --- a/tests/qemu-iotests/group\n> +++ b/tests/qemu-iotests/group\n> @@ -189,3 +189,4 @@\n>  191 rw auto\n>  192 rw auto quick\n>  194 rw auto migration quick\n> +193 rw auto\n\nLet's add this line after 192 before 194, and you can add 'quick' btw.\n\nFam\n\n> -- \n> 2.7.4\n> \n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=famz@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjQcx2g9Tz9s7c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 12:02:53 +1000 (AEST)","from localhost ([::1]:53548 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnEok-0004hg-Cu\n\tfor incoming@patchwork.ozlabs.org; Wed, 30 Aug 2017 22:02:50 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:35035)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dnEoI-0004hW-QA\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 22:02:24 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dnEoE-0006dg-Kg\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 22:02:22 -0400","from mx1.redhat.com ([209.132.183.28]:47260)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <famz@redhat.com>) id 1dnEoE-0006dV-Bg\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 22:02:18 -0400","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 7A0C67EA8C;\n\tThu, 31 Aug 2017 02:02:16 +0000 (UTC)","from localhost (ovpn-12-59.pek2.redhat.com [10.72.12.59])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 3E80518501;\n\tThu, 31 Aug 2017 02:02:11 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 7A0C67EA8C","Date":"Thu, 31 Aug 2017 10:02:10 +0800","From":"Fam Zheng <famz@redhat.com>","To":"Ishani Chugh <chugh.ishani@research.iiit.ac.in>","Message-ID":"<20170831020210.GF17741@lemon.lan>","References":"<1504120538-9309-1-git-send-email-chugh.ishani@research.iiit.ac.in>\n\t<1504120538-9309-4-git-send-email-chugh.ishani@research.iiit.ac.in>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<1504120538-9309-4-git-send-email-chugh.ishani@research.iiit.ac.in>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.14","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.28]);\n\tThu, 31 Aug 2017 02:02:17 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH 3/3] Backup Tool: Test for Incremental\n\tBackup","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"jsnow@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1762023,"web_url":"http://patchwork.ozlabs.org/comment/1762023/","msgid":"<5b41f64d-3a13-4314-4f0e-29864c940c2b@redhat.com>","list_archive_url":null,"date":"2017-09-01T22:53:36","subject":"Re: [Qemu-devel] [PATCH 3/3] Backup Tool: Test for Incremental\n\tBackup","submitter":{"id":64343,"url":"http://patchwork.ozlabs.org/api/people/64343/","name":"John Snow","email":"jsnow@redhat.com"},"content":"On 08/30/2017 10:02 PM, Fam Zheng wrote:\n> On Thu, 08/31 00:45, Ishani Chugh wrote:\n>> This patch is the test for incremental backup implementation in Backup tool.\n>> The test employs two basic subtests:\n>> 1) Backing up an empty guest and comparing it with base image.\n>> 2) Writing a pattern to the guest, creating backup, writing\n>>    a pattern again, creating backup and comparing with base image.\n>>\n>> Signed-off-by: Ishani Chugh <chugh.ishani@research.iiit.ac.in>\n>> ---\n>>  tests/qemu-iotests/193     | 86 ++++++++++++++++++++++++++++++++++++++++++++++\n>>  tests/qemu-iotests/193.out | 34 ++++++++++++++++++\n>>  tests/qemu-iotests/group   |  1 +\n>>  3 files changed, 121 insertions(+)\n>>  create mode 100755 tests/qemu-iotests/193\n>>  create mode 100644 tests/qemu-iotests/193.out\n>>\n>> diff --git a/tests/qemu-iotests/193 b/tests/qemu-iotests/193\n>> new file mode 100755\n>> index 0000000..500e5df\n>> --- /dev/null\n>> +++ b/tests/qemu-iotests/193\n>> @@ -0,0 +1,86 @@\n>> +#!/bin/bash\n>> +#\n>> +# Test Incremental backup functionality of qemu-backup tool\n>> +#\n>> +# Copyright (C) 2009 Red Hat, Inc.\n> \n> Year is off, probably the copyright holder too?\n> \n\nYup, please take credit for your own work, Ishani :)\n\n>> +#\n>> +# This program is free software; you can redistribute it and/or modify\n>> +# it under the terms of the GNU General Public License as published by\n>> +# the Free Software Foundation; either version 2 of the License, or\n>> +# (at your option) any later version.\n>> +#\n>> +# This program is distributed in the hope that it will be useful,\n>> +# but WITHOUT ANY WARRANTY; without even the implied warranty of\n>> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n>> +# GNU General Public License for more details.\n>> +#\n>> +# You should have received a copy of the GNU General Public License\n>> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n>> +#\n>> +\n>> +# creator\n>> +owner=chugh.ishani@research.iiit.ac.in\n>> +\n>> +seq=`basename $0`\n>> +echo \"QA output created by $seq\"\n>> +\n>> +here=`pwd`\n>> +status=1\t# failure is the default!\n> \n> s/\\t/ /\n> \n\nFam means to remove the tab here and use spaces instead.\n\n>> +\n>> +\n>> +# get standard environment, filters and checks\n>> +. ./common.rc\n>> +. ./common.filter\n>> +. ./common.qemu\n>> +\n>> +_supported_fmt generic\n>> +_supported_proto generic\n>> +_supported_os Linux\n>> +\n>> +\n>> +CONFIG_FILE=$TEST_DIR/backup-config\n>> +SOCKET=unix:$TEST_DIR/backup_socket\n>> +size=128M\n>> +\n>> +_make_test_img $size\n>> +export QEMU_BACKUP_CONFIG=$CONFIG_FILE\n>> +qemu_comm_method=\"monitor\"\n>> +echo\n>> +_launch_qemu -drive if=virtio,file=$TEST_IMG -qmp $SOCKET,server,nowait\n>> +$PYTHON ../../contrib/backup/qemu-backup.py guest add --guest adad --qmp $SOCKET\n>> +$PYTHON ../../contrib/backup/qemu-backup.py drive add --id virtio0 --guest adad --target $TEST_DIR/virtio0\n>> +echo\n>> +echo \"== Creating backup ==\"\n>> +$PYTHON ../../contrib/backup/qemu-backup.py backup --inc --guest adad\n>> +_send_qemu_cmd $QEMU_HANDLE 'quit' ''\n>> +wait=1 _cleanup_qemu\n>> +echo\n>> +echo \"== Comparing images ==\"\n>> +$QEMU_IMG compare $TEST_DIR/virtio0_inc_0 $TEST_IMG\n>> +\n>> +rm $TEST_DIR/virtio0_inc_0\n>> +\n>> +_launch_qemu -drive if=virtio,id=virtio0,file=$TEST_IMG -qmp $SOCKET,server,nowait\n>> +echo\n>> +echo \"== Writing Pattern ==\"\n>> +_send_qemu_cmd $QEMU_HANDLE 'qemu-io virtio0 \"write -P 0x22 0 1M\"' \"(qemu)\" | _filter_qemu_io\n>> +echo\n>> +\n>> +echo \"== Creating backup ==\"\n>> +$PYTHON ../../contrib/backup/qemu-backup.py backup --inc --guest adad\n>> +\n>> +echo \"== Writing Pattern ==\"\n>> +_send_qemu_cmd $QEMU_HANDLE 'qemu-io virtio0 \"write -P 0x22 0 1M\"' \"(qemu)\" | _filter_qemu_io\n>> +echo\n>> +$PYTHON ../../contrib/backup/qemu-backup.py backup --inc --guest adad\n>> +_send_qemu_cmd $QEMU_HANDLE 'quit' ''\n>> +wait=1 _cleanup_qemu\n>> +echo\n>> +echo \"== Comparing images ==\"\n>> +$QEMU_IMG compare $TEST_DIR/virtio0_inc_1 $TEST_IMG\n>> +rm $TEST_DIR/virtio0_inc_0\n>> +rm $TEST_DIR/virtio0_inc_1\n>> +rm $CONFIG_FILE\n>> +\n>> +echo \"*** done\"\n>> +status=0\n>> \\ No newline at end of file\n>> diff --git a/tests/qemu-iotests/193.out b/tests/qemu-iotests/193.out\n>> new file mode 100644\n>> index 0000000..3a836c2\n>> --- /dev/null\n>> +++ b/tests/qemu-iotests/193.out\n>> @@ -0,0 +1,34 @@\n>> +QA output created by 193\n>> +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728\n>> +\n>> +Successfully Added Guest\n>> +Successfully Added Drive\n>> +\n>> +== Creating backup ==\n>> +QEMU X.Y.Z monitor - type 'help' for more information\n>> +(qemu) Formatting 'TEST_DIR/virtio0_inc_0', fmt=qcow2 size=134217728 cluster_size=65536 lazy_refcounts=off refcount_bits=16\n>> +quit\n>> +\n>> +== Comparing images ==\n>> +Images are identical.\n>> +\n>> +== Writing Pattern ==\n>> +QEMU X.Y.Z monitor - type 'help' for more information\n>> +(qemu) qemu-io virtio0 \"write -P 0x22 0 1M\"\n>> +\n>> +== Creating backup ==\n>> +Initial Backup does not exist\n>> +== Writing Pattern ==\n>> +wrote 1048576/1048576 bytes at offset 0\n>> +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n>> +(qemu) Formatting 'TEST_DIR/virtio0_inc_0', fmt=qcow2 size=134217728 cluster_size=65536 lazy_refcounts=off refcount_bits=16\n>> +\n>> +Formatting '/home/ishani/Desktop/opw/qemu/tests/qemu-iotests/scratch/virtio0_inc_1', fmt=qcow2 size=134217728 backing_file=/home/ishani/Desktop/opw/qemu/tests/qemu-iotests/scratch/virtio0_inc_0 backing_fmt=qcow2 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16\n>> +qemu-io virtio0 \"write -P 0x22 0 1M\"\n>> +wrote 1048576/1048576 bytes at offset 0\n>> +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n>> +(qemu) quit\n>> +\n>> +== Comparing images ==\n>> +Images are identical.\n>> +*** done\n>> diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group\n>> index 33c945b..6b9e034 100644\n>> --- a/tests/qemu-iotests/group\n>> +++ b/tests/qemu-iotests/group\n>> @@ -189,3 +189,4 @@\n>>  191 rw auto\n>>  192 rw auto quick\n>>  194 rw auto migration quick\n>> +193 rw auto\n> \n> Let's add this line after 192 before 194, and you can add 'quick' btw.\n> \n> Fam\n> \n>> -- \n>> 2.7.4\n>>\n>>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=jsnow@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkZLH1Nfsz9s7M\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  2 Sep 2017 08:54:13 +1000 (AEST)","from localhost ([::1]:37131 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnupH-0006Qc-B8\n\tfor incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 18:54:11 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:53029)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <jsnow@redhat.com>) id 1dnuou-0006Q0-1S\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 18:53:49 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <jsnow@redhat.com>) id 1dnuoq-0007zx-2w\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 18:53:48 -0400","from mx1.redhat.com ([209.132.183.28]:35156)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <jsnow@redhat.com>) id 1dnuop-0007z8-Po\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 18:53:44 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id BF7EA7E44E;\n\tFri,  1 Sep 2017 22:53:41 +0000 (UTC)","from [10.18.17.130] (dhcp-17-130.bos.redhat.com [10.18.17.130])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 8A7E1627DE;\n\tFri,  1 Sep 2017 22:53:36 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com BF7EA7E44E","To":"Fam Zheng <famz@redhat.com>,\n\tIshani Chugh <chugh.ishani@research.iiit.ac.in>","References":"<1504120538-9309-1-git-send-email-chugh.ishani@research.iiit.ac.in>\n\t<1504120538-9309-4-git-send-email-chugh.ishani@research.iiit.ac.in>\n\t<20170831020210.GF17741@lemon.lan>","From":"John Snow <jsnow@redhat.com>","Message-ID":"<5b41f64d-3a13-4314-4f0e-29864c940c2b@redhat.com>","Date":"Fri, 1 Sep 2017 18:53:36 -0400","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170831020210.GF17741@lemon.lan>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.27]);\n\tFri, 01 Sep 2017 22:53:42 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH 3/3] Backup Tool: Test for Incremental\n\tBackup","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"qemu-devel@nongnu.org, stefanha@redhat.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1764491,"web_url":"http://patchwork.ozlabs.org/comment/1764491/","msgid":"<487942674.1966626.1504757018811.JavaMail.zimbra@research.iiit.ac.in>","list_archive_url":null,"date":"2017-09-07T04:03:38","subject":"Re: [Qemu-devel] [PATCH 3/3] Backup Tool: Test for Incremental\n\tBackup","submitter":{"id":71382,"url":"http://patchwork.ozlabs.org/api/people/71382/","name":"Ishani","email":"chugh.ishani@research.iiit.ac.in"},"content":"Hello,\nI apologize for late reply. I was occupied by exams.\nI will send a revision asap. \nThanks.\n\n----- On Sep 2, 2017, at 4:23 AM, jsnow jsnow@redhat.com wrote:\n\n> On 08/30/2017 10:02 PM, Fam Zheng wrote:\n>> On Thu, 08/31 00:45, Ishani Chugh wrote:\n>>> This patch is the test for incremental backup implementation in Backup tool.\n>>> The test employs two basic subtests:\n>>> 1) Backing up an empty guest and comparing it with base image.\n>>> 2) Writing a pattern to the guest, creating backup, writing\n>>>    a pattern again, creating backup and comparing with base image.\n>>>\n>>> Signed-off-by: Ishani Chugh <chugh.ishani@research.iiit.ac.in>\n>>> ---\n>>>  tests/qemu-iotests/193     | 86 ++++++++++++++++++++++++++++++++++++++++++++++\n>>>  tests/qemu-iotests/193.out | 34 ++++++++++++++++++\n>>>  tests/qemu-iotests/group   |  1 +\n>>>  3 files changed, 121 insertions(+)\n>>>  create mode 100755 tests/qemu-iotests/193\n>>>  create mode 100644 tests/qemu-iotests/193.out\n>>>\n>>> diff --git a/tests/qemu-iotests/193 b/tests/qemu-iotests/193\n>>> new file mode 100755\n>>> index 0000000..500e5df\n>>> --- /dev/null\n>>> +++ b/tests/qemu-iotests/193\n>>> @@ -0,0 +1,86 @@\n>>> +#!/bin/bash\n>>> +#\n>>> +# Test Incremental backup functionality of qemu-backup tool\n>>> +#\n>>> +# Copyright (C) 2009 Red Hat, Inc.\n>> \n>> Year is off, probably the copyright holder too?\n>> \n> \n> Yup, please take credit for your own work, Ishani :)\n> \n>>> +#\n>>> +# This program is free software; you can redistribute it and/or modify\n>>> +# it under the terms of the GNU General Public License as published by\n>>> +# the Free Software Foundation; either version 2 of the License, or\n>>> +# (at your option) any later version.\n>>> +#\n>>> +# This program is distributed in the hope that it will be useful,\n>>> +# but WITHOUT ANY WARRANTY; without even the implied warranty of\n>>> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n>>> +# GNU General Public License for more details.\n>>> +#\n>>> +# You should have received a copy of the GNU General Public License\n>>> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n>>> +#\n>>> +\n>>> +# creator\n>>> +owner=chugh.ishani@research.iiit.ac.in\n>>> +\n>>> +seq=`basename $0`\n>>> +echo \"QA output created by $seq\"\n>>> +\n>>> +here=`pwd`\n>>> +status=1\t# failure is the default!\n>> \n>> s/\\t/ /\n>> \n> \n> Fam means to remove the tab here and use spaces instead.\n> \n>>> +\n>>> +\n>>> +# get standard environment, filters and checks\n>>> +. ./common.rc\n>>> +. ./common.filter\n>>> +. ./common.qemu\n>>> +\n>>> +_supported_fmt generic\n>>> +_supported_proto generic\n>>> +_supported_os Linux\n>>> +\n>>> +\n>>> +CONFIG_FILE=$TEST_DIR/backup-config\n>>> +SOCKET=unix:$TEST_DIR/backup_socket\n>>> +size=128M\n>>> +\n>>> +_make_test_img $size\n>>> +export QEMU_BACKUP_CONFIG=$CONFIG_FILE\n>>> +qemu_comm_method=\"monitor\"\n>>> +echo\n>>> +_launch_qemu -drive if=virtio,file=$TEST_IMG -qmp $SOCKET,server,nowait\n>>> +$PYTHON ../../contrib/backup/qemu-backup.py guest add --guest adad --qmp\n>>> $SOCKET\n>>> +$PYTHON ../../contrib/backup/qemu-backup.py drive add --id virtio0 --guest adad\n>>> --target $TEST_DIR/virtio0\n>>> +echo\n>>> +echo \"== Creating backup ==\"\n>>> +$PYTHON ../../contrib/backup/qemu-backup.py backup --inc --guest adad\n>>> +_send_qemu_cmd $QEMU_HANDLE 'quit' ''\n>>> +wait=1 _cleanup_qemu\n>>> +echo\n>>> +echo \"== Comparing images ==\"\n>>> +$QEMU_IMG compare $TEST_DIR/virtio0_inc_0 $TEST_IMG\n>>> +\n>>> +rm $TEST_DIR/virtio0_inc_0\n>>> +\n>>> +_launch_qemu -drive if=virtio,id=virtio0,file=$TEST_IMG -qmp\n>>> $SOCKET,server,nowait\n>>> +echo\n>>> +echo \"== Writing Pattern ==\"\n>>> +_send_qemu_cmd $QEMU_HANDLE 'qemu-io virtio0 \"write -P 0x22 0 1M\"' \"(qemu)\" |\n>>> _filter_qemu_io\n>>> +echo\n>>> +\n>>> +echo \"== Creating backup ==\"\n>>> +$PYTHON ../../contrib/backup/qemu-backup.py backup --inc --guest adad\n>>> +\n>>> +echo \"== Writing Pattern ==\"\n>>> +_send_qemu_cmd $QEMU_HANDLE 'qemu-io virtio0 \"write -P 0x22 0 1M\"' \"(qemu)\" |\n>>> _filter_qemu_io\n>>> +echo\n>>> +$PYTHON ../../contrib/backup/qemu-backup.py backup --inc --guest adad\n>>> +_send_qemu_cmd $QEMU_HANDLE 'quit' ''\n>>> +wait=1 _cleanup_qemu\n>>> +echo\n>>> +echo \"== Comparing images ==\"\n>>> +$QEMU_IMG compare $TEST_DIR/virtio0_inc_1 $TEST_IMG\n>>> +rm $TEST_DIR/virtio0_inc_0\n>>> +rm $TEST_DIR/virtio0_inc_1\n>>> +rm $CONFIG_FILE\n>>> +\n>>> +echo \"*** done\"\n>>> +status=0\n>>> \\ No newline at end of file\n>>> diff --git a/tests/qemu-iotests/193.out b/tests/qemu-iotests/193.out\n>>> new file mode 100644\n>>> index 0000000..3a836c2\n>>> --- /dev/null\n>>> +++ b/tests/qemu-iotests/193.out\n>>> @@ -0,0 +1,34 @@\n>>> +QA output created by 193\n>>> +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728\n>>> +\n>>> +Successfully Added Guest\n>>> +Successfully Added Drive\n>>> +\n>>> +== Creating backup ==\n>>> +QEMU X.Y.Z monitor - type 'help' for more information\n>>> +(qemu) Formatting 'TEST_DIR/virtio0_inc_0', fmt=qcow2 size=134217728\n>>> cluster_size=65536 lazy_refcounts=off refcount_bits=16\n>>> +quit\n>>> +\n>>> +== Comparing images ==\n>>> +Images are identical.\n>>> +\n>>> +== Writing Pattern ==\n>>> +QEMU X.Y.Z monitor - type 'help' for more information\n>>> +(qemu) qemu-io virtio0 \"write -P 0x22 0 1M\"\n>>> +\n>>> +== Creating backup ==\n>>> +Initial Backup does not exist\n>>> +== Writing Pattern ==\n>>> +wrote 1048576/1048576 bytes at offset 0\n>>> +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n>>> +(qemu) Formatting 'TEST_DIR/virtio0_inc_0', fmt=qcow2 size=134217728\n>>> cluster_size=65536 lazy_refcounts=off refcount_bits=16\n>>> +\n>>> +Formatting\n>>> '/home/ishani/Desktop/opw/qemu/tests/qemu-iotests/scratch/virtio0_inc_1',\n>>> fmt=qcow2 size=134217728\n>>> backing_file=/home/ishani/Desktop/opw/qemu/tests/qemu-iotests/scratch/virtio0_inc_0\n>>> backing_fmt=qcow2 encryption=off cluster_size=65536 lazy_refcounts=off\n>>> refcount_bits=16\n>>> +qemu-io virtio0 \"write -P 0x22 0 1M\"\n>>> +wrote 1048576/1048576 bytes at offset 0\n>>> +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n>>> +(qemu) quit\n>>> +\n>>> +== Comparing images ==\n>>> +Images are identical.\n>>> +*** done\n>>> diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group\n>>> index 33c945b..6b9e034 100644\n>>> --- a/tests/qemu-iotests/group\n>>> +++ b/tests/qemu-iotests/group\n>>> @@ -189,3 +189,4 @@\n>>>  191 rw auto\n>>>  192 rw auto quick\n>>>  194 rw auto migration quick\n>>> +193 rw auto\n>> \n>> Let's add this line after 192 before 194, and you can add 'quick' btw.\n>> \n>> Fam\n>> \n>>> --\n>>> 2.7.4\n>>>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=research.iiit.ac.in\n\theader.i=@research.iiit.ac.in header.b=\"h4nIqqPj\"; \n\tdkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xnn0B3RrYz9sCZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  7 Sep 2017 14:04:40 +1000 (AEST)","from localhost ([::1]:38731 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dpo3Q-0005o7-Mk\n\tfor incoming@patchwork.ozlabs.org; Thu, 07 Sep 2017 00:04:36 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:36347)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <chugh.ishani@research.iiit.ac.in>)\n\tid 1dpo2p-0005k6-5T\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 00:04:04 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <chugh.ishani@research.iiit.ac.in>)\n\tid 1dpo2j-0001bx-1J\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 00:03:58 -0400","from research.iiit.ac.in ([196.12.53.8]:33504)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <chugh.ishani@research.iiit.ac.in>)\n\tid 1dpo2h-0001YW-Nd\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 00:03:52 -0400","from localhost (localhost [127.0.0.1])\n\tby research.iiit.ac.in (Postfix) with ESMTP id 2DCCF741C06;\n\tThu,  7 Sep 2017 09:33:43 +0530 (IST)","from research.iiit.ac.in ([127.0.0.1])\n\tby localhost (research.iiit.ac.in [127.0.0.1]) (amavisd-new,\n\tport 10032)\n\twith ESMTP id 4UqAq8FQ5fuM; Thu,  7 Sep 2017 09:33:39 +0530 (IST)","from localhost (localhost [127.0.0.1])\n\tby research.iiit.ac.in (Postfix) with ESMTP id EBE59741CF2;\n\tThu,  7 Sep 2017 09:33:38 +0530 (IST)","from research.iiit.ac.in ([127.0.0.1])\n\tby localhost (research.iiit.ac.in [127.0.0.1]) (amavisd-new,\n\tport 10026)\n\twith ESMTP id bw1edNtwB2vZ; Thu,  7 Sep 2017 09:33:38 +0530 (IST)","from research.iiit.ac.in (localhost [127.0.0.1])\n\tby research.iiit.ac.in (Postfix) with ESMTP id D4CDF741C06;\n\tThu,  7 Sep 2017 09:33:38 +0530 (IST)"],"DKIM-Filter":"OpenDKIM Filter v2.9.2 research.iiit.ac.in EBE59741CF2","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=research.iiit.ac.in; \n\ts=4E8815E6-5B55-11E4-B758-8D4964374E96; t=1504757019;\n\tbh=1VroHj9AWYNdG9SUBRQIIfo7zxT9WrsRe4G329T+v80=;\n\th=Date:From:To:Message-ID:Subject:MIME-Version:Content-Type:\n\tContent-Transfer-Encoding;\n\tb=h4nIqqPj4cWMS+nR2mzavmyelVNZefF5LRPLgLWscWxjg0/OsSdKvXyHk407HAEcA\n\twOUlClTodvU5znNTUsVejefa8oZwq8rfaZkCA9deSHo5i4fG7521jUhY0ZQPSzc2md\n\tBX7o1CdczCXYlygTnPgeA0iMsPuEKGrA26Ndynuc=","X-Virus-Scanned":"amavisd-new at research.iiit.ac.in","Date":"Thu, 7 Sep 2017 09:33:38 +0530 (IST)","From":"Ishani <chugh.ishani@research.iiit.ac.in>","To":"jsnow <jsnow@redhat.com>","Message-ID":"<487942674.1966626.1504757018811.JavaMail.zimbra@research.iiit.ac.in>","In-Reply-To":"<5b41f64d-3a13-4314-4f0e-29864c940c2b@redhat.com>","References":"<1504120538-9309-1-git-send-email-chugh.ishani@research.iiit.ac.in>\n\t<1504120538-9309-4-git-send-email-chugh.ishani@research.iiit.ac.in>\n\t<20170831020210.GF17741@lemon.lan>\n\t<5b41f64d-3a13-4314-4f0e-29864c940c2b@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"7bit","X-Originating-IP":"[10.1.36.186]","X-Mailer":"Zimbra 8.6.0_GA_1194 (ZimbraWebClient - FF55 (Linux)/8.6.0_GA_1194)","Thread-Topic":"Backup Tool: Test for Incremental Backup","Thread-Index":"/Vg+nKM092fuTK23oLqzAhRxn0ClNg==","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"196.12.53.8","Subject":"Re: [Qemu-devel] [PATCH 3/3] Backup Tool: Test for Incremental\n\tBackup","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org,\n\tstefanha <stefanha@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]