From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVdIF-0005V6-8B for qemu-devel@nongnu.org; Thu, 03 Apr 2014 04:46:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVdI9-0001BQ-4O for qemu-devel@nongnu.org; Thu, 03 Apr 2014 04:46:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVdI8-0001BA-T2 for qemu-devel@nongnu.org; Thu, 03 Apr 2014 04:46:33 -0400 Date: Thu, 3 Apr 2014 10:46:24 +0200 From: Stefan Hajnoczi Message-ID: <20140403084624.GD27704@stefanha-thinkpad.redhat.com> References: <1396450668-12145-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1396450668-12145-1-git-send-email-afaerber@suse.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC] tests: Add ivshmem qtest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: pbonzini@redhat.com, Cam Macdonell , qemu-devel@nongnu.org, mst@redhat.com On Wed, Apr 02, 2014 at 04:57:48PM +0200, Andreas F=E4rber wrote: > +int main(int argc, char **argv) > +{ > + QTestState *s1, *s2; > + char *cmd; > + int ret; > + > + g_test_init(&argc, &argv, NULL); > + qtest_add_func("/ivshmem/nop", nop); > + > + cmd =3D g_strdup_printf("-device ivshmem,shm=3D%s,size=3D1M", "qte= st"); This test leaks the "qtest" shm object that gets created by the first QEMU process. The name is constant so two instances of the test cannot run in parallel on the same machine (the objects go in /dev/shm). The name should be unique and we should clean up in both success and failure (abort(3)) cases. Stefan