From patchwork Wed Jul 5 14:02:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9826579 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 2759E60317 for ; Wed, 5 Jul 2017 14:06:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C286284FE for ; Wed, 5 Jul 2017 14:06:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0077A2850D; Wed, 5 Jul 2017 14:06:00 +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=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 60593284FE for ; Wed, 5 Jul 2017 14:06:00 +0000 (UTC) Received: from localhost ([::1]:46394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSkwJ-0006aZ-GX for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Jul 2017 10:05:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSkt4-0004nE-H7 for qemu-devel@nongnu.org; Wed, 05 Jul 2017 10:02:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSkt0-0007p6-GW for qemu-devel@nongnu.org; Wed, 05 Jul 2017 10:02:38 -0400 Received: from mail-eopbgr40115.outbound.protection.outlook.com ([40.107.4.115]:5184 helo=EUR03-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSkt0-0007nB-7D for qemu-devel@nongnu.org; Wed, 05 Jul 2017 10:02:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=53U5Dtr7BoR5HtnVDqYtFy9SBIEjnFTrZaVFPDNef8E=; b=P7EzNT761er8COOZVHGaT6mdG6zM8ko+OaphVyxD9W8wDobMK5xBDeqRZWquF/V2lVKubb0u6WIcWMq9ZE2r7WZH9bYw4FQHCjTA6Vcx/qmeq8Rn2Z1oZ/lSnUFmIZ5i7iTMY5l3/XMRxmRsgfwcOmPTaKHBzyPlTdCFTbL1SnM= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by HE1PR0801MB1996.eurprd08.prod.outlook.com (2603:10a6:3:50::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11; Wed, 5 Jul 2017 14:02:31 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 17:02:00 +0300 Message-ID: <1499263324-15184-10-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499263324-15184-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1499263324-15184-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: DB6PR02CA0007.eurprd02.prod.outlook.com (2603:10a6:6:15::20) To HE1PR0801MB1996.eurprd08.prod.outlook.com (2603:10a6:3:50::9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3ff2c4da-e58b-4d32-4768-08d4c3ae7b7f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:HE1PR0801MB1996; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 3:jW/8hYcz+tC/qsf+GKKZnHWqJKaNXLQak/kE/uVImnnulqEYbUCBbgkudbbXQvelNo0RYfeu+693RogVsU9kswFrj8tD3s8aUKYs/cTUboTP+SlvDc62S8rsfhc4AKeSC5uuYRQfvuaU1iDqa2tBbPkG0MhQTVK5EA8Ky60h/T1s11E53ZueFwCBVuesQDUeQnpZxSywvBSlJ/7RadjNCDAmkQBRrJuse05pqBLFtNf/kdjgrIkCs/Fit/vU9J6kC3TavLHJs9okp1OAfqBDNZtD6ZPPhSOsAYR/5LDzMkIc/t6i/39ASif9ubhpZ3qQPCpDtNQB8mxEYAh3eGXKTHUNnbzBtlEvPJg43skAvrEL/CwYuq/yjzz7mpVN5xOUOYRtvuFDV70l7HtmRA5fMj4nVV2Q69b9QT8+zgKCNeG4Jgi0O8/mDemzAP0vVrDBLBH7SgGjnznjsmTk7FlLmgZupuGcY7EJAs0KlLYKJMHXjKul7OVo47iJygyOlPrWHmczkOOcF6II+s++ypnVL8Z3Em+C/vCgc3aFMM4DHxG64qEbVeqaO36La+s6kTQ92NDvzqF+TtG2GqQ/t3atch+h32TZJEpfX3HS04jyD2WzVrRwGv9IZXJMY7nRgcTxl4nLshp0ejvUy8gdgHkM4ESGvrH8FeQqZ/6FC77nO6Vgc1NMqSx/7P9zYBOLz3eRQZgzQRhBIstnxlcTHpJZfMpkSpg4QQRoQYbfaSxuD8//cilxJA5pkkGSt6z5VyiA X-MS-TrafficT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RZkJUNBtZrMAeruVHiRM0LQ/HKfFrbug+oqePppoFnsEMg2Gczk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(6041248)(20161123560025)(20161123558100)(20161123562025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0801MB1996; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0801MB1996; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0801MB1996; 4:k1U+n96xBKjyG32/40RNmfbKYd4y9QZWIAoB/xsw?= =?us-ascii?Q?REDPUF38iUi/rMRwXZxGKzDiN+fS2EO8ur295NvZYpLhJgKAZfPmoDoc7SuU?= =?us-ascii?Q?iKZNmr3kJ/Ik1Cr0UPW5T1NYLQeIhF24l2t1Z10Jz+qKoPlTjJzyB5Y7LGB2?= =?us-ascii?Q?zqDInhEAcrfWizbuw7J0uCpQ/NmWTamg2Uwo0kAQNGz2mS2vsQvrE8dYIVuI?= =?us-ascii?Q?gsGE8uYjwg7RsFXosTavqcHd6UGV7w44DYk4Qp4ccnv/TlMa/djS9+fnj/6P?= =?us-ascii?Q?ibNl7oajxsr83XUG3MhH9KdD93gD2iRnrNHoFhdrsAIIOurh0m0zbudASmax?= =?us-ascii?Q?WjtRSeh7Cw1lki8xi+Skciuj4W5mb9x2mQF1mMz4+fTVNEXB8Q6yao0pGCN5?= =?us-ascii?Q?xFm6mPA/hvKzYRyWVgtNgt2/TntaECqN3PDAddvY5+Fsc3JYhIThKoEcm9gJ?= =?us-ascii?Q?KeebN0TzMAweYvrwssLDbSSV2qZOkKa8c8fOis6gI4NbAE4Y6ZA5YepjiLjf?= =?us-ascii?Q?NDWug9fU2DaBYya1fwilo+yaa0Gf3zmqmh2uq5HvTaWwuvGEmQSS+2jeBve3?= =?us-ascii?Q?Hj45FTChvQjeUPYe643/dvKBUwVFVNVZq6tNcfz/VERz/9hWlvDRHjZT6VBr?= =?us-ascii?Q?X8li6qudIHvJreQw4f5JYEL+6hm30zyQmVMb3kkhkTldUaeKb9j2PryFa98b?= =?us-ascii?Q?DD8ePMUu6Gq7aTF3eefWbRmBxI7/guUH1XMEqpwbGklajrNWp59y9nx9IOVn?= =?us-ascii?Q?QijdxbsDj7FsafRubF+Lhr5FyHeDOSCM9torrEEu2nnqO9ha4e7dZiKQC9Y0?= =?us-ascii?Q?7lKl0pvQdxdxOZxZeLBXlfo/YzAnhLdfTGNmydJZXNTOLiOWOAgTYdb+AOIt?= =?us-ascii?Q?qa3BHNicyOmoRMALIN3VlXzM73aXaiTmtlS8yJnCvu94CRhYHTKz3Svec0yo?= =?us-ascii?Q?pUygZjUYrlKwPGCKUqVDgdPSdFSNQJsCIrj5Lh2/D+YCMMliCMRt6xK+rzLq?= =?us-ascii?Q?x1DNB0H1Iwu4bC2ZbDLziR8Hvg/sC3X+GTY0l6puUKhKpTMu09aiCo7Hnt+v?= =?us-ascii?Q?aiKenhH5sdbp3xKXPDZs3bD5M0CwKhQt2R0cYDGvUvuGC5LFha0wnGKIHJBZ?= =?us-ascii?Q?FFB9+Ag+I3oJaWfeX3xTkk9cNDsX30WaYILV9Fvn1Yiw1Ifm/O88LzUwlVgk?= =?us-ascii?Q?3HaLv2Ib9l3pT6Y=3D?= X-Forefront-PRVS: 0359162B6D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39450400003)(39840400002)(39400400002)(39410400002)(6116002)(3846002)(8676002)(2950100002)(2361001)(6666003)(33646002)(2351001)(53936002)(86362001)(2906002)(38730400002)(107886003)(110136004)(50226002)(42186005)(6512007)(81166006)(4326008)(25786009)(50986999)(478600001)(189998001)(2870700001)(76176999)(5660300001)(6506006)(6486002)(66066001)(50466002)(36756003)(23676002)(7736002)(6916009)(47776003)(305945005)(53416004); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0801MB1996; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0801MB1996; 23:VD4ts3J7xKSfNP3GeHi/AV6VBpaV4nwT+hTAWU0?= =?us-ascii?Q?6CpGCnGz+abpG8gYPdjKwTMhXhnYkqSsQKpqURSzbHHgZo5kW+uYqtACclGR?= =?us-ascii?Q?PMi/PlQhQZFyh70Sj/m2rpjn1yZ7ME8VS2NNMwUuhYoZyaj4UWBsNTcKjMjJ?= =?us-ascii?Q?4E4wMJSSGxVy4CWN7++BL9/VE4a8vFhHY59wrvxQPIT9+6Np/0Fx69IIrrg0?= =?us-ascii?Q?7EdPrIJElyOppe1ydJepnvkxpPpf3Lvx6vHFLX8Ynz+1DYpNos5LtJ58Viqb?= =?us-ascii?Q?IKbFAZukDopJZgJx4MOcl/q4JVD0pLV2AtanGck4RwYIO5PHVH7X7Q5yvans?= =?us-ascii?Q?wyO5Qm3kJNOPibhTlz4Kzt83yQ4U1bJBW6xW57rBGjmfWSyY7cMe1kYfWtEJ?= =?us-ascii?Q?gTNikPb+HCY4WV7ws7gw09OeaHnqXGANDY16ZhGEXzY+ylSfoaG7S5sFq9DY?= =?us-ascii?Q?V1av3nIFPlCKekwwj5E8kl1Ksad1BOMaGyoztMDSEceYjxS7HoRkz1jgBcg4?= =?us-ascii?Q?D1SZUyLEoNJfZasytL237PB/vjCEy2mI2HQvEULJfYuqp7ljnoWNRyPT/AZ/?= =?us-ascii?Q?CM8G5kNBu2HBgQhMkI39E2J5AZGcn35a3RHaVDifyCa13eJHt8873HH7kWG/?= =?us-ascii?Q?jJ0BwWY9coeMOnpSF/X2qfc1RGNBqYmio8LHMCtM4+nynR1niBE/+dgkG6RS?= =?us-ascii?Q?Seqt/jgZOjFdbacVv5AhEmgKa1YdjVc6VpG24vLizcjIYm+GrQUu+uUCOtA+?= =?us-ascii?Q?DkoH0Gp7OBFpwsIp7Z05TC7G/mGaxR34EAiC6AiED/BrGmsJY0J9JDw8TP5P?= =?us-ascii?Q?OCfcfVZ3xjwmgf/SilQaYpwT3edIZ89sX5KKn/vQDmgBiTFrJqzjjAYDY6wQ?= =?us-ascii?Q?B5d12ZOxnNEOzMSFWC3C9SRze/p4atblYSAqdi/OjxJdev4t7FZwE/Qc840c?= =?us-ascii?Q?BPcEfwlT7xvC4vNgKjaMOWYkf8v8dnMP5QtJ9bvA4zSUx05YSIqCoFwFUqcB?= =?us-ascii?Q?qpWhSBo+YBVygzbn8F0jyddpkX5rNaerWUt2oZ+3DydAf1ZVA7Ic8PokPikO?= =?us-ascii?Q?SjsSJZJyaoD8At3G60fvCcg0HP/GB?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0801MB1996; 6:zUIdU/wiFbJPtrGtxQuK/1llkjKBITPLGlOirPfP?= =?us-ascii?Q?Uku1SXTPpbC36/y4jeOVNIyBVLruT/u0ibBHfZsZO9C05mwuEh8MprX/RVko?= =?us-ascii?Q?Y4vApTavbfNZ28Q9QfKRYPM41y4ieZjmP/yVXsw8fhjofhj+KYp4GGYdspZt?= =?us-ascii?Q?FDaKK0Afu8Hubfl5d0gHUVf65RQlrHBGirTNcd45P56OnevEeyse/Dm0/qWM?= =?us-ascii?Q?cxTZWyC04QU8uPL2mCKvTeVkpW2nXMcPkElzDm2ikkzf56SKrDDGeaZkWxkj?= =?us-ascii?Q?mAMz708KIUr4pUG2KGTt2gjidmnnCyVyVGHTMunVs8QnGZ2ib03gQFzjFm9z?= =?us-ascii?Q?Vq64W1xW8HXbzlPpGfREdf0CJm9wq/r8PkzAiMvquG5jQdT0hOagBeJ4QOZ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fcZYzOQtGwlOFBHCprYGGR9poxLxvMt8X5TlnBiWM7O0W0MlVCAxzHxHan7PNKYGVqZ2FUA7nNYfKml2RSd1nnlv9aIsCOqWubvV9h8q8I/OHh0KtmZqpYRKyTslUOFrogQ9X6pbOdkjlNQWpXqmvPnooE= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 20:dCw0ydllJStDn/KnAaZqw+U8e7oYDUl8uHtvSyJkMslQ5oYuyDowaVE05Ir/08/ATk0zWIbYXvXA3OeLoc8Z9l4KvnTic8aXR2dtwy8Z9oLREqkS/WU651Tbx3MH3iYZa1YIGZu6A7s7UbwbFDQRh25PjO13kY87Fj4nUcWI918= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2017 14:02:31.7872 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1996 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.4.115 Subject: [Qemu-devel] [PATCH v5 09/13] test-char: add hotswap test 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: Anton Nefedov , den@virtuozzo.com, amit@kernel.org, mst@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Anton Nefedov Reviewed-by: Marc-André Lureau --- tests/test-char.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/tests/test-char.c b/tests/test-char.c index de72974..9ca233f 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -662,6 +662,76 @@ static void char_invalid_test(void) g_assert_null(chr); } +static int chardev_change(void *opaque) +{ + return 0; +} + +static int chardev_change_denied(void *opaque) +{ + return -1; +} + +static void char_hotswap_test(void) +{ + char *chr_args; + Chardev *chr; + CharBackend be; + + gchar *tmp_path = g_dir_make_tmp("qemu-test-char.XXXXXX", NULL); + char *filename = g_build_filename(tmp_path, "file", NULL); + ChardevFile file = { .out = filename }; + ChardevBackend backend = { .type = CHARDEV_BACKEND_KIND_FILE, + .u.file.data = &file }; + ChardevReturn *ret; + + int port; + int sock = make_udp_socket(&port); + g_assert_cmpint(sock, >, 0); + + chr_args = g_strdup_printf("udp:127.0.0.1:%d", port); + + chr = qemu_chr_new("chardev", chr_args); + qemu_chr_fe_init(&be, chr, &error_abort); + + /* check that chardev operates correctly */ + char_udp_test_internal(chr, sock); + + /* set the handler that denies the hotswap */ + qemu_chr_fe_set_handlers(&be, NULL, NULL, + NULL, chardev_change_denied, NULL, NULL, true); + + /* now, change is denied and has to keep the old backend operating */ + ret = qmp_chardev_change("chardev", &backend, NULL); + g_assert(!ret); + g_assert(be.chr == chr); + + char_udp_test_internal(chr, sock); + + /* now allow the change */ + qemu_chr_fe_set_handlers(&be, NULL, NULL, + NULL, chardev_change, NULL, NULL, true); + + /* has to succeed now */ + ret = qmp_chardev_change("chardev", &backend, &error_abort); + g_assert(be.chr != chr); + + close(sock); + chr = be.chr; + + /* run the file chardev test */ + char_file_test_internal(chr, filename); + + object_unparent(OBJECT(chr)); + + qapi_free_ChardevReturn(ret); + g_unlink(filename); + g_free(filename); + g_rmdir(tmp_path); + g_free(tmp_path); + g_free(chr_args); +} + int main(int argc, char **argv) { qemu_init_main_loop(&error_abort); @@ -696,6 +766,7 @@ int main(int argc, char **argv) #ifdef HAVE_CHARDEV_SERIAL g_test_add_func("/char/serial", char_serial_test); #endif + g_test_add_func("/char/hotswap", char_hotswap_test); return g_test_run(); }