public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/3] lib/core: Add optional reason for timeout failure
@ 2015-08-07 17:29 Daniel Vetter
  2015-08-07 17:29 ` [PATCH i-g-t 2/3] lib/core: Add igt_reset_timeout Daniel Vetter
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Daniel Vetter @ 2015-08-07 17:29 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

"Timed out" isn't a terribly informative message, allow users to set
something more informative. Inspired by a request from Jesse.

Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 lib/igt_core.c          | 12 ++++++++++--
 lib/igt_core.h          |  3 ++-
 lib/igt_debugfs.c       |  4 ++--
 lib/tests/igt_timeout.c |  2 +-
 tests/kms_flip.c        |  4 ++--
 5 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index af3d87316857..e2c2502bd147 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1748,9 +1748,13 @@ out:
 	free(line);
 }
 
+static const char *timeout_op;
 static void igt_alarm_handler(int signal)
 {
-	igt_info("Timed out\n");
+	if (timeout_op)
+		igt_info("Timed out: %s\n", timeout_op);
+	else
+		igt_info("Timed out\n");
 
 	/* exit with failure status */
 	igt_fail(IGT_EXIT_FAILURE);
@@ -1759,6 +1763,7 @@ static void igt_alarm_handler(int signal)
 /**
  * igt_set_timeout:
  * @seconds: number of seconds before timeout
+ * @op: Optional string to explain what operation has timed out in the debug log
  *
  * Fail a test and exit with #IGT_EXIT_FAILURE status after the specified
  * number of seconds have elapsed. If the current test has subtests and the
@@ -1768,7 +1773,8 @@ static void igt_alarm_handler(int signal)
  * Any previous timer is cancelled and no timeout is scheduled if @seconds is
  * zero.
  */
-void igt_set_timeout(unsigned int seconds)
+void igt_set_timeout(unsigned int seconds,
+		     const char *op)
 {
 	struct sigaction sa;
 
@@ -1776,6 +1782,8 @@ void igt_set_timeout(unsigned int seconds)
 	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 
+	timeout_op = op;
+
 	if (seconds == 0)
 		sigaction(SIGALRM, NULL, NULL);
 	else
diff --git a/lib/igt_core.h b/lib/igt_core.h
index 83eac02b28bf..1a324ee85514 100644
--- a/lib/igt_core.h
+++ b/lib/igt_core.h
@@ -732,7 +732,8 @@ extern enum igt_log_level igt_log_level;
 	} while (0)
 
 
-void igt_set_timeout(unsigned int seconds);
+void igt_set_timeout(unsigned int seconds,
+		     const char *op);
 
 FILE *__igt_fopen_data(const char* igt_srcdir, const char* igt_datadir,
 		       const char* filename);
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 568154ac0e80..6180a2aa56db 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -463,9 +463,9 @@ static bool read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
 	ssize_t bytes_read;
 	char buf[pipe_crc->buffer_len];
 
-	igt_set_timeout(5);
+	igt_set_timeout(5, "CRC reading");
 	bytes_read = read(pipe_crc->crc_fd, &buf, pipe_crc->line_len);
-	igt_set_timeout(0);
+	igt_set_timeout(0, NULL);
 
 	igt_assert_eq(bytes_read, pipe_crc->line_len);
 	buf[bytes_read] = '\0';
diff --git a/lib/tests/igt_timeout.c b/lib/tests/igt_timeout.c
index 8affa61f3d79..d228041d493b 100644
--- a/lib/tests/igt_timeout.c
+++ b/lib/tests/igt_timeout.c
@@ -3,6 +3,6 @@
 
 igt_simple_main
 {
-	igt_set_timeout(1);
+	igt_set_timeout(1, "Testcase");
 	sleep(5);
 }
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 25c924305c32..214cd696fd2f 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1614,9 +1614,9 @@ static void test_nonblocking_read(int in)
 	}
 	igt_require(ret != -1);
 
-	igt_set_timeout(5);
+	igt_set_timeout(5, "Nonblocking DRM fd reading");
 	ret = read(fd, buffer, sizeof(buffer));
-	igt_set_timeout(0);
+	igt_set_timeout(0, NULL);
 	igt_assert_eq(ret, -1);
 	igt_assert_eq(errno, EAGAIN);
 
-- 
2.5.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH i-g-t 2/3] lib/core: Add igt_reset_timeout
  2015-08-07 17:29 [PATCH i-g-t 1/3] lib/core: Add optional reason for timeout failure Daniel Vetter
@ 2015-08-07 17:29 ` Daniel Vetter
  2015-08-07 17:29 ` [PATCH i-g-t 3/3] tests: Document ABI extension catchers Daniel Vetter
  2015-08-07 18:10 ` [PATCH i-g-t 1/3] lib/core: Add optional reason for timeout failure Jesse Barnes
  2 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2015-08-07 17:29 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

