Re: [Intel-gfx] [PATCH igt] igt/drv_hangman: Check that the error state does hold the expected state
Quoting Antonio Argenziano (2018-03-05 19:10:37) > > > On 05/03/18 02:09, Chris Wilson wrote: > > Actually check the error state exists (!"No error state captured") and > > that it contains the expected engine dump. > > > > v2: Throw in some debug clues. > > > > Signed-off-by: Chris Wilson> > --- > > tests/drv_hangman.c | 12 > > 1 file changed, 12 insertions(+) > > > > diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c > > index 38cb20c3..fa7becf5 100644 > > --- a/tests/drv_hangman.c > > +++ b/tests/drv_hangman.c > > @@ -129,6 +129,14 @@ static void check_error_state(const char > > *expected_ring_name, > > FILE *file = open_error(); > > char *line = NULL; > > size_t line_size = 0; > > + bool found = false; > > + > > + igt_debug("%s(expected ring name=%s, expected offset=%"PRIx64")\n", > > + __func__, expected_ring_name, expected_offset); > > + igt_debugfs_dump(device, "i915_error_state"); > > + > > + getline(, _size, file); > > + igt_assert(strcasecmp(line, "No error state captured")); > > > > while (getline(, _size, file) > 0) { > > char *dashes; > > @@ -168,12 +176,16 @@ static void check_error_state(const char > > *expected_ring_name, > >4*i, batch[i]); > > igt_assert(strstr(line, expected_line)); > > } > > + > > + found = true; > > break; > > } > > } > > > > free(line); > > fclose(file); > > + > > + igt_assert(found); > > Test changes look fine to me, failures on CI seems to be caused by the > test not waiting for reset to happen only before we would have not > caught it. > > Reviwed-by: Antonio Argenziano Fixed the kernel bug, clearing the way for this patch to land. Thanks for the review, -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH igt] igt/drv_hangman: Check that the error state does hold the expected state
On 05/03/18 02:09, Chris Wilson wrote: Actually check the error state exists (!"No error state captured") and that it contains the expected engine dump. v2: Throw in some debug clues. Signed-off-by: Chris Wilson--- tests/drv_hangman.c | 12 1 file changed, 12 insertions(+) diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c index 38cb20c3..fa7becf5 100644 --- a/tests/drv_hangman.c +++ b/tests/drv_hangman.c @@ -129,6 +129,14 @@ static void check_error_state(const char *expected_ring_name, FILE *file = open_error(); char *line = NULL; size_t line_size = 0; + bool found = false; + + igt_debug("%s(expected ring name=%s, expected offset=%"PRIx64")\n", + __func__, expected_ring_name, expected_offset); + igt_debugfs_dump(device, "i915_error_state"); + + getline(, _size, file); + igt_assert(strcasecmp(line, "No error state captured")); while (getline(, _size, file) > 0) { char *dashes; @@ -168,12 +176,16 @@ static void check_error_state(const char *expected_ring_name, 4*i, batch[i]); igt_assert(strstr(line, expected_line)); } + + found = true; break; } } free(line); fclose(file); + + igt_assert(found); Test changes look fine to me, failures on CI seems to be caused by the test not waiting for reset to happen only before we would have not caught it. Reviwed-by: Antonio Argenziano } static void test_error_state_capture(unsigned ring_id, ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH igt] igt/drv_hangman: Check that the error state does hold the expected state
Actually check the error state exists (!"No error state captured") and that it contains the expected engine dump. v2: Throw in some debug clues. Signed-off-by: Chris Wilson--- tests/drv_hangman.c | 12 1 file changed, 12 insertions(+) diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c index 38cb20c3..fa7becf5 100644 --- a/tests/drv_hangman.c +++ b/tests/drv_hangman.c @@ -129,6 +129,14 @@ static void check_error_state(const char *expected_ring_name, FILE *file = open_error(); char *line = NULL; size_t line_size = 0; + bool found = false; + + igt_debug("%s(expected ring name=%s, expected offset=%"PRIx64")\n", + __func__, expected_ring_name, expected_offset); + igt_debugfs_dump(device, "i915_error_state"); + + getline(, _size, file); + igt_assert(strcasecmp(line, "No error state captured")); while (getline(, _size, file) > 0) { char *dashes; @@ -168,12 +176,16 @@ static void check_error_state(const char *expected_ring_name, 4*i, batch[i]); igt_assert(strstr(line, expected_line)); } + + found = true; break; } } free(line); fclose(file); + + igt_assert(found); } static void test_error_state_capture(unsigned ring_id, -- 2.16.2 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx