From patchwork Tue Aug 4 08:12:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 11699961 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E9A111392 for ; Tue, 4 Aug 2020 08:31:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D38D4206DA for ; Tue, 4 Aug 2020 08:31:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=web.de header.i=@web.de header.b="a5L+4sC7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D38D4206DA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=web.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:33900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2sLr-0004uh-PB for patchwork-qemu-devel@patchwork.kernel.org; Tue, 04 Aug 2020 04:31:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2s3P-0003rX-LV; Tue, 04 Aug 2020 04:12:11 -0400 Received: from mout.web.de ([212.227.17.11]:34305) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2s3N-0006d0-Vd; Tue, 04 Aug 2020 04:12:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1596528722; bh=KEmy6YMSKvjy+8JKgUemriIQsd+cq5JBtEE6CKfv37Q=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=a5L+4sC7DiSQXw34/iZxuKfBD8qIi8JAtgpWVqsaZv1TAgM1DHjtX/qUPK7+ILCSD aeIJZxeVnOV36rFO1WjdBBAboGkSPri5Z1XhsDFXIOodkFGa82B4TaAiStLkUP7PZG 2yxEf/trElAMJgotGD4uRERmgTAEuVlG8MERtBcc= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from luklap ([89.247.255.220]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LtnvF-1klwIh2v8X-0118Xe; Tue, 04 Aug 2020 10:12:02 +0200 Date: Tue, 4 Aug 2020 10:12:01 +0200 From: Lukas Straub To: qemu-devel Subject: [PATCH v7 8/8] tests/test-char.c: Wait for the chardev to connect in char_socket_client_dupid_test Message-ID: <0c2f168afb1f66ccadef7ed623808aabf604fb65.1596528468.git.lukasstraub2@web.de> In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:JqlhMxM2Wvc+dVPQauu08XY9qCHu6PE/2EtCxKJ310dLgS6sEgY cwyE9Lf0TfT6H7JBJDIeaR06uyXQbe3Xg9iDQtSgya2OmfSRWxBh5dFpbhqMfW/SMG7VTNN IVzKToF7CiNaGsTwYzBc2cG47qH8gmeAEiTTytIqP0gj0Z5QuZ8pOP86l5bcAHaFv+Gp+Rv FImbvexy8AU/bks2ABcyQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:aiL4tHeHjFo=:o77J2CB86xrPXyE84PJmrL TU/1LocODEVls1CFSYDGouVtSfrba2L9pRDs74ADMCCfY0Q/kjQl+B3MTuG4d1X8Uw5OhQ+4M OR2ctlg1YzfNpF5r1hlHxeDOY5wFboe+EfowB18NglNACgWrLDhX0BVkd4oPk+rhFewIA0lzS W4b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AtV8BmkBVp8/uFHbhr3BZu689K8 P1NtaiIdKMjHZNstfdc8iQK7P16q9Zna2llp12w== Received-SPF: pass client-ip=212.227.17.11; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/04 04:11:34 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "Daniel P. =?utf-8?b?QmVycmFuZ8Op?= " , qemu-block , Juan Quintela , "Dr. David Alan Gilbert" , Max Reitz , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9?= Lureau Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" A connecting chardev object has an additional reference by the connecting thread, so if the chardev is still connecting by the end of the test, then the chardev object won't be freed. This in turn means that the yank instance won't be unregistered and when running the next test-case yank_register_instance will abort, because the yank instance is already/still registered. Signed-off-by: Lukas Straub Reviewed-by: Daniel P. Berrangé --- tests/test-char.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 diff --git a/tests/test-char.c b/tests/test-char.c index d35cc839bc..2ced07de69 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -937,6 +937,7 @@ static void char_socket_client_dupid_test(gconstpointer opaque) g_assert_nonnull(opts); chr1 = qemu_chr_new_from_opts(opts, NULL, &error_abort); g_assert_nonnull(chr1); + qemu_chr_wait_connected(chr1, &error_abort); chr2 = qemu_chr_new_from_opts(opts, NULL, &local_err); g_assert_null(chr2);