Convenience wrapper suggested by Chris for igt_set_timeout(0, NULL).

v2: While at it add an empty line in kms_flip to make
set/reset_timeout a visual block.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 lib/igt_core.c    | 14 +++++++++++++-
 lib/igt_core.h    |  2 ++
 lib/igt_debugfs.c |  2 +-
 tests/kms_flip.c  |  3 ++-
 4 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index e2c2502bd147..c70176fb4962 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1771,7 +1771,8 @@ static void igt_alarm_handler(int signal)
  * marked as failed.
  *
  * Any previous timer is cancelled and no timeout is scheduled if @seconds is
- * zero.
+ * zero. But for clarity the timeout set with this function should be cleared
+ * with igt_reset_timeout().
  */
 void igt_set_timeout(unsigned int seconds,
 		     const char *op)
@@ -1792,6 +1793,17 @@ void igt_set_timeout(unsigned int seconds,
 	alarm(seconds);
 }
 
+/**
+ * igt_reset_timeout - reset timeout to default
+ *
+ * This function resets a timeout set by igt_set_timeout() and disables any
+ * timer set up by the former function.
+ */
+void igt_reset_timeout(void)
+{
+	igt_set_timeout(0, NULL);
+}
+
 FILE *__igt_fopen_data(const char* igt_srcdir, const char* igt_datadir,
 		       const char* filename)
 {
diff --git a/lib/igt_core.h b/lib/igt_core.h
index 1a324ee85514..1d77f4528dea 100644
--- a/lib/igt_core.h
+++ b/lib/igt_core.h
@@ -735,6 +735,8 @@ extern enum igt_log_level igt_log_level;
 void igt_set_timeout(unsigned int seconds,
 		     const char *op);
 
+void igt_reset_timeout(void);
+
 FILE *__igt_fopen_data(const char* igt_srcdir, const char* igt_datadir,
 		       const char* filename);
 /**
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 6180a2aa56db..3cbc981d684c 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -465,7 +465,7 @@ static bool read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
 
 	igt_set_timeout(5, "CRC reading");
 	bytes_read = read(pipe_crc->crc_fd, &buf, pipe_crc->line_len);
-	igt_set_timeout(0, NULL);
+	igt_reset_timeout();
 
 	igt_assert_eq(bytes_read, pipe_crc->line_len);
 	buf[bytes_read] = '\0';
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 214cd696fd2f..a595d9f1d69f 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1616,7 +1616,8 @@ static void test_nonblocking_read(int in)
 
 	igt_set_timeout(5, "Nonblocking DRM fd reading");
 	ret = read(fd, buffer, sizeof(buffer));
-	igt_set_timeout(0, NULL);
+	igt_reset_timeout();
+
 	igt_assert_eq(ret, -1);
 	igt_assert_eq(errno, EAGAIN);
 
-- 
2.5.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH i-g-t 3/3] tests: Document ABI extension catchers
  2015-08-07 17:29 [PATCH i-g-t 1/3] lib/core: Add optional reason for timeout failure Daniel Vetter
  2015-08-07 17:29 ` [PATCH i-g-t 2/3] lib/core: Add igt_reset_timeout Daniel Vetter
@ 2015-08-07 17:29 ` Daniel Vetter
  2015-08-07 18:10 ` [PATCH i-g-t 1/3] lib/core: Add optional reason for timeout failure Jesse Barnes
  2 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2015-08-07 17:29 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

Our invalid-flags/params testcases are meant to catch abi extensions
by just testing for the next available flag/param. Unfortunately we
need that since without those we forgot to write testcases for these
new flags way too often :(

But it's not entirely clear why this is, so document this trick with
comments.

Also gem_wait wasn't this paranoid, so change the testcase to be so.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 tests/gem_ctx_param_basic.c | 3 +++
 tests/gem_exec_params.c     | 3 +++
 tests/gem_wait.c            | 5 ++++-
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/tests/gem_ctx_param_basic.c b/tests/gem_ctx_param_basic.c
index 1e7e8ff40703..430a53b22c57 100644
--- a/tests/gem_ctx_param_basic.c
+++ b/tests/gem_ctx_param_basic.c
@@ -149,6 +149,9 @@ igt_main
 		TEST_SUCCESS(LOCAL_IOCTL_I915_GEM_CONTEXT_SETPARAM);
 	}
 
+	/* NOTE: This testcase intentionally tests for the next free parameter
+	 * to catch ABI extensions. Don't "fix" this testcase without adding all
+	 * the tests for the new param first. */
 	ctx_param.param = LOCAL_CONTEXT_PARAM_NO_ZEROMAP + 1;
 
 	igt_subtest("invalid-param-get") {
diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
index e9c13a40f8a7..b33a7408c476 100644
--- a/tests/gem_exec_params.c
+++ b/tests/gem_exec_params.c
@@ -221,6 +221,9 @@ igt_main
 	/* HANDLE_LUT and NO_RELOC are already exercised by gem_exec_lut_handle */
 
 	igt_subtest("invalid-flag") {
+		/* NOTE: This test intentionally exercise the next available
+		 * flag. Don't "fix" this testcase without adding the required
+		 * tests for the new flag first. */
 		execbuf.flags = I915_EXEC_RENDER | (LOCAL_I915_EXEC_RESOURCE_STREAMER << 1);
 		RUN_FAIL(EINVAL);
 	}
diff --git a/tests/gem_wait.c b/tests/gem_wait.c
index 958bf93ff5fd..a785b16e783e 100644
--- a/tests/gem_wait.c
+++ b/tests/gem_wait.c
@@ -236,7 +236,10 @@ static void invalid_flags(int fd)
 
 	wait.bo_handle = handle;
 	wait.timeout_ns = 1;
-	wait.flags = 0xffffffff;
+	/* NOTE: This test intentionally tests for just the next available flag.
+	 * Don't "fix" this testcase without the ABI testcases for new flags
+	 * first. */
+	wait.flags = 1;
 	ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_WAIT, &wait);
 
 	igt_assert(ret != 0 && errno == EINVAL);
-- 
2.5.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH i-g-t 1/3] lib/core: Add optional reason for timeout failure
  2015-08-07 17:29 [PATCH i-g-t 1/3] lib/core: Add optional reason for timeout failure Daniel Vetter
  2015-08-07 17:29 ` [PATCH i-g-t 2/3] lib/core: Add igt_reset_timeout Daniel Vetter
  2015-08-07 17:29 ` [PATCH i-g-t 3/3] tests: Document ABI extension catchers Daniel Vetter
