From patchwork Thu Jul 5 08:00:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balamuruhan S X-Patchwork-Id: 10508355 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E3D6D603D7 for ; Thu, 5 Jul 2018 08:02:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5266289A1 for ; Thu, 5 Jul 2018 08:02:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C953B28E76; Thu, 5 Jul 2018 08:02:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A512F289A1 for ; Thu, 5 Jul 2018 08:02:28 +0000 (UTC) Received: from localhost ([::1]:50906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fazDe-0007jg-RY for patchwork-qemu-devel@patchwork.kernel.org; Thu, 05 Jul 2018 04:02:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fazC1-0006Zq-TB for qemu-devel@nongnu.org; Thu, 05 Jul 2018 04:00:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fazBv-0000WP-VY for qemu-devel@nongnu.org; Thu, 05 Jul 2018 04:00:46 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54834) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fazBv-0000US-MT for qemu-devel@nongnu.org; Thu, 05 Jul 2018 04:00:39 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w657sKGO024762 for ; Thu, 5 Jul 2018 04:00:38 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2k1c6tq07x-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 05 Jul 2018 04:00:37 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 5 Jul 2018 09:00:35 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 5 Jul 2018 09:00:32 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6580VFv41812140 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 5 Jul 2018 08:00:31 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 799F3A4055; Thu, 5 Jul 2018 11:00:56 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 801B5A4057; Thu, 5 Jul 2018 11:00:55 +0100 (BST) Received: from localhost.in.ibm.com (unknown [9.122.208.47]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 5 Jul 2018 11:00:55 +0100 (BST) From: Balamuruhan S To: qemu-devel@nongnu.org Date: Thu, 5 Jul 2018 13:30:16 +0530 X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180705080017.31123-1-bala24@linux.vnet.ibm.com> References: <20180705080017.31123-1-bala24@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18070508-0012-0000-0000-00000286F274 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18070508-0013-0000-0000-000020B878F6 Message-Id: <20180705080017.31123-2-bala24@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-07-05_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=898 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807050095 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 1/2] tests: add precopy multifd migration test with unix X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Balamuruhan S , dgilbert@redhat.com, peterx@redhat.com, quintela@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP multifd migration feature is in with commit: 35374cbdff, this patch adds test for it using unix socket. Signed-off-by: Balamuruhan S Reviewed-by: Peter Xu --- tests/migration-test.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/migration-test.c b/tests/migration-test.c index 3a85446f95..e2434e70ea 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@ -619,6 +619,36 @@ static void test_precopy_unix(void) g_free(uri); } +static void test_multifd_unix(void) +{ + char *uri = g_strdup_printf("unix:%s/migsocket", tmpfs); + QTestState *from, *to; + test_migrate_start(&from, &to, uri, false); + + /* set multifd capability on source and target */ + migrate_set_capability(from, "x-multifd", "true"); + migrate_set_capability(to, "x-multifd", "true"); + + /* Wait for the first serial output from the source */ + wait_for_serial("src_serial"); + + /* perform migration */ + migrate(from, uri); + + wait_for_migration_pass(from); + + if (!got_stop) { + qtest_qmp_eventwait(from, "STOP"); + } + + qtest_qmp_eventwait(to, "RESUME"); + + wait_for_serial("dest_serial"); + wait_for_migration_complete(from); + test_migrate_end(from, to, true); + g_free(uri); +} + int main(int argc, char **argv) { char template[] = "/tmp/migration-test-XXXXXX"; @@ -642,6 +672,7 @@ int main(int argc, char **argv) qtest_add_func("/migration/deprecated", test_deprecated); qtest_add_func("/migration/bad_dest", test_baddest); qtest_add_func("/migration/precopy/unix", test_precopy_unix); + qtest_add_func("/migration/multifd/unix", test_multifd_unix); ret = g_test_run();