Message ID | 1534870966-9287-16-git-send-email-pbonzini@redhat.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gnd9fyPn"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41vy5T6d0Qz9s7X for <incoming@patchwork.ozlabs.org>; Wed, 22 Aug 2018 03:16:45 +1000 (AEST) Received: from localhost ([::1]:55010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1fsAGp-0004rG-Dx for incoming@patchwork.ozlabs.org; Tue, 21 Aug 2018 13:16:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1fsA4C-0001Wz-LS for qemu-devel@nongnu.org; Tue, 21 Aug 2018 13:03:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1fsA45-00069j-DR for qemu-devel@nongnu.org; Tue, 21 Aug 2018 13:03:36 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:34989) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1fsA3v-0005nP-55 for qemu-devel@nongnu.org; Tue, 21 Aug 2018 13:03:25 -0400 Received: by mail-wr1-x42f.google.com with SMTP id j26-v6so645938wre.2 for <qemu-devel@nongnu.org>; Tue, 21 Aug 2018 10:03:20 -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; bh=x6olhPSsYEJrh2LYk6+qySPVHxptO+334y6mLZMlLl0=; b=gnd9fyPnx9dPichFwg1mG/Cpw6fapJ+2RagSVoqI8mE7CaaJonSV9eaXVleeMC+X0i mg2Y2Kv7P5MkZYRCNzWaasMjdO9AVLphbSx7ruLsn5PsyNib4kVrX0KNpcr+k9NWvKnI dyfPYGcdfLRIYN+DyzOUNY6wYNYKrvBJDsKOxJpIAz7AwMPPdfrjnmaLSoxk9/5xWU24 iAZ24RZkmApwi71RmCBMqAHnYQ2ICUEEQT09G3P1fd4RLtTU2ISQJ7BVeww9YzQDy1hH M3m7rdU5Qqvt4HkVqkn6bwGkWqHGmjpv8zsqo53SRXpkcQB2q537yJX+gUpVDA+2AhBt YKpQ== 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; bh=x6olhPSsYEJrh2LYk6+qySPVHxptO+334y6mLZMlLl0=; b=PqVJW0c5yJH9aBva/nvBogN6rKKxsqu3EJrNVPz9Qgv6hek0Cprw2+gfD2gjDfpqZS eYlP/G0SqCy/zZ1gTZN/bVnFpubxelJ6Xj7gjYKPpFDicsS/AWVt5o2uPW97ySFsU8QJ Ij+AATMkled3viI8WfiOypdzOzV48ZBboYc66ZHWzuxoGF+FjZc34R3j7MZOPPD5l/Ig a3bW6VCe115Xh0yurMhgLFzDzFfPEKWoabLHWj3MGTKqfSpg9ogyDrvyILI+wp1nkk6F eCuwM/DyjB/Oyd8NItEiuDnwm69FJ/caQt9gA9smogeM9Fk7bl+czUVmgB/6Usj/jzHs jw7Q== X-Gm-Message-State: APzg51AOwsPhT2CscRhRHmo98swFneM35o3228lktFulXjb7GM2pDxRe oI7mS9u0821XGfojCMPE+Dn8z0Dn X-Google-Smtp-Source: ANB0VdYMD1thJZ3kVsGS0TpDnRLogoRlvF23wSar+4dMdiW2Z5f4P0ZSbVRrJ5YaxE0k8N6Bo+uHEQ== X-Received: by 2002:adf:a30a:: with SMTP id c10-v6mr9246734wrb.31.1534870999227; Tue, 21 Aug 2018 10:03:19 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-184-244.clienti.tiscali.it. [78.12.184.244]) by smtp.gmail.com with ESMTPSA id v6-v6sm2608955wmc.43.2018.08.21.10.03.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 10:03:18 -0700 (PDT) From: Paolo Bonzini <pbonzini@redhat.com> To: qemu-devel@nongnu.org Date: Tue, 21 Aug 2018 19:01:47 +0200 Message-Id: <1534870966-9287-16-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1534870966-9287-1-git-send-email-pbonzini@redhat.com> References: <1534870966-9287-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42f Subject: [Qemu-devel] [PULL 15/74] tests/device-introspection: Check that the qom-tree and qtree do not change 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: Thomas Huth <thuth@redhat.com> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
[PULL,01/74] tests: virtio: separate ccw tests from libqos
|
expand
|
diff --git a/tests/device-introspect-test.c b/tests/device-introspect-test.c index 0b4f221..a38193b 100644 --- a/tests/device-introspect-test.c +++ b/tests/device-introspect-test.c @@ -103,7 +103,14 @@ static QList *device_type_list(bool abstract) static void test_one_device(const char *type) { QDict *resp; - char *help, *qom_tree; + char *help; + char *qom_tree_start, *qom_tree_end; + char *qtree_start, *qtree_end; + + g_test_message("Testing device '%s'", type); + + qom_tree_start = hmp("info qom-tree"); + qtree_start = hmp("info qtree"); resp = qmp("{'execute': 'device-list-properties'," " 'arguments': {'typename': %s}}", @@ -115,10 +122,18 @@ static void test_one_device(const char *type) /* * Some devices leave dangling pointers in QOM behind. - * "info qom-tree" has a good chance at crashing then + * "info qom-tree" or "info qtree" have a good chance at crashing then. + * Also make sure that the tree did not change. */ - qom_tree = hmp("info qom-tree"); - g_free(qom_tree); + qom_tree_end = hmp("info qom-tree"); + g_assert_cmpstr(qom_tree_start, ==, qom_tree_end); + g_free(qom_tree_start); + g_free(qom_tree_end); + + qtree_end = hmp("info qtree"); + g_assert_cmpstr(qtree_start, ==, qtree_end); + g_free(qtree_start); + g_free(qtree_end); } static void test_device_intro_list(void)