@ 2015-08-07 18:10 ` Jesse Barnes
  2015-08-12 12:47   ` Daniel Vetter
  2 siblings, 1 reply; 5+ messages in thread
From: Jesse Barnes @ 2015-08-07 18:10 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics Development; +Cc: Daniel Vetter

On 08/07/2015 10:29 AM, Daniel Vetter wrote:
> "Timed out" isn't a terribly informative message, allow users to set
> something more informative. Inspired by a request from Jesse.
> 
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  lib/igt_core.c          | 12 ++++++++++--
>  lib/igt_core.h          |  3 ++-
>  lib/igt_debugfs.c       |  4 ++--
>  lib/tests/igt_timeout.c |  2 +-
>  tests/kms_flip.c        |  4 ++--
>  5 files changed, 17 insertions(+), 8 deletions(-)
> 
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index af3d87316857..e2c2502bd147 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c
> @@ -1748,9 +1748,13 @@ out:
>  	free(line);
>  }
>  
> +static const char *timeout_op;
>  static void igt_alarm_handler(int signal)
>  {
> -	igt_info("Timed out\n");
> +	if (timeout_op)
> +		igt_info("Timed out: %s\n", timeout_op);
> +	else
> +		igt_info("Timed out\n");
>  
>  	/* exit with failure status */
>  	igt_fail(IGT_EXIT_FAILURE);
> @@ -1759,6 +1763,7 @@ static void igt_alarm_handler(int signal)
>  /**
>   * igt_set_timeout:
>   * @seconds: number of seconds before timeout
> + * @op: Optional string to explain what operation has timed out in the debug log
>   *
>   * Fail a test and exit with #IGT_EXIT_FAILURE status after the specified
>   * number of seconds have elapsed. If the current test has subtests and the
> @@ -1768,7 +1773,8 @@ static void igt_alarm_handler(int signal)
>   * Any previous timer is cancelled and no timeout is scheduled if @seconds is
>   * zero.
>   */
> -void igt_set_timeout(unsigned int seconds)
> +void igt_set_timeout(unsigned int seconds,
> +		     const char *op)
>  {
>  	struct sigaction sa;
>  
> @@ -1776,6 +1782,8 @@ void igt_set_timeout(unsigned int seconds)
>  	sigemptyset(&sa.sa_mask);
>  	sa.sa_flags = 0;
>  
> +	timeout_op = op;
> +
>  	if (seconds == 0)
>  		sigaction(SIGALRM, NULL, NULL);
>  	else
> diff --git a/lib/igt_core.h b/lib/igt_core.h
> index 83eac02b28bf..1a324ee85514 100644
> --- a/lib/igt_core.h
> +++ b/lib/igt_core.h
> @@ -732,7 +732,8 @@ extern enum igt_log_level igt_log_level;
>  	} while (0)
>  
>  
> -void igt_set_timeout(unsigned int seconds);
> +void igt_set_timeout(unsigned int seconds,
> +		     const char *op);
>  
>  FILE *__igt_fopen_data(const char* igt_srcdir, const char* igt_datadir,
>  		       const char* filename);
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index 568154ac0e80..6180a2aa56db 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -463,9 +463,9 @@ static bool read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
>  	ssize_t bytes_read;
>  	char buf[pipe_crc->buffer_len];
>  
> -	igt_set_timeout(5);
> +	igt_set_timeout(5, "CRC reading");
>  	bytes_read = read(pipe_crc->crc_fd, &buf, pipe_crc->line_len);
> -	igt_set_timeout(0);
> +	igt_set_timeout(0, NULL);
>  
>  	igt_assert_eq(bytes_read, pipe_crc->line_len);
>  	buf[bytes_read] = '\0';
> diff --git a/lib/tests/igt_timeout.c b/lib/tests/igt_timeout.c
> index 8affa61f3d79..d228041d493b 100644
> --- a/lib/tests/igt_timeout.c
> +++ b/lib/tests/igt_timeout.c
> @@ -3,6 +3,6 @@
>  
>  igt_simple_main
>  {
> -	igt_set_timeout(1);
> +	igt_set_timeout(1, "Testcase");
>  	sleep(5);
>  }
> diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> index 25c924305c32..214cd696fd2f 100644
> --- a/tests/kms_flip.c
> +++ b/tests/kms_flip.c
> @@ -1614,9 +1614,9 @@ static void test_nonblocking_read(int in)
>  	}
>  	igt_require(ret != -1);
>  
> -	igt_set_timeout(5);
> +	igt_set_timeout(5, "Nonblocking DRM fd reading");
>  	ret = read(fd, buffer, sizeof(buffer));
> -	igt_set_timeout(0);
> +	igt_set_timeout(0, NULL);
>  	igt_assert_eq(ret, -1);
>  	igt_assert_eq(errno, EAGAIN);
>  
> 

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>

