From patchwork Tue Mar 30 18:13:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 12173493 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6CB6C433DB for ; Tue, 30 Mar 2021 18:16:24 +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 ECDF261983 for ; Tue, 30 Mar 2021 18:16:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ECDF261983 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=web.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRIuc-0005Kn-TN for qemu-devel@archiver.kernel.org; Tue, 30 Mar 2021 14:16:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRIrt-00042e-IW for qemu-devel@nongnu.org; Tue, 30 Mar 2021 14:13:35 -0400 Received: from mout.web.de ([212.227.15.3]:60301) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRIrm-0001p4-JN for qemu-devel@nongnu.org; Tue, 30 Mar 2021 14:13:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1617128002; bh=EUPgJCxrDXxKmUc+HMBoeCNIHEmMRzppEH7qmH7oHbc=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject; b=ZMEkjYxSOF9XEmO088oE93e7oTVs+p6HOpx83FtibKfJFy2TiICZyosCzyVl9W7+2 vBHr6uIQKTM8vuhr1/dnwOhFgfb5XyKG1ecGekGS4Ey5dPjZ8St7fFO/Dp78Nrdd/L Ke9Zd0F98WkSC7poWfV4As6pSCLCDWBOjyTUyHM4= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from gecko.fritz.box ([88.130.61.86]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MbQLE-1lAjv42z5g-00IlMY; Tue, 30 Mar 2021 20:13:22 +0200 Date: Tue, 30 Mar 2021 20:13:13 +0200 From: Lukas Straub To: qemu-devel Subject: [PATCH v8 0/4] yank: Add chardev tests and fixes Message-ID: MIME-Version: 1.0 X-Provags-ID: V03:K1:BEwKGgB5zaUJ35QBHuUQqcSJTbVAufxgWUKkiwM7SDD6ZYq5fVI ru1cgQw0hyYvONZ8dcYMK70Iii220GPSqKm3vlFIH2Evzihbr46/0cF3NL/4cpyMaxooKdl wZq6b7Y3rmSPecnNQKqU2/aZ0luMwnamGvpaqy/WKkT55W93gDAV3CUfrWEhHmvdjyFXlz5 ZNcq+iYI7XR0XPdM+cyYg== X-UI-Out-Filterresults: notjunk:1;V03:K0:vzdZYNQuUx8=:SCyYLknpjwjyiwVpsPc9Ux +KhmRjc6+w1L9KqjpfV5Zs/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jV1ZwfGYt8Eg5XQiueIkWXsLa6tCAtHlHL580IIkRDZ/6rqP9CF3HPBSkHyi8NzpX z1ckRSOzP51FXZ2nOMe1ZnGebRlhhBV8QAPzBpZ78R2NC6qDvf9vR5F/pL52VqoV7OewA= Received-SPF: pass client-ip=212.227.15.3; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 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.001, RCVD_IN_MSPIKE_WL=0.001, 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: Marc-Andre Lureau Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hello Everyone, These patches increase test coverage for yank, add tests and fix bugs and crashes in yank in combination with chardev-change. Please Review. Regards, Lukas Straub Changes: -v8: -test: use custom thread to accept() instead of qio_net_listener -v7: -test: fix patchew error by not using macros -v6: -test: (hopefully) fix test on OSX by using qio_net_listener on the dummy server socket so new clients get accept()'ed properly -v5: -test: fix memory leak -v4: -test: fix CharChangeTestConfig structs on stack going out of scope -test: move after bugfixes -v3: -Base on ([PATCH 0/2] yank: Always link full yank code) -Drop patch 1 (tests: Use the normal yank code instead of stubs in relevant tests) -v2: -test: add license -test: factorize testcases to a single function -test: test chardev_change with initialization of new chardev failing -fix chardev_change with initialization of new chardev failing -add reviewed-by and tested-by tags Based-on: ([PATCH 0/2] yank: Always link full yank code) Lukas Straub (4): chardev/char.c: Move object_property_try_add_child out of chardev_new chardev/char.c: Always pass id to chardev_new chardev: Fix yank with the chardev-change case tests: Add tests for yank with the chardev-change case MAINTAINERS | 1 + chardev/char-socket.c | 20 +++- chardev/char.c | 77 ++++++++----- include/chardev/char.h | 3 + tests/unit/meson.build | 3 +- tests/unit/test-yank.c | 249 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 324 insertions(+), 29 deletions(-) create mode 100644 tests/unit/test-yank.c --- 2.30.2