From patchwork Tue May 30 13:57:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9754669 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 0A466602B9 for ; Tue, 30 May 2017 14:16:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F13272684F for ; Tue, 30 May 2017 14:16:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E61F026E74; Tue, 30 May 2017 14:16:22 +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 4941E2684F for ; Tue, 30 May 2017 14:16:22 +0000 (UTC) Received: from localhost ([::1]:54081 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFhwb-0002Jr-Ie for patchwork-qemu-devel@patchwork.kernel.org; Tue, 30 May 2017 10:16:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFhfb-0005Fw-RF for qemu-devel@nongnu.org; Tue, 30 May 2017 09:58:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFhfX-0007I3-H4 for qemu-devel@nongnu.org; Tue, 30 May 2017 09:58:47 -0400 Received: from mail-he1eur01on0136.outbound.protection.outlook.com ([104.47.0.136]:15171 helo=EUR01-HE1-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 1dFhfX-0007GL-4O for qemu-devel@nongnu.org; Tue, 30 May 2017 09:58:43 -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=AlzhrcKLD6LO8ce0oJcX7GBkmLaJsrtCCpDJ02LEzbs=; b=h8Cj+zj0CmDaQ9MK6N1Ir9JtCeWbY6nPvvvVP43hMMvpowBBDCJmeZbsOxtubelrwyGkpvl2gjlHJD4nVBzlFJoHj51Cr5IXMWkXRnEpuv+68XudouBswrDt0oj2dnQ0FJ98OtvVdFH6iUT5fd80hmPqXIPYK5oM2KwbPOOdCxQ= 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 HE1PR0801MB1993.eurprd08.prod.outlook.com (2603:10a6:3:4f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Tue, 30 May 2017 13:58:33 +0000 From: Anton Nefedov To: Date: Tue, 30 May 2017 16:57:59 +0300 Message-ID: <1496152683-102751-10-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1496152683-102751-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1496152683-102751-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: DB6PR02CA0033.eurprd02.prod.outlook.com (2603:10a6:6:15::46) To HE1PR0801MB1993.eurprd08.prod.outlook.com (2603:10a6:3:4f::23) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0801MB1993: X-MS-Office365-Filtering-Correlation-Id: d72ac463-c99d-44a3-a51f-08d4a763f64b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:HE1PR0801MB1993; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1993; 3:/rz/XUWhxgUm3VtUpfMHQkMdpQDr5+duT1L3za1IYCnMF8SQwq/ufzOt1d1s0kqL5QVuQkM8I6oQoDPw5wtxXDK9VVf3YMnBvBizQxr7UxVpVJSrEMLg1XlR75hRGF/CDUi6ztttjt8UAZRaoqlH80OCjLZCjdD4jikPxIt3qIGLXtLS0bzqu9BrohSlOY61Wd56arAK9xasOomlqUvbpyG+pW5XtqVmdrFn7NaKEDMlC1LXM24if8BKuM4uUtkz24gVd6qk21w8teEIz6C2F7gUyKPllQ+BhJ8knr3nNemLCXEOmMU0mUnCjFz9HPQhrsZDFqbmAYLmZD2syP7a4Q==; 25:GGDGI9pYFaVvBcdGDvH1d/jnoJY+9hb7TZo05eqYSgzN9s73mc8zX6BxqtHs+HHvdVzg5t0vvIKk/XnzdVIoKxljBxOsN18k1pqMFioTRUwOdQMbbyflqfai9KHC5Xm/nAlzq6InhC+EcVm4K4EEmLD+pEpdkZYZYbsH4fZr+SgRAWhFkLjACXv4I1hu2cx0LukhDgwxczPXjCVpOMPLBPM2rLMx6y0kXiW99pym6+W0xy4uV3NFHA6nUNnVLLAFatx6/GjCAIiI846YvQJLWelbuDh2HdK8tcGwLZivAqnh5HKtsb10j9ycdLEFVgcv9l5PXejhOqWfnZUod+N9NEI2n1EN0FD+QyE+5jbbOQtdMmP0lWIisEagZ5TvAX0ctp6X0g2IcpslBDXLegTuQ6dOIGraWCrQk0QodCOcfUEQCaEOMU/jsaDWdvR+9UDDtay++0vH5RCJ40GaoYVaNrC49+FEO5oYPgTVTCYlaec= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1993; 31:z2N3Yub/knecCC6qKOl6UoEFGoqEh60TZh9/Lxt1HSCVr/CSZYHfmd1cHflawSTMSUEikyWLotGLVmKE+tfR/40n0JmENzNVvfpTsqc7k4EyVJUAqeZuFLjswV9yNQdxQrK2XcWU5cp42B/Rj4/LKeb+oqLJ5+HOda/IlGZarUANbVMH4eg41tLI+z//ywMxzIjD5nqMyxqV+vMXcu7qeUyCCCrtbjTMeKsaDVlRxpE=; 20:5o/1XKSUv6jW90ferko59RVWaIMaJ+uGWnKAIw5O0ooJoKPmVD7l+QNfFXU/36EW7K7c3yLjQkfQaPvIMGMEzWe+yhxQuvpUg9q08kCk9gZIo9eQ9lblExirzXr7ynffJDxsj7N5dvR032B5hgGeNR83fmuVGYDf7qgsyrCMp6Lz/GcMbyZj/bb9YEEA5BXBDuqmcxxsEFnImYoUTcz9m2Lk6x04MeuQ5/Fr4cqLADAWbLPhT+qb5CB+pe6i6k/xq6fMVWLIRogyPKJg3UqjFao5xg8PLLV3NUdm4z5tIFUk4AWMkSvrl5pTwZQf/y+sYhJAkAawtqc5epWHVOuArf81jrX0QHkhBuWrihpSeFKt6lWBmOkadxHdXVDIUvZ97lc3GWKH+CPWXTD3IpBVWlAg7JmqXLsOoZSAc967uxg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700073)(100105000095)(100000701073)(100105300095)(100000702073)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(100000703073)(100105400095)(10201501046)(6041248)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123558100)(20161123555025)(6072148)(100000704073)(100105200095)(100000705073)(100105500095); SRVR:HE1PR0801MB1993; BCL:0; PCL:0; RULEID:(100000800073)(100110000095)(100000801073)(100110300095)(100000802073)(100110100095)(100000803073)(100110400095)(100000804073)(100110200095)(100000805073)(100110500095); SRVR:HE1PR0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?Q?2TyhASFj9pEVs6kSr1XK+5/b24Hw/g9Q22euZYzWBnJT80yIccyHsvwGpXd7?= =?us-ascii?Q?3OUMoHNTxlRdE5yJ8w1SXn1FuxFFT8nMdtNgXb84Xnpt87h2ZQ/qp4ccY62B?= =?us-ascii?Q?trEhRY5sPkDRnexHJROmRGLW1078VxfgNVP8nK+T3ei8SmvrxWakOPlNIjFq?= =?us-ascii?Q?CADlFmj88t8NtzRQFi3KMQQQ9MjiV2XKLB1jYzRZ473CrkGVhjGiXK1H2qRr?= =?us-ascii?Q?brhZ4GpevJPaqkjlbc8gXcj9uRViHpaEBV/nmc8LyyZWL+Sg3XhZqcX4cCpi?= =?us-ascii?Q?uTwqiaikFnr7hOiSSIPs8zpfz/PWU5ZX?= X-Forefront-PRVS: 032334F434 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39830400002)(39450400003)(39410400002)(39400400002)(6506006)(6486002)(86362001)(6916009)(2950100002)(6666003)(54906002)(38730400002)(53936002)(6512007)(25786009)(478600001)(5660300001)(47776003)(305945005)(7736002)(66066001)(107886003)(5003940100001)(110136004)(189998001)(2906002)(4326008)(50226002)(3846002)(8676002)(81166006)(6116002)(53416004)(50466002)(2351001)(48376002)(76176999)(42186005)(50986999)(33646002)(36756003); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0801MB1993; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0801MB1993; 23:gUiB6i+XLCygH+u9o2MWLz2RvNmm2f1oWY8nk4b?= =?us-ascii?Q?YYIK0++/C6eWaSfB8JXDVgWEnAsNntssQwtHWiEOdNf0t3nqwzf7VT4rHuVz?= =?us-ascii?Q?P1k/zg9saTSqDMzqlcDG2kka8NBy/Id8/avTJR4pF0R4Nwh6hjIW283AOZcT?= =?us-ascii?Q?QENhk+LSm+kdUfjApclTstV0SILoYmavuiFMSfACusoqhJ/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MdyIMQXftl8Ksi8OCyKmVx5oAW06uY8baYAhEMHIzTzhFVPiJFYyh3tDBp6cXFgPQpvYZXKZ; 24:tyKs6tt2gCTlTAu/kqDia8YowpCZViFmVgDPg4P8H0SD3ClN6kACboGMlVtqHQR48AaomHz8y/Ajl6XgOwLHDf7qfBRFQIJaN1c9lcMD95g= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1993; 7:iJr557MVI9Y0CCW5nNWIWJ0zWlrm2wOedH0bI3kxuro5RYrpiAmeREql8xjCG0zGh/Ki5d6xltE5zJMM6m+OS27Z0/V4AG2AMwXrOv0n8jFqgTDok3+zhc+aDjyqVGrHeMNsbQzHQHy2/pEdnPu9GFXAAQ/tY3nAlefYz86+tJOGbzUWVAYFkAJc2hy1YrJTpBI8wE7UrHXVVhzJ5qP7xkLBdQjShCkuPZsmY8AudKOM9HWEVDUXE7j+fNIGFxixKr4buwJZepKvC3u2Vx5uWMCQLdzSwaIP987gu+RzqUt1ntrcaLY6NWuHMMcBbxzod6CBAiWL+IyF9zVFI7XmzQ==; 20:TyrdMZWBVZio6daraDfo2mzZp6ctUS+bW9I7MF0Qg+I7EBeHSP7P/AYRY7yrrjftBbXfXtbnazsVaff20cMvmCMpdyG+Uyp6ulUDYvzPfJJb3mZadqPvDG00VpzbJiQOtVPYy5/MLirjOj5D1DCRjEutMtn217LhFBrdfyIhtuQ= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2017 13:58:33.4059 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1993 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.0.136 Subject: [Qemu-devel] [PATCH v3 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: pbonzini@redhat.com, Anton Nefedov , den@virtuozzo.com, marcandre.lureau@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 | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/tests/test-char.c b/tests/test-char.c index ed6b18f..cd54f88 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -635,6 +635,73 @@ 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 }; + + 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 */ + qmp_chardev_change("chardev", &backend, NULL); + 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 */ + 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)); + + 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); @@ -666,6 +733,7 @@ int main(int argc, char **argv) #endif g_test_add_func("/char/socket", char_socket_test); g_test_add_func("/char/udp", char_udp_test); + g_test_add_func("/char/hotswap", char_hotswap_test); return g_test_run(); }