Message ID | 20180723201748.25573-88-mdroth@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F3A917FD for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 23 Jul 2018 21:30:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69E18285C9 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 23 Jul 2018 21:30:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E3F1285CC; Mon, 23 Jul 2018 21:30:12 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,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 ECFFC285C5 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 23 Jul 2018 21:30:11 +0000 (UTC) Received: from localhost ([::1]:36792 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1fhiPD-0007IQ-47 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Jul 2018 17:30:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <flukshun@gmail.com>) id 1fhhL3-0004Fj-KY for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:21:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <flukshun@gmail.com>) id 1fhhL2-0005Xu-Fz for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:21:49 -0400 Received: from mail-oi0-x242.google.com ([2607:f8b0:4003:c06::242]:38130) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <flukshun@gmail.com>) id 1fhhL2-0005Xk-9z; Mon, 23 Jul 2018 16:21:48 -0400 Received: by mail-oi0-x242.google.com with SMTP id v8-v6so3486682oie.5; Mon, 23 Jul 2018 13:21:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lqvoAYL159Jh93cDBgN9Dg7cMaopWq90JlyalzKM9cY=; b=qbJpmyK6QjC8u68Yn4VpU8xzNU2Y5O6fKOF/qvVp2pNGmeJGK0IrT4tlqhmn0AHUTZ xE+VBQRQfJUmOQOnypesBcyympMrr07HtJTe3z1SyqZA0RVtEe0RXHjAUPey7GH/3DgI X0V5IaEe55enRc4PbyXBf+evKagmZE8xDNqH6AjE/JVE7iMqCNlzfPPCRikMf8YvPsit uiVZ1dRz8SCEDgHRnHE3HkkDh0iF/fUZKaJ0hPGly+sZkX0ZSDrgDAfnv4f8nyp4g0wY Y8DnG0AQYQCvWnjOaxtimLKMzCl50TmuaHlceo5nxKUwhbzVi0TAlijPRvv9xaFvqbZD 6Tsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=lqvoAYL159Jh93cDBgN9Dg7cMaopWq90JlyalzKM9cY=; b=sUhpxh1E+4pDgoP1w2xmng3HhrbR5I1WZD6VlWkBgouAcOq7H6OY6bgzEDQFQLMZl8 JxHOapDNDt0VsrFHVJjDiTEWST1WpCz0NjwJYVeyHL9bkdV6Nfcy8L9ZJwe8AZQatOGm sG8tP0kk6/lvSFZWD0ot2SsxhqxGDlPsYTjev5OrFNO02SHKd5bOFQPxdPbMa3ec6qBc H+KiSCTLSKN2uLhuB7nID4o90zIquUuKiur8tCwJnt9iYIc5cezsWOFoQtVkQstr1y0H EqYPVFwny5GUzQrqfJOCqJ6QjlmProkyFiBMOEnsUifsLvuEBCSq0UQI74B59S8FhCQm bZFA== X-Gm-Message-State: AOUpUlG/7ZSya7CGvSPz6s/3nBQw/mB9JtCaoSjruAREiJnkg2ymmGVd EyWw24ap23gGVOk6V/Tz+4v7p/qhqVIpDA== X-Google-Smtp-Source: AAOMgpfpUNuOOVw8nqGeF/n/55onmDcGBGYJeshXgqfrxPGPQxUTLSyA214C+IQY7/vepam4wueK1g== X-Received: by 2002:aca:c141:: with SMTP id r62-v6mr272904oif.179.1532377307152; Mon, 23 Jul 2018 13:21:47 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id e204-v6sm2764896oif.21.2018.07.23.13.21.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 13:21:46 -0700 (PDT) From: Michael Roth <mdroth@linux.vnet.ibm.com> To: qemu-devel@nongnu.org Date: Mon, 23 Jul 2018 15:17:36 -0500 Message-Id: <20180723201748.25573-88-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> References: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::242 Subject: [Qemu-devel] [PATCH 87/99] mux: fix ctrl-a b again X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>, qemu-stable@nongnu.org, Paolo Bonzini <pbonzini@redhat.com> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Patch Round-up for stable 2.12.1, freeze on 2018-07-30
|
expand
|
diff --git a/chardev/char-mux.c b/chardev/char-mux.c index 1b925c8dec..6055e76293 100644 --- a/chardev/char-mux.c +++ b/chardev/char-mux.c @@ -304,6 +304,7 @@ void mux_set_focus(Chardev *chr, int focus) } d->focus = focus; + chr->be = d->backends[focus]; mux_chr_send_event(d, d->focus, CHR_EVENT_MUX_IN); } diff --git a/tests/test-char.c b/tests/test-char.c index 306c728335..b81b1e8e05 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -214,6 +214,10 @@ static void char_mux_test(void) g_assert_cmpint(h2.last_event, ==, -1); /* switch focus */ + qemu_chr_be_write(base, (void *)"\1b", 2); + g_assert_cmpint(h1.last_event, ==, 42); + g_assert_cmpint(h2.last_event, ==, CHR_EVENT_BREAK); + qemu_chr_be_write(base, (void *)"\1c", 2); g_assert_cmpint(h1.last_event, ==, CHR_EVENT_MUX_IN); g_assert_cmpint(h2.last_event, ==, CHR_EVENT_MUX_OUT); @@ -227,6 +231,10 @@ static void char_mux_test(void) g_assert_cmpstr(h1.read_buf, ==, "hello"); h1.read_count = 0; + qemu_chr_be_write(base, (void *)"\1b", 2); + g_assert_cmpint(h1.last_event, ==, CHR_EVENT_BREAK); + g_assert_cmpint(h2.last_event, ==, CHR_EVENT_MUX_OUT); + /* remove first handler */ qemu_chr_fe_set_handlers(&chr_be1, NULL, NULL, NULL, NULL, NULL, NULL, true);