All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing
@ 2017-11-03 11:47 Tvrtko Ursulin
  2017-11-03 11:47 ` [PATCH i-g-t 2/3] gem_syslatency: Avoid arithmetic on void * warning Tvrtko Ursulin
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Tvrtko Ursulin @ 2017-11-03 11:47 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Add helpers for direct write to stderr to consolidate the code
and avoid the unused result warning in build.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 lib/igt_core.c | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index 538a4472e209..351859eaa04c 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1239,7 +1239,7 @@ static const char hex[] = "0123456789abcdef";
 static void
 xputch(int c)
 {
-	write(STDERR_FILENO, (const void *) &c, 1);
+	igt_assert_eq(write(STDERR_FILENO, (const void *) &c, 1), 1);
 }
 
 static int
@@ -1384,13 +1384,23 @@ xprintf(const char *fmt, ...)
 	va_end(ap);
 }
 
+static void __write_stderr(const char *str, size_t len)
+{
+	igt_assert_eq(write(STDERR_FILENO, str, len), len);
+}
+
+static void write_stderr(const char *str)
+{
+	__write_stderr(str, strlen(str));
+}
+
 static void print_backtrace_sig_safe(void)
 {
 	unw_cursor_t cursor;
 	unw_context_t uc;
 	int stack_num = 0;
 
-	write(STDERR_FILENO, "Stack trace: \n", 15);
+	write_stderr("Stack trace: \n");
 
 	unw_getcontext(&uc);
 	unw_init_local(&cursor, &uc);
@@ -1899,11 +1909,10 @@ static void fatal_sig_handler(int sig)
 			continue;
 
 		if (handled_signals[i].name_len) {
-			igt_assert_eq(write(STDERR_FILENO, "Received signal ", 16),
-                                      16);
-			igt_assert_eq(write(STDERR_FILENO, handled_signals[i].name, handled_signals[i].name_len),
-                                      handled_signals[i].name_len);
-			igt_assert_eq(write(STDERR_FILENO, ".\n", 2), 2);
+			write_stderr("Received signal ");
+			__write_stderr(handled_signals[i].name,
+				       handled_signals[i].name_len);
+			write_stderr(".\n");
 		}
 
 		if (crash_signal(sig)) {
-- 
2.9.5

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

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

* [PATCH i-g-t 2/3] gem_syslatency: Avoid arithmetic on void * warning
  2017-11-03 11:47 [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing Tvrtko Ursulin
@ 2017-11-03 11:47 ` Tvrtko Ursulin
  2017-11-03 11:53   ` Chris Wilson
  2017-11-03 11:47 ` [PATCH i-g-t 3/3] intel_gvtg_test: Handle system(3) return value Tvrtko Ursulin
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: Tvrtko Ursulin @ 2017-11-03 11:47 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 benchmarks/gem_syslatency.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/benchmarks/gem_syslatency.c b/benchmarks/gem_syslatency.c
index e2b1f74a43f4..580edc5f5c72 100644
--- a/benchmarks/gem_syslatency.c
+++ b/benchmarks/gem_syslatency.c
@@ -206,7 +206,7 @@ static void *sys_thp_alloc(void *arg)
 		assert(ptr != MAP_FAILED);
 		madvise(ptr, sz, MADV_HUGEPAGE);
 		for (size_t page = 0; page < sz; page += PAGE_SIZE)
-			*(volatile uint32_t *)(ptr + page) = 0;
+			*(volatile uint32_t *)((unsigned char *)ptr + page) = 0;
 		munmap(ptr, sz);
 
 		clock_gettime(CLOCK_MONOTONIC, &now);
-- 
2.9.5

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

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

