Received: from eggs.gnu.org ([2001:4830:134:3::10]:53957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkZDy-0001z6-Hh for qemu-devel@nongnu.org; Wed, 14 May 2014 09:28:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkZDr-00015L-OZ for qemu-devel@nongnu.org; Wed, 14 May 2014 09:27:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkZDr-00014l-HE for qemu-devel@nongnu.org; Wed, 14 May 2014 09:27:51 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4EDRoCo004485 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 14 May 2014 09:27:51 -0400 Date: Wed, 14 May 2014 21:28:02 +0800 From: Fam Zheng Message-ID: <20140514132802.GB19672@T430.nay.redhat.com> References: <1400073154-27069-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1400073154-27069-1-git-send-email-armbru@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qemu-iotests: Fix core dump suppression in test 039 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Wed, 05/14 15:12, Markus Armbruster wrote: > The shell script attempts to suppress core dumps like this: > > old_ulimit=$(ulimit -c) > ulimit -c 0 > $QEMU_IO arg... > ulimit -c "$old_ulimit" > > This breaks the test hard unless the limit was zero to begin with! > ulimit sets both hard and soft limit by default, and (re-)raising the > hard limit requires privileges. Broken since it was added in commit > dc68afe. > > Could be fixed by adding -S to set only the soft limit, but I'm not > sure how portable that is in practice. Simply do it in a subshell > instead, like this: > > (ulimit -c 0; exec $QEMU_IO arg...) > > Signed-off-by: Markus Armbruster Reviewed-by: Fam Zheng