From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1df6Ew-0000XR-Gb for qemu-devel@nongnu.org; Tue, 08 Aug 2017 11:16:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1df6Ev-00080L-2B for qemu-devel@nongnu.org; Tue, 08 Aug 2017 11:16:14 -0400 Date: Tue, 8 Aug 2017 17:16:00 +0200 From: Kevin Wolf Message-ID: <20170808151600.GN4850@dhcp-200-186.str.redhat.com> References: <20170807141630.105066-1-vsementsov@virtuozzo.com> <20170807155717.GI6578@localhost.localdomain> <692a163e-acce-e594-896d-da96b7a099e9@virtuozzo.com> <20170808085352.GF4850@dhcp-200-186.str.redhat.com> <896f8482-6e3a-13e9-4cce-ca115a6c8881@virtuozzo.com> <645f5e9d-6a4b-1d7b-6907-6ab27e1ffa7e@virtuozzo.com> <51899b88-6b4b-88ce-f820-f62bc944c034@redhat.com> <2983bfe2-0646-2a50-0025-0211c4725f63@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2983bfe2-0646-2a50-0025-0211c4725f63@virtuozzo.com> Subject: Re: [Qemu-devel] [PATCH] iotests: fix 185 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy Cc: Eric Blake , jsnow@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org, mreitz@redhat.com Am 08.08.2017 um 17:10 hat Vladimir Sementsov-Ogievskiy geschrieben: > 08.08.2017 18:07, Eric Blake wrote: > > On 08/08/2017 04:04 AM, Vladimir Sementsov-Ogievskiy wrote: > > > > > > > > Throttling "guaranties" that there will not be more than one > > > > > > request. But > > > > > > what prevent less than one, i.e. zero, like in my reproduction? > > > > > Yes, I understand. Can we somehow make sure that at least one iteration > > > > > is made? I'd really like to keep the functional test for block job > > > > > throttling. I suppose a simple 'sleep 0.1' would do the trick, though > > > > > it's not very clean. > > > > > > > > > > Kevin > > > > > > > > I've started with 'sleep 0.5', now there are >100 successful > > > > iterations... The other way is to check in test that there was 0 or 1 > > > > requests, but for this it looks better to rewrite it in python. > > > > > > > > > > > is sleep for ms portable? > > Sadly, sub-second sleep is a GNU coreutils feature; I suspect the BSD > > machines may fail to parse it. (Of course, we could do some sort of > > 'sleep $SMALL', where $SMALL is 0.5 if sleep supports it, and 1 otherwise). > > > sleep for 1 second may lead to more then one request done before qemu quite. _supported_os Linux So do we really care about portability? And are all the other test cases working on the BSDs? Kevin