From: Daniel Vetter Subject: Re: [PATCH 1/5] tests/kms_psr_sink_crc: moving usleep around. Date: Fri, 5 Sep 2014 09:35:44 +0200 Message-ID: <20140905073544.GA15520@phenom.ffwll.local> References: <20140904084551.GZ15520@phenom.ffwll.local> <1409869371-7558-1-git-send-email-rodrigo.vivi@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by gabe.freedesktop.org (Postfix) with ESMTP id 8CA426E7E1 for ; Fri, 5 Sep 2014 00:35:22 -0700 (PDT) Received: by mail-wg0-f45.google.com with SMTP id k14so11340184wgh.16 for ; Fri, 05 Sep 2014 00:35:21 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1409869371-7558-1-git-send-email-rodrigo.vivi@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Sep 04, 2014 at 06:22:47PM -0400, Rodrigo Vivi wrote: > Lets just do this small sleep to allow human eyes to see what is happening, > but let's avoid any kind of interference on the actual test. > > Signed-off-by: Rodrigo Vivi > --- > tests/kms_psr_sink_crc.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c > index 0917a7f..bbe18f0 100644 > --- a/tests/kms_psr_sink_crc.c > +++ b/tests/kms_psr_sink_crc.c > @@ -327,6 +327,11 @@ static void get_sink_crc(data_t *data, char *crc) { > igt_require(ret > 0); > > fclose(file); > + > + /* The important value was already taken. > + * Now give a time for human eyes > + */ > + usleep(300000); We have igt_wait_for_keypress already, which is unfortunately not terribly userfriendly (since the env-var is undocumented). Maybe we should apply a bit of polish there. Have you considered using that one? Just fyi really. -Daniel > } > > static void test_crc(data_t *data) > @@ -342,7 +347,6 @@ static void test_crc(data_t *data) > 1, 1) == 0); > } > > - usleep(300000); > igt_assert(wait_psr_entry(data, 10)); > get_sink_crc(data, ref_crc); > > -- > 1.9.3 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch