From patchwork Thu Jul 6 12:08:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9828117 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 595B760361 for ; Thu, 6 Jul 2017 12:18:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49A0D28573 for ; Thu, 6 Jul 2017 12:18:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D4D228631; Thu, 6 Jul 2017 12:18:37 +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 94FC028573 for ; Thu, 6 Jul 2017 12:18:36 +0000 (UTC) Received: from localhost ([::1]:51187 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dT5jv-0003cS-Oc for patchwork-qemu-devel@patchwork.kernel.org; Thu, 06 Jul 2017 08:18:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dT5c5-0005se-By for qemu-devel@nongnu.org; Thu, 06 Jul 2017 08:10:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dT5c1-0004tF-B1 for qemu-devel@nongnu.org; Thu, 06 Jul 2017 08:10:29 -0400 Received: from mail-ve1eur01on0108.outbound.protection.outlook.com ([104.47.1.108]:65168 helo=EUR01-VE1-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 1dT5c0-0004se-Rn for qemu-devel@nongnu.org; Thu, 06 Jul 2017 08:10:25 -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=D0aWIvb+jyXfJdI5EaGN13K/lor3hOfAV5CewDMkdxh4hY08aJMJuC5UFE2gnJj84x7Y/rpbX92Qsb5/YGWUfjAWB3vTFAtksF7/UW0jkyIbOvYLvc3bAB6a1I49S1Ct5DmTjdlZPoSBYR2kSA65lbKtyApJ2lYeZgUHQN2ndxc= 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 AM5PR0801MB1985.eurprd08.prod.outlook.com (2603:10a6:203:4b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1240.13; Thu, 6 Jul 2017 12:10:17 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Thu, 6 Jul 2017 15:08:56 +0300 Message-ID: <1499342940-56739-10-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499342940-56739-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1499342940-56739-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HK2PR02CA0118.apcprd02.prod.outlook.com (2a01:111:e400:79aa::44) To AM5PR0801MB1985.eurprd08.prod.outlook.com (2603:10a6:203:4b::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1c7b556d-5f92-4d40-344a-08d4c467fa34 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:AM5PR0801MB1985; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1985; 3:1bD1Dd4lwZwUdkfpugeccrpIo6wFCftS4AMkyjQukGbS7710CACQ/yIa5W5NrBCFcN5Bu6QieFHVeIAkdlhrP5S7+JNfQYzo/QXm4NJ3he35FkfoqFeaNPV1rnSCqSJWRAtD+tFvTKu2zUnn8+UrJctTuPzrjs3ltVSgVqjosgnd/QJYi44xA3a45PrEtCDcms8cl3ELfb29XCrKkbWQk7mFv+miQfhaJH4E2maANGfooA24Ci2xpF0R5+qwMDs2jjcJzXDwyJl+bwKD+6oOsKtUXoiJ9zxtloIgI9Dt58p2Nb0W4TwA8GjDvEtljDkM7M72dOyOfx7TlDCEpbDbhKuiIX86Vft4JSiluibiEs5FfglhenzY9ncX0k/+jT4ChR0wLJDlvZmqXodyqRfyatpz+cxNgIMeB0Vf7QoDH4M3dajrK4okTXaFqqYEPA/9DO6ngigdB1AOjRdTYParldaBO+NhIQnhrA2BlwWWPqLbN/fRlc6RkMBjVFUFPUqSdBiQKtVCRgRKiluYZZ817oCEFR0LJF2PF538nubbCTplB0NXAOQWwrkYzTWQO6wG3Kz6qXzlTGlIu0v6iOlR6H6KTKkJHBT6R5dJQResUa8e4ZzGraMGH0OQV2JlW+iNXWYj3lwQGvlBi59xZ/PaGRa+GAWtGgUcsGijqqFbSTz5fSRcE2PxZAJ8rgzPRa/4rK9Slm+zceTrGAgVQvZHLq0/kkWSetOWBX2z7MQ9rkPxJy/qVUHIKqQ7BWiJp1iY X-MS-TrafficTypeDiagnostic: AM5PR0801MB1985: X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1985; 25:vYENYmAEBOE9j4XsxyiqIv0P7Nbh8Sv6kc8nITMYSHTgg0AjUTLKDxUliZO+NBK69FJUV7hHKEbxCilq3hD9TJdQffYGqFFiQ0CK25R24P+G2sZJr8fBUebPyl/5UJswa9PektGjPSHnkeD1BEkh5DiSlpus5r008U4pIEuThGeroljZDIiKS21GjupvdMpf2e+4sT8U5PG+MPTzZZbJ2nCs3XY3pai8RzBV03ZVtMmIHj2AykQh1FZOrKjUyk8R+f7bleHeb/NcPUEP4hiPzvR+O+614etI0PEtRP7K4asu4fdj7/O+vCVVThq/DJc1qTeuMjz7KVbGayWaSEKsTfden0ejrEp81NmPV/zLXXPHOcRtVW14Io1e5czKbCFsivwaH5WwXVBycVlXOOIPWVpu9KZzY13YDD/jgLGStqdpY3xDAm0DC2hZ34UM0yKQUfo3X7HlFKLCI/s9/nRjIj5dxSMMppHgYpvgqjbxdDjR5cZrB039/fXFj9stqoNbo7ORz73TuPvoSkrpSerENeVYFT7u8kgN4p3VQFA3T4xgUSt97n4Azu91xUyILNK52MCye91BTsRAodERJ8WpTqCk6hOLQpSawDPEYSLgRCsCv8hq9J7k0RtgM5P1xIkElxwSas0tTySnQ+QWrgSF7lzMCQJYlbZ4+yszwHr8TBM+jV5X+xF3nH4UvZiR94H8eiVanaYf/jST9HeJU1txWa49x3Zz2pfFBvhb/8owNo87RI0M6JfFH2AcZFE25CctD7LLHfLbS2lEyuN6j2b00+aJH+uGniWzDw2DtNZQeNyWV8nxEP642hZSpRn5ao6jonLgipal9Gsu0DqEBsvn4AVCcVq6AAaVTyeXBE9v/bhk63CzsWaZ/zBIMdmPF1wlY91qxW5fc7x+CGZzwNApU1usy6UZKo/GJ2ASfQrePvU= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1985; 31:LGh8UDmOhnvOAPdbS4s7br5LqLwc0I39ewYoiHDOCE1zVchmcMKAKRK8dOy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g= 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)(2017060910047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM5PR0801MB1985; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5PR0801MB1985; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1985; 4:XSLb/JJo56u9i8t804G9x/+qMi4oEJvrsu6ChVe7?= =?us-ascii?Q?paNbr6YWTa6DLwil7yT+zdEmTXcrFAA96R33fvpeUorVTtkRd3x+cuzR22Dv?= =?us-ascii?Q?2bUZRvyQQSG9r9NCGFcqbJ86N/p2lz/7antkoSbDREucrvC71s5Cb5dTE3cs?= =?us-ascii?Q?LXprLOlwBnpJPDRiS6NdZ9rbZA5aA7Ev9JaHcgjM++TXYP7RStvvI6ORhNQL?= =?us-ascii?Q?qh1NU4e6IFKkdUjkjOWek+YLJh8H+Bz7pHuCGT2y6xCZRX8GE0D2X95n1CiW?= =?us-ascii?Q?cpVsy6WR3M4bAS6g3o/yzRnNPsEjCALujwsKG5cdbSvuXjJCV0Kv6EAT+2Gf?= =?us-ascii?Q?9DKUj54i70m8LJzS+GDhFc7DFSAnOsEUn8sXhNHz0G1Hl1jYOs3G56Q9FkTa?= =?us-ascii?Q?/WZEIZI/7aRbx8eVpCvVgPHTuXgPnGGOzcZfgEya/crxSlSqU4sueDednNC+?= =?us-ascii?Q?cuxPysuMkmzfX5yJ8KlvVFpSQiX9PlNvZcwq3kDsn95Ul2CZgvUMxz8pJQit?= =?us-ascii?Q?nGLf1+Re4Oty9CR8kJLWcuOFrwr/iZVsh4mhjtWiH/u0seNTJPE0A6DFq3Ke?= =?us-ascii?Q?DnUcXhY+xQc9x0D2SBNCh+jjXinjT2EosGJOk1goxUdlqVjOguQUWioqMVzi?= =?us-ascii?Q?/1piiRIRrClwv3fGs4zs73KDtzeoVkccrmgHb1hq3VWzpl1hs7dmyyXgVSgG?= =?us-ascii?Q?LkT3wmuhQowH3SgqHxYuV/5rmTtr1AzFfZCXn4XZ9BMNsl73OIdbRVBEdx/o?= =?us-ascii?Q?auMu4/gJpTOcCdcr90yPBFrJdnC8xQvFL6JOWX+Qfjzfv1cpNVgVSVynUv4x?= =?us-ascii?Q?zk46mYxBBo2vzJOsoq0jNeEg86702Wx5Shwn9Jw2FROrZ6HZSyl5ecYYjhPA?= =?us-ascii?Q?Us6qpd8TUBhOZrmiv3R86adtMvRKGSqNlLMidYBe7g+7YIjnB/2Dr6yLoyXE?= =?us-ascii?Q?7yvoBpG/bw+CgOvbnEjSlXYrjdKc1rEQ++TM1nrl8LKMVzKM70oJ2hNUqFxp?= =?us-ascii?Q?Cpfvv4oA8YE6ADqu9xJ5EDYleO+P/hR1FZnQfcTHE5zqssrCDMb5WYxAzd2o?= =?us-ascii?Q?Gpjwi7O3OIIL2qEABqdnFo7tDuYMcr1RqED9PPSDUhbSZYH35yzUFPR45m5Z?= =?us-ascii?Q?B9fvt49xt+obeJQ4ZCCdgu5/y2ZmwVwGfemV9PiE3ohmZaINLQXEe+gJAzrJ?= =?us-ascii?Q?rODAYWvxJRO+yHdS+Qi6JUgavGamVu1/86phvjCrkZLGnAcLZV+HU+JZEg?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 03607C04F0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39450400003)(39400400002)(39840400002)(39410400002)(2870700001)(81166006)(8676002)(36756003)(2351001)(23676002)(50226002)(25786009)(86362001)(50466002)(305945005)(478600001)(5660300001)(189998001)(6116002)(3846002)(7736002)(4326008)(107886003)(38730400002)(66066001)(110136004)(47776003)(2950100002)(53936002)(6666003)(76176999)(6506006)(6512007)(2361001)(6916009)(33646002)(50986999)(42186005)(6486002)(2906002)(53416004); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1985; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1985; 23:bZtIZPFObJsTXcTVB3qDrVz+5Jqx3xSYUBdyWUb?= =?us-ascii?Q?cSuBcB94Wq46mNachmCqLAmzQHFPR06rPyVqZh7AHBUD92dgaUa97oGVaoWq?= =?us-ascii?Q?y0v/xw5QDulI9MdlQLwqfehGOUlLeUzaaWMEmhcYDcJSrQuXodPITC/bugX3?= =?us-ascii?Q?30lSyEkA4qsMGb+/Xlm0AjQ74dtQ6BuA8q4H+H8eEJyseUQYd8Sz+EdEGUpw?= =?us-ascii?Q?bLk4pbdqqfLqwQgiV/h0aDm4bsSpezsn7WEGxY27L0RKnaj//3Bdh7ipInVB?= =?us-ascii?Q?JK9xVaDc47ItB78hZIYk9H+g7qH5jOjxwqlZG79kWMR9h0yS28TBeTWFrLHB?= =?us-ascii?Q?2JgssWPHkLcwwA9wk4Vuq4bIIBndoiW1GwVYLyu2mKn3ydzXAf3cxNb54BWm?= =?us-ascii?Q?1UwOGjWBWGPs7vn33KF+dQ6l49+r1zbw6bbCaUTjSOMUbUfS95sY2lrD7N7U?= =?us-ascii?Q?unlygQMp/0c5z4naQT2RvbBE9fQo2Mery9avvy1QL6tIjJDwxGg8QoiVnRso?= =?us-ascii?Q?nfMCd/sEywQndWI2eh8n02fOZ2GgzZGZpzG8ERgbXwRTB4U/xf5Fa74lz9ik?= =?us-ascii?Q?Llfy4mUm/tcAY2OwLfWrLHM63epey5TFlL7dPY2KdVcW75c3btUOzTiR9gCb?= =?us-ascii?Q?vlHM/wH73ONmkwiNJ53nHVMjniNk+Z0uGtVFWgyw8U0Skcwfzehp+grkc40B?= =?us-ascii?Q?t53O/DAcy03ztoNf2TTpj7lROH0oO6jdAMNO7o+gx6AweZLUwi+WyENjzLTt?= =?us-ascii?Q?SELt5iSbLCGP9vrqFlibTq9Vd21M/+6CRVTHvLgGAiartvpN6iK2UUsAQ3s7?= =?us-ascii?Q?ypUwGryTspk8JNebvOeoibR/ebZ6VyVIbH6nRa+lO05sRnlMcJirBWuPEcXu?= =?us-ascii?Q?Qb5iEgxi3r30q8E5N5LOxEBE2XJ47zaWE4niKHgjKVpB4qzmh2+Ih4MbOpiN?= =?us-ascii?Q?3P2vmxErJdpuVtx4Lmv+G2AFS7ur6T06NaylV9MK5QvR4nQijKIMpJeBWIJI?= =?us-ascii?Q?79E0Le9VlkqOkt/p8O7+pDo13TvIMvcg1AvdZ6TvjbQZki8xC//EwPSCDrBf?= =?us-ascii?Q?YWYVBW9u3PcsQfK9iNf2qxixS872S?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1985; 6:mlxLncFinPZiX7xFYBCL+HNCNmocIXh4OlCD74pp?= =?us-ascii?Q?OqKeBP+Uod/IUsIep7oxAR97mnuAvdxk+1CcV9iRfbCDfPRG098E+wGFRwUE?= =?us-ascii?Q?1eSwjrd6PUAB05Glc3XpemZyShhvSMNix5ODLJGChpoXbcdIk3vr4if2K6sX?= =?us-ascii?Q?dKEKj0Lpmu5MaAG5qiUYmVD9Rddh7ec33mAj8I8lJNG8GYMPj5a5aWEHuEnN?= =?us-ascii?Q?01JiuO3ORrnhNB1ACcyg5al6WHNrTGcDWmta4YC3+bozWBIwjH4ir7+X5YYw?= =?us-ascii?Q?FQ1S/3WGpGo5FVF3+FZy1NQ/0LGg8jcLE4Oh2JILOkXR4vWbVaOXEw7i7qVa?= =?us-ascii?Q?mJPkUOpIJzgCIKsD3eouUGJgXM7V71kk9LwR9SvpwZfnS4G0mBTmTm+C4Exk?= =?us-ascii?Q?izLxjdH1Sq3Jkf+S2zt0Ks/Z4a40Eob4xGZa+HfMgTP0hMt0Ij4URU7aB3iV?= =?us-ascii?Q?tJmC9f9ZMxkI2KSfGiRj3waj1pI/DvQD/O+nrtlfqpGrkcReCBZk7TS8S+Fr?= =?us-ascii?Q?DKZQDtn44LRHJHEcbRTnWxjQ2CpS9wZwcZEWrY+AXHdHISSL+788reUaT+9U?= =?us-ascii?Q?NfgqekAL/MROeG6AP4JASZQrI/9soW3uTsQgeXE9KE60z91n/AtGeK+6gWOG?= =?us-ascii?Q?CdP4qp9LnVcgVt4SHxnz9OyojHv2alydqSyXuCIY32t5RHjDLw7ytslw7LfH?= =?us-ascii?Q?jMkxw3aQSVX/0S9v2m430mzPSQ/7/zz7iE8812wz0L+5J/enNorKp4bcpTXv?= =?us-ascii?Q?opNsjBQuOmRILu3kVM7j6jteAj+dx/ELOSYJCGEdegKPT6jM1uAFm8vPagm2?= =?us-ascii?Q?16o7MjTjGWuBaNuaCuNLm+r4zllV9ulKz4viO2MVkmjoUxg+NSGaFksrTx/O?= =?us-ascii?Q?qpBeP+4oVRO30PeKmRquBWaosZzXxHwRzirgDEvh+XlErtlTybJ8y3S8QnpW?= =?us-ascii?Q?9C/BAU39tawitl/6RkXndwCUXwKsqE2eNzBh0CSEwimB12s2lN6fThorKmnG?= =?us-ascii?Q?vKY=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1985; 5:2meICU8vSgewDoD4fnPdFakk6d/iBXabIYQMoVwCY48UYIgJFcCHPkDKm+VdMOnFSvc+r1XlhNVMkQHXGA4OX//IQ+BY27RugIyMlX/cGlDB6xIlh60fY30eSHXfArjAXtBW9B75GfZf3RQvDqy/DricjZqzybHHElmkPPuCbxO7df/7IwqEbAsX3+PsM72q/xRtiaz6qKFCpbafJZr333FeZQJN/UAEz4O8KONayIB1Uez8pp2squ1fq50EQlE3jGQQPpo+vIjGjjtG4w74l0quS8f07UOnG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TGU5GVZsjv52kJl1W+8zWXd9/FmteOx6pZFwsZnxvHu8Jlch7r7TitNfarjJtHgCUO3hXsKMLOP8WiF+0nUstPMsTfskq7dPNWCUGzxYUzH2LIWySkd6kOGbN3UjdQmQyy39M2uvrEf2LE= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1985; 20:5kqLrt8m2t2qlV6LPtUxn+YdT5jz/WRp8x9byjvYp3ryeDUK5ErmABWO1RR3lkNaIepq2qVtZy5tgc047bygsTyDw3sZj1SepvBvhFsXmJkq42qieFMQ3lRQfDEAVnKWHTIuUfrt5gNTQWr4wYzdyNSAKAr7lnCnxe+eiGgYC38= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2017 12:10:17.5733 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1985 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.1.108 Subject: [Qemu-devel] [PATCH v6 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(); }