* [PATCH i-g-t 3/3] intel_gvtg_test: Handle system(3) return value.
  2017-11-03 11:47 [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing Tvrtko Ursulin
  2017-11-03 11:47 ` [PATCH i-g-t 2/3] gem_syslatency: Avoid arithmetic on void * warning Tvrtko Ursulin
@ 2017-11-03 11:47 ` Tvrtko Ursulin
  2017-11-03 11:55   ` Chris Wilson
  2017-11-03 11:52 ` [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing Chris Wilson
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: Tvrtko Ursulin @ 2017-11-03 11:47 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Avoid the build warning by checking the pkill either did not find
any guests or managed to send a signal to all of them.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 tools/intel_gvtg_test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/intel_gvtg_test.c b/tools/intel_gvtg_test.c
index 7a29fbdde7cd..8c3d10cbd97f 100644
--- a/tools/intel_gvtg_test.c
+++ b/tools/intel_gvtg_test.c
@@ -144,7 +144,9 @@ static void create_guest(void)
 
 static void destroy_all_guest(void)
 {
-    system("pkill qemu");
+	int ret = system("pkill qemu");
+
+	igt_assert(ret == 0 || ret == 1);
 }
 
 static void remove_vgpu(void)
-- 
2.9.5

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

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

* Re: [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing
  2017-11-03 11:47 [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing Tvrtko Ursulin
  2017-11-03 11:47 ` [PATCH i-g-t 2/3] gem_syslatency: Avoid arithmetic on void * warning Tvrtko Ursulin
  2017-11-03 11:47 ` [PATCH i-g-t 3/3] intel_gvtg_test: Handle system(3) return value Tvrtko Ursulin
@ 2017-11-03 11:52 ` Chris Wilson
  2017-11-03 12:04   ` Tvrtko Ursulin
  2017-11-03 12:20 ` ✗ Fi.CI.BAT: warning for series starting with [1/3] " Patchwork
  2017-11-03 14:18 ` ✗ Fi.CI.BAT: warning for series starting with [v2,1/3] lib/core: Avoid unused result in backtrace printing (rev2) Patchwork
  4 siblings, 1 reply; 15+ messages in thread
From: Chris Wilson @ 2017-11-03 11:52 UTC (permalink / raw)
  To: Tvrtko Ursulin, Intel-gfx

Quoting Tvrtko Ursulin (2017-11-03 11:47:54)
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Add helpers for direct write to stderr to consolidate the code
> and avoid the unused result warning in build.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>  lib/igt_core.c | 23 ++++++++++++++++-------
>  1 file changed, 16 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index 538a4472e209..351859eaa04c 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c
> @@ -1239,7 +1239,7 @@ static const char hex[] = "0123456789abcdef";
>  static void
>  xputch(int c)
>  {
> -       write(STDERR_FILENO, (const void *) &c, 1);
> +       igt_assert_eq(write(STDERR_FILENO, (const void *) &c, 1), 1);

Infinite recursion, you can't use an assert from inside the assert
handler.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t 2/3] gem_syslatency: Avoid arithmetic on void * warning
  2017-11-03 11:47 ` [PATCH i-g-t 2/3] gem_syslatency: Avoid arithmetic on void * warning Tvrtko Ursulin
@ 2017-11-03 11:53   ` Chris Wilson
  0 siblings, 0 replies; 15+ messages in thread
From: Chris Wilson @ 2017-11-03 11:53 UTC (permalink / raw)
  To: Tvrtko Ursulin, Intel-gfx

Quoting Tvrtko Ursulin (2017-11-03 11:47:55)
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Turn off the warning? If we want to adhere to the kernel coding
standards, we may as well benefit from them as well.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t 3/3] intel_gvtg_test: Handle system(3) return value.
  2017-11-03 11:47 ` [PATCH i-g-t 3/3] intel_gvtg_test: Handle system(3) return value Tvrtko Ursulin
@ 2017-11-03 11:55   ` Chris Wilson
  2017-11-03 12:01     ` Tvrtko Ursulin
  0 siblings, 1 reply; 15+ messages in thread
From: Chris Wilson @ 2017-11-03 11:55 UTC (permalink / raw)
  To: Tvrtko Ursulin, Intel-gfx

Quoting Tvrtko Ursulin (2017-11-03 11:47:56)
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Avoid the build warning by checking the pkill either did not find
> any guests or managed to send a signal to all of them.

This is tools, do we have the igt framework so that calling igt_assert
when lead to a confusing mass of "not in a test" warnings?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t 3/3] intel_gvtg_test: Handle system(3) return value.
  2017-11-03 11:55   ` Chris Wilson
@ 2017-11-03 12:01     ` Tvrtko Ursulin
  0 siblings, 0 replies; 15+ messages in thread
From: Tvrtko Ursulin @ 2017-11-03 12:01 UTC (permalink / raw)
  To: Chris Wilson, Tvrtko Ursulin, Intel-gfx


On 03/11/2017 11:55, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2017-11-03 11:47:56)
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Avoid the build warning by checking the pkill either did not find
>> any guests or managed to send a signal to all of them.
> 
> This is tools, do we have the igt framework so that calling igt_assert
> when lead to a confusing mass of "not in a test" warnings?

Who knows, but the tools was already using them. :)

Regards,

Tvrtko

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

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

* Re: [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing
  2017-11-03 11:52 ` [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing Chris Wilson
@ 2017-11-03 12:04   ` Tvrtko Ursulin
  2017-11-03 12:10     ` Chris Wilson
  0 siblings, 1 reply; 15+ messages in thread
From: Tvrtko Ursulin @ 2017-11-03 12:04 UTC (permalink / raw)
  To: Chris Wilson, Tvrtko Ursulin, Intel-gfx


On 03/11/2017 11:52, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2017-11-03 11:47:54)
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Add helpers for direct write to stderr to consolidate the code
>> and avoid the unused result warning in build.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> ---
>>   lib/igt_core.c | 23 ++++++++++++++++-------
>>   1 file changed, 16 insertions(+), 7 deletions(-)
>>
>> diff --git a/lib/igt_core.c b/lib/igt_core.c
>> index 538a4472e209..351859eaa04c 100644
>> --- a/lib/igt_core.c
>> +++ b/lib/igt_core.c
>> @@ -1239,7 +1239,7 @@ static const char hex[] = "0123456789abcdef";
>>   static void
>>   xputch(int c)
>>   {
>> -       write(STDERR_FILENO, (const void *) &c, 1);
>> +       igt_assert_eq(write(STDERR_FILENO, (const void *) &c, 1), 1);
> 
> Infinite recursion, you can't use an assert from inside the assert
> handler.

I thought it is the signal handler. Tested sending some signals and it 
survived. If there is a flaw there could instead nerf them with void 
cast, don't know.

Tvrtko

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

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

* Re: [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing
  2017-11-03 12:04   ` Tvrtko Ursulin
@ 2017-11-03 12:10     ` Chris Wilson
  2017-11-03 12:56       ` Tvrtko Ursulin
  0 siblings, 1 reply; 15+ messages in thread
From: Chris Wilson @ 2017-11-03 12:10 UTC (permalink / raw)
  To: Tvrtko Ursulin, Tvrtko Ursulin, Intel-gfx

Quoting Tvrtko Ursulin (2017-11-03 12:04:15)
> 
> On 03/11/2017 11:52, Chris Wilson wrote:
> > Quoting Tvrtko Ursulin (2017-11-03 11:47:54)
> >> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> >>
> >> Add helpers for direct write to stderr to consolidate the code
> >> and avoid the unused result warning in build.
> >>
> >> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> >> ---
> >>   lib/igt_core.c | 23 ++++++++++++++++-------
> >>   1 file changed, 16 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/lib/igt_core.c b/lib/igt_core.c
> >> index 538a4472e209..351859eaa04c 100644
> >> --- a/lib/igt_core.c
> >> +++ b/lib/igt_core.c
> >> @@ -1239,7 +1239,7 @@ static const char hex[] = "0123456789abcdef";
> >>   static void
> >>   xputch(int c)
> >>   {
> >> -       write(STDERR_FILENO, (const void *) &c, 1);
> >> +       igt_assert_eq(write(STDERR_FILENO, (const void *) &c, 1), 1);
> > 
> > Infinite recursion, you can't use an assert from inside the assert
> > handler.
> 
> I thought it is the signal handler. Tested sending some signals and it 
> survived. If there is a flaw there could instead nerf them with void 
> cast, don't know.

I do recall these are meant to be fail safe, so using something like
assert which may end up here again is no-no. igt_ignore_warn()?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.BAT: warning for series starting with [1/3] lib/core: Avoid unused result in backtrace printing
  2017-11-03 11:47 [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing Tvrtko Ursulin
                   ` (2 preceding siblings ...)
  2017-11-03 11:52 ` [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing Chris Wilson
@ 2017-11-03 12:20 ` Patchwork
  2017-11-03 14:18 ` ✗ Fi.CI.BAT: warning for series starting with [v2,1/3] lib/core: Avoid unused result in backtrace printing (rev2) Patchwork
  4 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2017-11-03 12:20 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/3] lib/core: Avoid unused result in backtrace printing
URL   : https://patchwork.freedesktop.org/series/33119/
State : warning

== Summary ==

IGT patchset tested on top of latest successful build
c8d1ea24d3bfaf11b223bbe22407aeca196d0d89 tests/debugfs_test: Pretty print subdirectories

with latest DRM-Tip kernel build CI_DRM_3311
2f945d948d05 drm-tip: 2017y-11m-03d-09h-28m-20s UTC integration manifest

No testlist changes.

Test chamelium:
        Subgroup dp-crc-fast:
                incomplete -> PASS       (fi-kbl-7500u) fdo#102514
Test gem_exec_flush:
        Subgroup basic-wb-rw-default:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-wb-set-default:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_exec_nop:
        Subgroup basic-parallel:
                pass       -> DMESG-WARN (fi-glk-dsi) fdo#103514 +4
        Subgroup basic-series:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_exec_parallel:
        Subgroup basic:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_exec_reloc:
        Subgroup basic-cpu-read:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-gtt-read:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write-cpu:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write-gtt:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write-read:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-cpu-noreloc:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-gtt-noreloc:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-cpu-gtt-noreloc:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-gtt-cpu-noreloc:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-cpu-read-noreloc:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-gtt-read-noreloc:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write-cpu-noreloc:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write-gtt-noreloc:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write-read-noreloc:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-cpu-active:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-gtt-active:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-cpu-gtt-active:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-gtt-cpu-active:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-cpu-read-active:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-gtt-read-active:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write-cpu-active:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write-gtt-active:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write-read-active:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-softpin:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_exec_store:
        Subgroup basic-all:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-blt:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-bsd:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-default:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-render:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-vebox:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_exec_suspend:
        Subgroup basic:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-s3:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-s4-devices:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_flink_basic:
        Subgroup bad-flink:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup bad-open:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_linear_blits:
        Subgroup basic:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_mmap:
        Subgroup basic:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-small-bo:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_mmap_gtt:
        Subgroup basic:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-copy:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-read:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-read-no-prefault:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-small-bo:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-small-bo-tiledx:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-small-bo-tiledy:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-small-copy:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-small-copy-xy:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-wc:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write-gtt:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write-gtt-no-prefault:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write-no-prefault:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write-read:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write-read-distinct:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_pread:
        Subgroup basic:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_pwrite:
        Subgroup basic:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_render_linear_blits:
        Subgroup basic:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_render_tiled_blits:
        Subgroup basic:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_ringfill:
        Subgroup basic-default:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-default-interruptible:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-default-hang:
                pass       -> DMESG-WARN (fi-glk-dsi) fdo#103359
Test gem_sync:
        Subgroup basic-all:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-each:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-many-each:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-store-all:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-store-each:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_tiled_blits:
        Subgroup basic:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_tiled_fence_blits:
        Subgroup basic:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_tiled_pread_basic:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_wait:
        Subgroup basic-wait-all:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-await-all:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test gem_workarounds:
        Subgroup basic-read:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test kms_addfb_basic:
        Subgroup addfb25-bad-modifier:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup addfb25-framebuffer-vs-set-tiling:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup addfb25-modifier-no-flag:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup addfb25-x-tiled:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup addfb25-x-tiled-mismatch:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup addfb25-yf-tiled:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup addfb25-y-tiled:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup addfb25-y-tiled-small:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup bad-pitch-0:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup bad-pitch-1024:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup bad-pitch-128:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup bad-pitch-256:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup bad-pitch-32:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup bad-pitch-63:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup bad-pitch-65536:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup bad-pitch-999:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-x-tiled:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-y-tiled:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup framebuffer-vs-set-tiling:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup invalid-get-prop:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup invalid-get-prop-any:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup invalid-set-prop:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup invalid-set-prop-any:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup no-handle:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup size-max:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup small-bo:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup unused-offsets:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup unused-pitches:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test kms_busy:
        Subgroup basic-flip-a:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-flip-b:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-flip-c:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-atomic:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-busy-flip-before-cursor-legacy:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-flip-after-cursor-atomic:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-flip-after-cursor-legacy:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-flip-after-cursor-varying-size:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-flip-before-cursor-atomic:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-flip-before-cursor-legacy:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-flip-before-cursor-varying-size:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test kms_flip:
        Subgroup basic-flip-vs-dpms:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-flip-vs-modeset:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-flip-vs-wf_vblank:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-plain-flip:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test kms_frontbuffer_tracking:
        Subgroup basic:
                fail       -> DMESG-FAIL (fi-glk-dsi) fdo#103167
Test kms_pipe_crc_basic:
        Subgroup bad-nb-words-1:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup bad-nb-words-3:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup bad-pipe:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup bad-source:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup nonblocking-crc-pipe-a:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup nonblocking-crc-pipe-a-frame-sequence:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup nonblocking-crc-pipe-b:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup nonblocking-crc-pipe-b-frame-sequence:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup nonblocking-crc-pipe-c:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup nonblocking-crc-pipe-c-frame-sequence:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup read-crc-pipe-a:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup read-crc-pipe-a-frame-sequence:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup read-crc-pipe-b:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup read-crc-pipe-b-frame-sequence:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup read-crc-pipe-c:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup read-crc-pipe-c-frame-sequence:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup suspend-read-crc-pipe-b:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup suspend-read-crc-pipe-c:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test kms_setmode:
        Subgroup basic-clone-single-crtc:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test pm_backlight:
        Subgroup basic-brightness:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-rte:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test pm_rps:
        Subgroup basic-api:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test prime_busy:
        Subgroup basic-after-default:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test prime_self_import:
        Subgroup basic-with_fd_dup:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-with_one_bo:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-with_one_bo_two_files:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-with_two_bos:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test prime_vgem:
        Subgroup basic-busy-default:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-fence-mmap:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-fence-read:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-fence-wait-default:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-gtt:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-read:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-sync-default:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-wait-default:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-write:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test vgem_basic:
        Subgroup setversion:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup create:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup debugfs:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup dmabuf-export:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup dmabuf-fence:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup dmabuf-fence-before:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup dmabuf-mmap:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup mmap:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup second-client:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup sysfs:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup unload:
                pass       -> DMESG-WARN (fi-glk-dsi)
Test drv_module_reload:
        Subgroup basic-reload:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-no-display:
                pass       -> DMESG-WARN (fi-glk-dsi)
        Subgroup basic-reload-inject:
                pass       -> DMESG-WARN (fi-glk-dsi)

fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#103514 https://bugs.freedesktop.org/show_bug.cgi?id=103514
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:444s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:450s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:382s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:556s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:278s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:512s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:507s
fi-byt-j1900     total:289  pass:253  dwarn:1   dfail:0   fail:0   skip:35  time:512s
fi-byt-n2820     total:289  pass:249  dwarn:1   dfail:0   fail:0   skip:39  time:493s
fi-cfl-s         total:289  pass:254  dwarn:3   dfail:0   fail:0   skip:32  time:554s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:439s
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:264s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:583s
fi-glk-dsi       total:289  pass:82   dwarn:176 dfail:1   fail:0   skip:30  time:623s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:434s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:432s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:427s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:461s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:493s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:577s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:481s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:589s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:576s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:455s
fi-skl-6600u     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:597s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:652s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:534s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:504s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:457s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:586s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:424s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_471/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing
  2017-11-03 12:10     ` Chris Wilson
@ 2017-11-03 12:56       ` Tvrtko Ursulin
  2017-11-03 13:02         ` Chris Wilson
  0 siblings, 1 reply; 15+ messages in thread
From: Tvrtko Ursulin @ 2017-11-03 12:56 UTC (permalink / raw)
  To: Chris Wilson, Tvrtko Ursulin, Intel-gfx


On 03/11/2017 12:10, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2017-11-03 12:04:15)
>>
>> On 03/11/2017 11:52, Chris Wilson wrote:
>>> Quoting Tvrtko Ursulin (2017-11-03 11:47:54)
>>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>>
>>>> Add helpers for direct write to stderr to consolidate the code
>>>> and avoid the unused result warning in build.
>>>>
>>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>> ---
>>>>    lib/igt_core.c | 23 ++++++++++++++++-------
>>>>    1 file changed, 16 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/lib/igt_core.c b/lib/igt_core.c
>>>> index 538a4472e209..351859eaa04c 100644
>>>> --- a/lib/igt_core.c
>>>> +++ b/lib/igt_core.c
>>>> @@ -1239,7 +1239,7 @@ static const char hex[] = "0123456789abcdef";
>>>>    static void
>>>>    xputch(int c)
>>>>    {
>>>> -       write(STDERR_FILENO, (const void *) &c, 1);
>>>> +       igt_assert_eq(write(STDERR_FILENO, (const void *) &c, 1), 1);
>>>
>>> Infinite recursion, you can't use an assert from inside the assert
>>> handler.
>>
>> I thought it is the signal handler. Tested sending some signals and it
>> survived. If there is a flaw there could instead nerf them with void
>> cast, don't know.
> 
> I do recall these are meant to be fail safe, so using something like
> assert which may end up here again is no-no. igt_ignore_warn()?

But then on the other hand igt_fail seems to have handling for exit 
handlers using igt_asserts. Which suggests what I've done might be fine 
after all.

Regards,

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

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

* Re: [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing
  2017-11-03 12:56       ` Tvrtko Ursulin
@ 2017-11-03 13:02         ` Chris Wilson
  2017-11-03 13:07           ` Tvrtko Ursulin
  2017-11-03 13:09           ` [PATCH i-g-t v2 " Tvrtko Ursulin
  0 siblings, 2 replies; 15+ messages in thread
From: Chris Wilson @ 2017-11-03 13:02 UTC (permalink / raw)
  To: Tvrtko Ursulin, Tvrtko Ursulin, Intel-gfx

Quoting Tvrtko Ursulin (2017-11-03 12:56:14)
> 
> On 03/11/2017 12:10, Chris Wilson wrote:
> > Quoting Tvrtko Ursulin (2017-11-03 12:04:15)
> >>
> >> On 03/11/2017 11:52, Chris Wilson wrote:
> >>> Quoting Tvrtko Ursulin (2017-11-03 11:47:54)
> >>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> >>>>
> >>>> Add helpers for direct write to stderr to consolidate the code
> >>>> and avoid the unused result warning in build.
> >>>>
> >>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> >>>> ---
> >>>>    lib/igt_core.c | 23 ++++++++++++++++-------
> >>>>    1 file changed, 16 insertions(+), 7 deletions(-)
> >>>>
> >>>> diff --git a/lib/igt_core.c b/lib/igt_core.c
> >>>> index 538a4472e209..351859eaa04c 100644
> >>>> --- a/lib/igt_core.c
> >>>> +++ b/lib/igt_core.c
> >>>> @@ -1239,7 +1239,7 @@ static const char hex[] = "0123456789abcdef";
> >>>>    static void
> >>>>    xputch(int c)
> >>>>    {
> >>>> -       write(STDERR_FILENO, (const void *) &c, 1);
> >>>> +       igt_assert_eq(write(STDERR_FILENO, (const void *) &c, 1), 1);
> >>>
> >>> Infinite recursion, you can't use an assert from inside the assert
> >>> handler.
> >>
> >> I thought it is the signal handler. Tested sending some signals and it
> >> survived. If there is a flaw there could instead nerf them with void
> >> cast, don't know.
> > 
> > I do recall these are meant to be fail safe, so using something like
> > assert which may end up here again is no-no. igt_ignore_warn()?
> 
> But then on the other hand igt_fail seems to have handling for exit 
> handlers using igt_asserts. Which suggests what I've done might be fine 
> after all.

Otoh, where does the assert go if we fail to write to stderr? I do not
like the means by which we are meant to be writing the death throes to
cause further output. These routines are the lowest level and meant to
be impervious, callable from any context, calling back up into igt is a
layering violation.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing
  2017-11-03 13:02         ` Chris Wilson
@ 2017-11-03 13:07           ` Tvrtko Ursulin
  2017-11-03 13:09           ` [PATCH i-g-t v2 " Tvrtko Ursulin
  1 sibling, 0 replies; 15+ messages in thread
From: Tvrtko Ursulin @ 2017-11-03 13:07 UTC (permalink / raw)
  To: Chris Wilson, Tvrtko Ursulin, Intel-gfx


On 03/11/2017 13:02, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2017-11-03 12:56:14)
>>
>> On 03/11/2017 12:10, Chris Wilson wrote:
>>> Quoting Tvrtko Ursulin (2017-11-03 12:04:15)
>>>>
>>>> On 03/11/2017 11:52, Chris Wilson wrote:
>>>>> Quoting Tvrtko Ursulin (2017-11-03 11:47:54)
>>>>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>>>>
>>>>>> Add helpers for direct write to stderr to consolidate the code
>>>>>> and avoid the unused result warning in build.
>>>>>>
>>>>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>>>> ---
>>>>>>     lib/igt_core.c | 23 ++++++++++++++++-------
>>>>>>     1 file changed, 16 insertions(+), 7 deletions(-)
>>>>>>
>>>>>> diff --git a/lib/igt_core.c b/lib/igt_core.c
>>>>>> index 538a4472e209..351859eaa04c 100644
>>>>>> --- a/lib/igt_core.c
>>>>>> +++ b/lib/igt_core.c
>>>>>> @@ -1239,7 +1239,7 @@ static const char hex[] = "0123456789abcdef";
>>>>>>     static void
>>>>>>     xputch(int c)
>>>>>>     {
>>>>>> -       write(STDERR_FILENO, (const void *) &c, 1);
>>>>>> +       igt_assert_eq(write(STDERR_FILENO, (const void *) &c, 1), 1);
>>>>>
>>>>> Infinite recursion, you can't use an assert from inside the assert
>>>>> handler.
>>>>
>>>> I thought it is the signal handler. Tested sending some signals and it
>>>> survived. If there is a flaw there could instead nerf them with void
>>>> cast, don't know.
>>>
>>> I do recall these are meant to be fail safe, so using something like
>>> assert which may end up here again is no-no. igt_ignore_warn()?
>>
>> But then on the other hand igt_fail seems to have handling for exit
>> handlers using igt_asserts. Which suggests what I've done might be fine
>> after all.
> 
> Otoh, where does the assert go if we fail to write to stderr? I do not
> like the means by which we are meant to be writing the death throes to
> cause further output. These routines are the lowest level and meant to
> be impervious, callable from any context, calling back up into igt is a
> layering violation.

I can send a version which avoids that, but also note fatal_sig_handler 
already uses igt_assert. I'll end up changing more than I bargained for 
when I started. :)

Regards,

Tvrtko

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

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

* [PATCH i-g-t v2 1/3] lib/core: Avoid unused result in backtrace printing
  2017-11-03 13:02         ` Chris Wilson
  2017-11-03 13:07           ` Tvrtko Ursulin
@ 2017-11-03 13:09           ` Tvrtko Ursulin
  1 sibling, 0 replies; 15+ messages in thread
From: Tvrtko Ursulin @ 2017-11-03 13:09 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Add helpers for direct write to stderr to consolidate the code
and avoid the unused result warning in build.

This also stops fatal_sig_handler from using igt_assert making the
fatal exit path more conceptually correct.

v2: Use igt_ignore_warn since it is questionable whether igt_assert
    should be used on the exit paths. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 lib/igt_core.c | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index 538a4472e209..e866bf995872 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1239,7 +1239,7 @@ static const char hex[] = "0123456789abcdef";
 static void
 xputch(int c)
 {
-	write(STDERR_FILENO, (const void *) &c, 1);
+	igt_ignore_warn(write(STDERR_FILENO, (const void *) &c, 1));
 }
 
 static int
@@ -1384,13 +1384,23 @@ xprintf(const char *fmt, ...)
 	va_end(ap);
 }
 
+static void __write_stderr(const char *str, size_t len)
+{
+	igt_ignore_warn(write(STDERR_FILENO, str, len));
+}
+
+static void write_stderr(const char *str)
+{
+	__write_stderr(str, strlen(str));
+}
+
 static void print_backtrace_sig_safe(void)
 {
 	unw_cursor_t cursor;
 	unw_context_t uc;
 	int stack_num = 0;
 
-	write(STDERR_FILENO, "Stack trace: \n", 15);
+	write_stderr("Stack trace: \n");
 
 	unw_getcontext(&uc);
 	unw_init_local(&cursor, &uc);
@@ -1899,11 +1909,10 @@ static void fatal_sig_handler(int sig)
 			continue;
 
 		if (handled_signals[i].name_len) {
-			igt_assert_eq(write(STDERR_FILENO, "Received signal ", 16),
-                                      16);
-			igt_assert_eq(write(STDERR_FILENO, handled_signals[i].name, handled_signals[i].name_len),
-                                      handled_signals[i].name_len);
-			igt_assert_eq(write(STDERR_FILENO, ".\n", 2), 2);
+			write_stderr("Received signal ");
+			__write_stderr(handled_signals[i].name,
+				       handled_signals[i].name_len);
+			write_stderr(".\n");
 		}
 
 		if (crash_signal(sig)) {
-- 
2.9.5

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

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

* ✗ Fi.CI.BAT: warning for series starting with [v2,1/3] lib/core: Avoid unused result in backtrace printing (rev2)
  2017-11-03 11:47 [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing Tvrtko Ursulin
                   ` (3 preceding siblings ...)
  2017-11-03 12:20 ` ✗ Fi.CI.BAT: warning for series starting with [1/3] " Patchwork
@ 2017-11-03 14:18 ` Patchwork
  4 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2017-11-03 14:18 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: series starting with [v2,1/3] lib/core: Avoid unused result in backtrace printing (rev2)
URL   : https://patchwork.freedesktop.org/series/33119/
State : warning

== Summary ==

IGT patchset tested on top of latest successful build
c8d1ea24d3bfaf11b223bbe22407aeca196d0d89 tests/debugfs_test: Pretty print subdirectories

with latest DRM-Tip kernel build CI_DRM_3311
2f945d948d05 drm-tip: 2017y-11m-03d-09h-28m-20s UTC integration manifest

No testlist changes.

Test chamelium:
        Subgroup dp-crc-fast:
                incomplete -> PASS       (fi-kbl-7500u) fdo#102514
Test kms_pipe_crc_basic:
        Subgroup read-crc-pipe-b:
                pass       -> SKIP       (fi-hsw-4770r)

fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:446s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:380s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:543s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:277s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:510s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:504s
fi-byt-j1900     total:289  pass:253  dwarn:1   dfail:0   fail:0   skip:35  time:512s
fi-byt-n2820     total:289  pass:249  dwarn:1   dfail:0   fail:0   skip:39  time:492s
fi-cfl-s         total:289  pass:254  dwarn:3   dfail:0   fail:0   skip:32  time:560s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:428s
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:261s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:589s
fi-glk-dsi       total:289  pass:258  dwarn:0   dfail:0   fail:1   skip:30  time:494s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:430s
fi-hsw-4770r     total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:437s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:432s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:496s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:467s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:492s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:571s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:480s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:588s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:574s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:453s
fi-skl-6600u     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:594s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:652s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:529s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:510s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:464s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:578s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:436s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_473/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-11-03 14:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03 11:47 [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing Tvrtko Ursulin
2017-11-03 11:47 ` [PATCH i-g-t 2/3] gem_syslatency: Avoid arithmetic on void * warning Tvrtko Ursulin
2017-11-03 11:53   ` Chris Wilson
2017-11-03 11:47 ` [PATCH i-g-t 3/3] intel_gvtg_test: Handle system(3) return value Tvrtko Ursulin
2017-11-03 11:55   ` Chris Wilson
2017-11-03 12:01     ` Tvrtko Ursulin
2017-11-03 11:52 ` [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing Chris Wilson
2017-11-03 12:04   ` Tvrtko Ursulin
2017-11-03 12:10     ` Chris Wilson
2017-11-03 12:56       ` Tvrtko Ursulin
2017-11-03 13:02         ` Chris Wilson
2017-11-03 13:07           ` Tvrtko Ursulin
2017-11-03 13:09           ` [PATCH i-g-t v2 " Tvrtko Ursulin
2017-11-03 12:20 ` ✗ Fi.CI.BAT: warning for series starting with [1/3] " Patchwork
2017-11-03 14:18 ` ✗ Fi.CI.BAT: warning for series starting with [v2,1/3] lib/core: Avoid unused result in backtrace printing (rev2) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.