From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUfAG-0007Cn-9L for qemu-devel@nongnu.org; Thu, 18 Sep 2014 13:06:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUfA3-0001py-UT for qemu-devel@nongnu.org; Thu, 18 Sep 2014 13:06:40 -0400 Received: from mail-we0-x235.google.com ([2a00:1450:400c:c03::235]:43332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUfA3-0001ns-NR for qemu-devel@nongnu.org; Thu, 18 Sep 2014 13:06:27 -0400 Received: by mail-we0-f181.google.com with SMTP id w62so1271574wes.12 for ; Thu, 18 Sep 2014 10:06:21 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <541B1108.6090708@redhat.com> Date: Thu, 18 Sep 2014 19:06:16 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1410719879-25181-1-git-send-email-mst@redhat.com> <1410719879-25181-4-git-send-email-mst@redhat.com> <20140918162947.16792.44892@loki> In-Reply-To: <20140918162947.16792.44892@loki> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 03/12] test-qdev-global-props: Run tests on subprocess List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth , "Michael S. Tsirkin" , qemu-devel@nongnu.org Cc: Peter Maydell , Eduardo Habkost , Don Slutz , Anthony Liguori Il 18/09/2014 18:29, Michael Roth ha scritto: > > >> > int main(int argc, char **argv) >> > { >> > g_test_init(&argc, &argv, NULL); >> > @@ -174,9 +200,20 @@ int main(int argc, char **argv) >> > type_register_static(&static_prop_type); >> > type_register_static(&dynamic_prop_type); >> > >> > - g_test_add_func("/qdev/properties/static/default", test_static_prop); >> > - g_test_add_func("/qdev/properties/static/global", test_static_globalprop); >> > - g_test_add_func("/qdev/properties/dynamic/global", test_dynamic_globalprop); >> > + g_test_add_func("/qdev/properties/static/default/subprocess", >> > + test_static_prop_subprocess); >> > + g_test_add_func("/qdev/properties/static/default", >> > + test_static_prop); > Since in the code above test_static_prop is actually the test that re-runs > /qdev/properties/static/default/subprocess under g_test_trap_subprocess, aren't > the tests (or test function implementations) backwards? > No, it's correct. The parent test is the parent function, the child test is the subprocess function. The child test is automagically skipped by GTest, I don't know how that works. Paolo