Re: [Intel-gfx] [PATCH v2] tests/gem_error_capture: Initial testcase for error state capture/dump

2014-05-09 Thread Mateo Lozano, Oscar
Hi Mika, +static bool rings_stopped(void) +{ + int fd; + static char buf[128]; + unsigned long long val; + + fd = igt_debugfs_open(i915_ring_stop, O_RDONLY); + igt_assert(fd = 0); + + igt_assert(read(fd, buf, sizeof(buf)) 0); + close(fd); + + sscanf(buf,

Re: [Intel-gfx] [PATCH v2] tests/gem_error_capture: Initial testcase for error state capture/dump

2014-05-09 Thread Mateo Lozano, Oscar
On Tue, 2014-04-15 at 21:38 +0200, Daniel Vetter wrote: On Mon, Apr 14, 2014 at 01:03:58PM +, Mateo Lozano, Oscar wrote: I would add a little more smarts to both the kernel and error-decode. In the kernel, we can print the guilty request, which you can then use to confirm that it is

Re: [Intel-gfx] [PATCH v2] tests/gem_error_capture: Initial testcase for error state capture/dump

2014-04-15 Thread Mika Kuoppala
Hi, oscar.ma...@intel.com writes: From: Oscar Mateo oscar.ma...@intel.com Guarantees that error capture works at a very basic level. v2: Also check that the ring object contains a reloc with MI_BB_START for the presumed batch object's address. Signed-off-by: Oscar Mateo

Re: [Intel-gfx] [PATCH v2] tests/gem_error_capture: Initial testcase for error state capture/dump

2014-04-15 Thread Daniel Vetter
On Mon, Apr 14, 2014 at 01:03:58PM +, Mateo Lozano, Oscar wrote: I would add a little more smarts to both the kernel and error-decode. In the kernel, we can print the guilty request, which you can then use to confirm that it is yours. That seems to me to be a stronger validation of

Re: [Intel-gfx] [PATCH v2] tests/gem_error_capture: Initial testcase for error state capture/dump

2014-04-14 Thread Mateo Lozano, Oscar
+ FILE *file; + int debug_fd; + char *line = NULL; + size_t line_size = 0; + char *dashes = NULL; + char *ring_name = NULL; + int bb_matched = 0; + uint32_t gtt_offset; + char expected_line[32]; + int req_matched = 0; + int requests; + uint32_t

Re: [Intel-gfx] [PATCH v2] tests/gem_error_capture: Initial testcase for error state capture/dump

2014-04-14 Thread Chris Wilson
On Mon, Apr 14, 2014 at 10:01:12AM +, Mateo Lozano, Oscar wrote: + requests); + if (req_matched == 1) { + igt_assert(strstr(ring_name, expected_ring_name)); + igt_assert(requests == 1); Bad assumption. You could

Re: [Intel-gfx] [PATCH v2] tests/gem_error_capture: Initial testcase for error state capture/dump

2014-04-14 Thread Mateo Lozano, Oscar
+ requests); + if (req_matched == 1) { + igt_assert(strstr(ring_name, expected_ring_name)); + igt_assert(requests == 1); Bad assumption. You could still have the request from

Re: [Intel-gfx] [PATCH v2] tests/gem_error_capture: Initial testcase for error state capture/dump

2014-04-14 Thread Chris Wilson
On Mon, Apr 14, 2014 at 10:23:20AM +, Mateo Lozano, Oscar wrote: + requests); + if (req_matched == 1) { + igt_assert(strstr(ring_name, expected_ring_name)); + igt_assert(requests == 1);

Re: [Intel-gfx] [PATCH v2] tests/gem_error_capture: Initial testcase for error state capture/dump

2014-04-14 Thread Mateo Lozano, Oscar
I would add a little more smarts to both the kernel and error-decode. In the kernel, we can print the guilty request, which you can then use to confirm that it is yours. That seems to me to be a stronger validation of gem_error_capture, and a useful bit of information from hangstats that we do

[Intel-gfx] [PATCH v2] tests/gem_error_capture: Initial testcase for error state capture/dump

2014-04-11 Thread oscar . mateo
From: Oscar Mateo oscar.ma...@intel.com Guarantees that error capture works at a very basic level. v2: Also check that the ring object contains a reloc with MI_BB_START for the presumed batch object's address. Signed-off-by: Oscar Mateo oscar.ma...@intel.com --- tests/.gitignore | 1

Re: [Intel-gfx] [PATCH v2] tests/gem_error_capture: Initial testcase for error state capture/dump

2014-04-11 Thread Chris Wilson
On Fri, Apr 11, 2014 at 05:48:12PM +0100, oscar.ma...@intel.com wrote: +static void check_error_state(const char *expected_ring_name, + uint64_t expected_offset) +{ + FILE *file; + int debug_fd; + char *line = NULL; + size_t line_size = 0; +