From patchwork Mon Jun 26 16:45:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9810115 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 EC89060329 for ; Mon, 26 Jun 2017 16:56:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E720B28546 for ; Mon, 26 Jun 2017 16:56:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB4AC2858D; Mon, 26 Jun 2017 16:56:15 +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 2F99628546 for ; Mon, 26 Jun 2017 16:56:15 +0000 (UTC) Received: from localhost ([::1]:47666 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPXJ7-0001dy-SF for patchwork-qemu-devel@patchwork.kernel.org; Mon, 26 Jun 2017 12:56:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPXAS-0002N6-DZ for qemu-devel@nongnu.org; Mon, 26 Jun 2017 12:47:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPXAP-00035P-Ar for qemu-devel@nongnu.org; Mon, 26 Jun 2017 12:47:16 -0400 Received: from mail-eopbgr50123.outbound.protection.outlook.com ([40.107.5.123]:34404 helo=EUR03-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 1dPXAO-00034P-Ra for qemu-devel@nongnu.org; Mon, 26 Jun 2017 12:47:13 -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=SSe507wOjJsz8D7mAPqEnytkvrj5DdR7lP1LYVWdlhk=; b=gSbVO31rac3xWejyCfq9V5844Y5AFTEJYYAaVTzNgWAgD6hbenaPXpl6qapzi/1KLtdM+rIvW5rDQ5HEzlEsYBqzg05nrR40RjXblYZz4XLYXrGG1GnDUJbnyL2LRwinA4KHP3ONITB4n7JDKUFS4do7ufsPgDdsyW+0T0Xejp4= 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 VI1PR0801MB1998.eurprd08.prod.outlook.com (2603:10a6:800:8a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Mon, 26 Jun 2017 16:47:06 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Mon, 26 Jun 2017 19:45:46 +0300 Message-ID: <1498495550-72357-10-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498495550-72357-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1498495550-72357-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HK2P15301CA0013.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::23) To VI1PR0801MB1998.eurprd08.prod.outlook.com (2603:10a6:800:8a::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 08f18034-a1ca-488a-b83a-08d4bcb2fd46 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095); SRVR:VI1PR0801MB1998; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1998; 3:wLsnSeMI6Xlz7aWqX/zjX4AFE6WITJ4EpbTzNX5KS4BBejLoIqc3jRFWnYJ2A2eDDzmtvRWCHn08Akn8aFczMNAsqDGXs3+/8Y4GFdwKCc5mTEnoi+lSLJleo0DF/Y6PqmQK49UO+cKjo2NEFVCx/dOwIup9yWBDHpUJ3Zc+9ckoP6pU5vK+Q0VvN9ZvcNSMMuWt6eZesEwuJY6rYb9aMTWCTrcA8izxjvYOGO1wHAqJ6ciD1l7bcrqKEgXsUN7O9wcrwUwID6+UVGF00mBcGFLSbsBr6fepGIxEZqE3rDLPZYwHSDR35BGuMR9LkIApovUG/7Ona8iQYMD39kG2Lvb9noXrIIOw+wFVXz4s0/ZaxkA+A8QUCUGGs6SK7Hj1mgeBePbepFZJJ501crcOtqmFZRhKw6gSjQeaMlY46QoxHNwZO7CRMalNL1uZf/d5bwuYUoGelkVZn9V/Zkay+YySWf4iqgxWTztdwOln1JQMwjNKoodFlQWrH0WOtNsdnCEbOIFyt5GOOsY5fGxIs5GC+kVFl4XE1sxQQXXqqbknPimyqOM1dn7zan1lZpZRCKy+pDgOiSoPVpz9J1Vv13CxzixGgQopGJlS0avcaI0XApcz5qdyBAG+/BgU84KbgO6AAa8IK+ARIScWUEHdRjVvQZUSrvaFu8WhUwIM2lITtTs4A87+NKkeFH8duvxl X-MS-TrafficTypeDiagnostic: VI1PR0801MB1998: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1998; 25:cHquR4idrjOsNztXC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+0WpzviJSgvSMQFtKMKBAX2ecp6RCVlrAJzBvCdBPpn4RCL27qpnfo418bhJORDzvwAZFCj9OpoN5lu4pRvK+NAw0VMBM3MFQunvhanqMhQFe+oWwlLD0bUfRwp16aowQQkPDaLIvNdhVwF8AFYwhpmeFlpARzY9Lh8ggSPh+IwpMtfptRN8v4mUwqbiHr81by66BO6X6N7ZCEGjpVdFm5dOEgilqrAIc7fx88EPp0keXwqSkIQ3cJ2+fcGbeBpf3Q7X9fD6lRPSIybZHNHi1p5/sYm84zqCHzTmqZzWbaBzaAFWvz98BMzHC7Gr3n/85NRXJyReJXrJQZ25VeapOF4nEVzZmdU4LO3UFdVqvwEk7s9IWDC5k+UoHJJoz1wdlyEqzddiBpFXMswp5QgePfJtjPX7f/fSSynNoflzLHycgJoFCjHbnWexpWInsNYchoVEpJIgItJjnyS7N8cbVMGYjJENinDHe7MFIVYgPkZxWVrfaoFxRe/yYb+5seN55/aTaQsL4tQhgH5ADldZiz5Uk9bMYq/2IgfbNJhZnK8tRARfmM28= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1998; 20:KTzajzEoyij9inF7Yma2oGahjmPm8yJbpC7nTfSnqyzJ/ZFtxxc+QN0qlssjFQkTh/pMncS3ix7AIJSQiJilMfRFSkxBK5386miZHPzMKXnS1KzCUHwdpYgHqjPIIrV6KlQj3wMaUgd+ueiqidHSOkf31cxvmr8jsttjiEgW654F8cFJ+MptifzfnDGleAo1bxGd4hpthKbyHf524Yt9SczRZfBLej8AE5INLGkG6D8Tmhyw6vPnQuPp4pBmXRvlUa7prjF4Lq2Y6rwg4j+1vId+4wwAJHBLymnAQydGWUGm+sJFeHMiYrCREntMWyZFeKi/uoj+6qLg5YwhQrYNayLllzszOuvVsxHOHUPtkgCtwedTgMkujmPNLqNAnexrLQW2b4RMQqOAkHanyYkn6vbCc661hk7IShDg4JIPd0M= 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)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0801MB1998; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0801MB1998; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1998; 4:+xJt2PF+qlUMuFAuplMO+oMNF3nqQVn/dj6BkGSX?= =?us-ascii?Q?KsPToZ+E4B6QCPXfTCPITpZ1K5PETK047R1MF8BxOlctNZRf0JZZ97ntPzOR?= =?us-ascii?Q?FfgV8WQGMMOj0EO91XisnTzz4wX+pg990xO3MuDgRcsxTHJpQMHIbMUv/Vpy?= =?us-ascii?Q?4TxAQMb2hmYkY0tVMKSH5HvtipEqjFKoE2TAMkPhi3nCibdTbz74q34Jg/Qs?= =?us-ascii?Q?Ym/TVWyA5KC4+6Rcnh0gyHKwdWEaT3eOv7rt8IlebTetnrmAUFAVwWXK0ins?= =?us-ascii?Q?aJDErMIoqQPKT1RTkEVp6M62w7Ow3+aZBqMxE6s2j7TzdPDDM9Ny1dml/vb9?= =?us-ascii?Q?mpx72wIq2IkP7+JM0YOuVSQmr+XhwXw/ZZ1CgFiFFmUqTscsdJQp0lvivjqV?= =?us-ascii?Q?438niwihZM3oR380KkC8mzDc3DZlBPRJJqn8Rc56YYENqnhdSd93ETxdLnIY?= =?us-ascii?Q?OVcvyekzQ7RSFsX4m1YvuvdYXkDtDQ6r4LAR4yStDD8sNYe8TEkEVAFdDjeT?= =?us-ascii?Q?7u9GI4/H4PZA+teuimYWHfnvOduTj7Sr+x9hw8zpG1uI3iNe8UUM7UQMnjZf?= =?us-ascii?Q?oyj2W/i1ccAtNXRzfDZRlnL3BrITCmlYOPdiPTS2+tdrV3R6cGWyg/GKUVyV?= =?us-ascii?Q?8/b8masEDZWfARp8DIA4P4Oofk/kpNuUev0qqZjegbwPGvJaccAmDcxBkAT6?= =?us-ascii?Q?FKqkJDZUS/XaGAZI2orze62B3AdYOhKFEKVxlyTn1/kfKFq8AqDb7CkTGyWh?= =?us-ascii?Q?1PrF0iFeKRBQjS9fAoLCkjByPGL8VPeMAoRjLpTbT6CcGzdzQd6IV/s1s6h+?= =?us-ascii?Q?qkwJxdcBAh5TgtHKbbSIRJi64O/y6bI+ixsGWANWvcBrqP0LjFHGlBPNj55f?= =?us-ascii?Q?YH1CIDR0ynpefsOMfW13jET9FPdtZ/4azm6B03kedvPjGR71Uf5IphyjeBov?= =?us-ascii?Q?Ce0Xut3HfI9gcYaYZkqLMdopl2xjwZnHRxABKdR/IO9P9jQA8s/SxUK0JfWD?= =?us-ascii?Q?tvjg5xIOyMTRDnXNMkGiYbczyRkSjwkn3n+1ng0PMSOfwSuijlaLNS8bvBu4?= =?us-ascii?Q?sgiglPR2ZWRnYNeKopyROpUUPk6JuHJFaMlaNl8ITQb8uGRTYCv9+A+kW1zw?= =?us-ascii?Q?7YhCpyXlEhyWNfuEswOyqaziKKNnfTRzaj9PYcPLtTYyx9W/IPYE8m4G/Qt2?= =?us-ascii?Q?PVeFMCFTwWYrepo=3D?= X-Forefront-PRVS: 0350D7A55D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39400400002)(39410400002)(39840400002)(39450400003)(189998001)(86362001)(53416004)(2870700001)(478600001)(53936002)(6486002)(5660300001)(50226002)(50466002)(42186005)(36756003)(81166006)(25786009)(50986999)(6506006)(76176999)(3846002)(23676002)(66066001)(47776003)(305945005)(33646002)(2906002)(38730400002)(110136004)(2361001)(6116002)(107886003)(4326008)(7736002)(6512007)(2351001)(2950100002)(8676002)(6666003)(6916009); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0801MB1998; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1998; 23:SdF7Shk3RTMtPkfHgzn2th2HRS2FmpJOl66j9oo?= =?us-ascii?Q?UKm3uHRyPPDFq6PZVtoQQLqm8dJJ+QuWm1AjV+uuppGCICGuqXgGGlYHbrOV?= =?us-ascii?Q?0KPUVkqC5c/EYdgyW6S7ETs0fMp1kwOYq+t340+G5juLccNZjViEt2cGRtDx?= =?us-ascii?Q?tEk3lTD0hslm/dLeab8HC/dItsHs6uufKOPS9QmDzQ52+aHciM39INv6d+/x?= =?us-ascii?Q?beuAhyT0xWfntR/BombQWIc/Yn5l8MASJZrJdoaft+4N2hVRK3FcDzDOsJbE?= =?us-ascii?Q?bLMzLoKFg5IwBZMSbrJC7T87rP4RMgZUQ7P56nFF+dOVqIR0wC8cXAKh4759?= =?us-ascii?Q?9HSotAT0TPXj0i3Lwz86AXIO6aktmQcNlRJlr0xggnnfcX90ZGNOoEg8sK9N?= =?us-ascii?Q?T0JfkTO+6yTAaCZO5WSBCfT8uK9nNPXzKWMfWaAxy1O5oraFVQr/9wuHx7Q9?= =?us-ascii?Q?v4/ZyKEempstUtueUWmv7cGFjPcccQH2jE10Zzrt/2QOkVzGWcR+UFCiLu8d?= =?us-ascii?Q?ZZS2ec+5A9jTWbfEIiRZEIJ6Q0OFs7KEzNjzkf1VhYpKLrx1Dln3NL6Q9dqY?= =?us-ascii?Q?W0fKkDeZt20npn1C5j8JQcCAMPiLmRCo1c5YtWjxWHAu1tW9mb4hUXWJW6B5?= =?us-ascii?Q?Y6Cy+YAXklCw2jtjdbOrurk/NDn2eGUn+bYpPl1bSisNwj8RUwrbaKKjdbft?= =?us-ascii?Q?knXgcG4+HrbG9BxgycPAbbRdjPYZABKDLpsd28BZcW+sktLxR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auKVxw5tGJ+mQyrb2TBlB2jl4WLdf6dATqfPhxrZrSNYEOdk0XxeLgM9Lrnk= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1998; 20:c1Qedgo4wC5nrXJ5qmnxhtJfuoHCjC1Uxdx1ysWkbr/qLVREwUyyWd1lA0nMd4VgIIuFHTLDiYfPptAjOgTRg5nlIN0cUdTwnDoqPSf5rQMfp1W1qa9EFDcAdYqjl4FFer7V7uNtDWPDM+UTxHHsfVmTF0lrwC7IeEKAFp6Xpf4= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2017 16:47:06.8365 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1998 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.5.123 Subject: [Qemu-devel] [PATCH v4 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 | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/tests/test-char.c b/tests/test-char.c index cc153ed..71dc28a 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -654,6 +654,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); @@ -688,6 +758,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(); }