From patchwork Mon Aug 14 18:54:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sistare X-Patchwork-Id: 1821108 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-03-30 header.b=jfGVtvRG; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RPkB51Dflz1yf2 for ; Tue, 15 Aug 2023 04:55:41 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qVcif-0005mX-Sh; Mon, 14 Aug 2023 14:55:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVciT-0005es-7A for qemu-devel@nongnu.org; Mon, 14 Aug 2023 14:55:02 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVciR-0007tR-O0 for qemu-devel@nongnu.org; Mon, 14 Aug 2023 14:55:00 -0400 Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37EGTtYO017837; Mon, 14 Aug 2023 18:54:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2023-03-30; bh=VnhlG20u0xC5hzaC0iIyooQYVErHgQEy5Ekmo5M5R94=; b=jfGVtvRGGP2yDMUblLpnqiAK6OoacgqIfvenQkmTEetKcEkVernp3+1QBmsv2Ur2eIbF 3qs8mxzEjnkz74Txbup3D4dkkUbbRwabdHBn6/1/6QB4JAurW4GmxftK9Agw90JfIxUu Aj4LqWFMs6pSZN+hTag/iqVgiBwEWGX/1J0eNNgzZm0ddH+vIgW8So4risD/nmv8Hhdk HHQb8ilX6tnqczNaomnlCGkV42B88ZwsJxGE0XFCip2bs8lwCz4SrVNTRPebeHVvIEYN FRiKZxiohAqiTQFECqSzrZP9y4KsVCIkM1PuzoXK6TVsgnJvPq0gXRpEOkWY8Y5QeIf0 Hw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3se61c37kx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Aug 2023 18:54:48 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 37EIrFdq006639; Mon, 14 Aug 2023 18:54:48 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3sey2c8x86-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Aug 2023 18:54:48 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 37EIsb47008127; Mon, 14 Aug 2023 18:54:47 GMT Received: from ca-dev63.us.oracle.com (ca-dev63.us.oracle.com [10.211.8.221]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3sey2c8x3f-11; Mon, 14 Aug 2023 18:54:47 +0000 From: Steve Sistare To: qemu-devel@nongnu.org Cc: Juan Quintela , Peter Xu , Paolo Bonzini , Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Steve Sistare Subject: [PATCH V3 10/10] tests/qtest: background migration with suspend Date: Mon, 14 Aug 2023 11:54:36 -0700 Message-Id: <1692039276-148610-11-git-send-email-steven.sistare@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1692039276-148610-1-git-send-email-steven.sistare@oracle.com> References: <1692039276-148610-1-git-send-email-steven.sistare@oracle.com> X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-14_15,2023-08-10_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 adultscore=0 spamscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308140175 X-Proofpoint-GUID: 4avvoGvNdO1XwLSCt8Dhhe5-S68RnGCp X-Proofpoint-ORIG-GUID: 4avvoGvNdO1XwLSCt8Dhhe5-S68RnGCp Received-SPF: pass client-ip=205.220.177.32; envelope-from=steven.sistare@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Add a test case to verify that the suspended state is handled correctly by a background migration. The test suspends the src, migrates, then wakes the dest. Signed-off-by: Steve Sistare --- tests/qtest/migration-test.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index d99620a..3c9e487 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -1678,6 +1678,26 @@ static void test_precopy_unix_suspend_notlive(void) test_precopy_common(&args); } +static void *test_bg_suspend_start(QTestState *from, QTestState *to) +{ + migrate_set_capability(from, "background-snapshot", true); + return NULL; +} + +static void test_bg_suspend(void) +{ + g_autofree char *uri = g_strdup_printf("unix:%s/migsocket", tmpfs); + MigrateCommon args = { + .listen_uri = uri, + .connect_uri = uri, + .live = true, /* runs fast, the src suspends immediately. */ + .start.suspend_me = true, + .start_hook = test_bg_suspend_start + }; + + test_precopy_common(&args); +} + static void test_precopy_unix_dirty_ring(void) { g_autofree char *uri = g_strdup_printf("unix:%s/migsocket", tmpfs); @@ -2904,6 +2924,7 @@ int main(int argc, char **argv) if (is_x86) { qtest_add_func("/migration/postcopy/suspend", test_postcopy_suspend); + qtest_add_func("/migration/bg/suspend", test_bg_suspend); } }