The earlier version worked like a charm.

Thanks,
Jesse
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH i-g-t 1/3] lib/core: Add optional reason for timeout failure
  2015-08-07 18:10 ` [PATCH i-g-t 1/3] lib/core: Add optional reason for timeout failure Jesse Barnes
@ 2015-08-12 12:47   ` Daniel Vetter
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2015-08-12 12:47 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

On Fri, Aug 07, 2015 at 11:10:22AM -0700, Jesse Barnes wrote:
> On 08/07/2015 10:29 AM, Daniel Vetter wrote:
> > "Timed out" isn't a terribly informative message, allow users to set
> > something more informative. Inspired by a request from Jesse.
> > 
> > Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  lib/igt_core.c          | 12 ++++++++++--
> >  lib/igt_core.h          |  3 ++-
> >  lib/igt_debugfs.c       |  4 ++--
> >  lib/tests/igt_timeout.c |  2 +-
> >  tests/kms_flip.c        |  4 ++--
> >  5 files changed, 17 insertions(+), 8 deletions(-)
> > 
> > diff --git a/lib/igt_core.c b/lib/igt_core.c
> > index af3d87316857..e2c2502bd147 100644
> > --- a/lib/igt_core.c
> > +++ b/lib/igt_core.c
> > @@ -1748,9 +1748,13 @@ out:
> >  	free(line);
> >  }
> >  
> > +static const char *timeout_op;
> >  static void igt_alarm_handler(int signal)
> >  {
> > -	igt_info("Timed out\n");
> > +	if (timeout_op)
> > +		igt_info("Timed out: %s\n", timeout_op);
> > +	else
> > +		igt_info("Timed out\n");
> >  
> >  	/* exit with failure status */
> >  	igt_fail(IGT_EXIT_FAILURE);
> > @@ -1759,6 +1763,7 @@ static void igt_alarm_handler(int signal)
> >  /**
> >   * igt_set_timeout:
> >   * @seconds: number of seconds before timeout
> > + * @op: Optional string to explain what operation has timed out in the debug log
> >   *
> >   * Fail a test and exit with #IGT_EXIT_FAILURE status after the specified
> >   * number of seconds have elapsed. If the current test has subtests and the
> > @@ -1768,7 +1773,8 @@ static void igt_alarm_handler(int signal)
> >   * Any previous timer is cancelled and no timeout is scheduled if @seconds is
> >   * zero.
> >   */
> > -void igt_set_timeout(unsigned int seconds)
> > +void igt_set_timeout(unsigned int seconds,
> > +		     const char *op)
> >  {
> >  	struct sigaction sa;
> >  
> > @@ -1776,6 +1782,8 @@ void igt_set_timeout(unsigned int seconds)
> >  	sigemptyset(&sa.sa_mask);
> >  	sa.sa_flags = 0;
> >  
> > +	timeout_op = op;
> > +
> >  	if (seconds == 0)
> >  		sigaction(SIGALRM, NULL, NULL);
> >  	else
> > diff --git a/lib/igt_core.h b/lib/igt_core.h
> > index 83eac02b28bf..1a324ee85514 100644
> > --- a/lib/igt_core.h
> > +++ b/lib/igt_core.h
> > @@ -732,7 +732,8 @@ extern enum igt_log_level igt_log_level;
> >  	} while (0)
> >  
> >  
> > -void igt_set_timeout(unsigned int seconds);
> > +void igt_set_timeout(unsigned int seconds,
> > +		     const char *op);
> >  
> >  FILE *__igt_fopen_data(const char* igt_srcdir, const char* igt_datadir,
> >  		       const char* filename);
> > diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> > index 568154ac0e80..6180a2aa56db 100644
> > --- a/lib/igt_debugfs.c
> > +++ b/lib/igt_debugfs.c
> > @@ -463,9 +463,9 @@ static bool read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
> >  	ssize_t bytes_read;
> >  	char buf[pipe_crc->buffer_len];
> >  
> > -	igt_set_timeout(5);
> > +	igt_set_timeout(5, "CRC reading");
> >  	bytes_read = read(pipe_crc->crc_fd, &buf, pipe_crc->line_len);
> > -	igt_set_timeout(0);
> > +	igt_set_timeout(0, NULL);
> >  
> >  	igt_assert_eq(bytes_read, pipe_crc->line_len);
> >  	buf[bytes_read] = '\0';
> > diff --git a/lib/tests/igt_timeout.c b/lib/tests/igt_timeout.c
> > index 8affa61f3d79..d228041d493b 100644
> > --- a/lib/tests/igt_timeout.c
> > +++ b/lib/tests/igt_timeout.c
> > @@ -3,6 +3,6 @@
> >  
> >  igt_simple_main
> >  {
> > -	igt_set_timeout(1);
> > +	igt_set_timeout(1, "Testcase");
> >  	sleep(5);
> >  }
> > diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> > index 25c924305c32..214cd696fd2f 100644
> > --- a/tests/kms_flip.c
> > +++ b/tests/kms_flip.c
> > @@ -1614,9 +1614,9 @@ static void test_nonblocking_read(int in)
> >  	}
> >  	igt_require(ret != -1);
> >  
> > -	igt_set_timeout(5);
> > +	igt_set_timeout(5, "Nonblocking DRM fd reading");
> >  	ret = read(fd, buffer, sizeof(buffer));
> > -	igt_set_timeout(0);
> > +	igt_set_timeout(0, NULL);
> >  	igt_assert_eq(ret, -1);
> >  	igt_assert_eq(errno, EAGAIN);
> >  
> > 
> 
> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Thanks for the review, pushed this patch + the other two + David's patch
to test NO_ZEROMAP to fix the gem_ctx_param_basic regression.
-Daniel

> 
> The earlier version worked like a charm.
> 
> Thanks,
> Jesse

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-12 12:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-07 17:29 [PATCH i-g-t 1/3] lib/core: Add optional reason for timeout failure Daniel Vetter
2015-08-07 17:29 ` [PATCH i-g-t 2/3] lib/core: Add igt_reset_timeout Daniel Vetter
2015-08-07 17:29 ` [PATCH i-g-t 3/3] tests: Document ABI extension catchers Daniel Vetter
2015-08-07 18:10 ` [PATCH i-g-t 1/3] lib/core: Add optional reason for timeout failure Jesse Barnes
2015-08-12 12:47   ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox