All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH igt] lib/kmod: Fix error reporting for kmod load/unload
@ 2017-08-25 17:28 Chris Wilson
  2017-08-25 17:49 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2017-08-25 17:28 UTC (permalink / raw)
  To: intel-gfx

A "return -err ? err < 0 : err" managed to slip through. So if err was
set, we returned 0 or 1 based on sign, or 0 if err was zero.

If err is negative, we want treat it as an error, so report it back
to the caller, all other values were a success, so convert those to 0.

This should actually be no functional change, as all errors were
reported as 1, and everything else as 0.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/igt_kmod.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index b366adeb..26691e30 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -155,7 +155,7 @@ igt_kmod_load(const char *mod_name, const char *opts)
 	}
 out:
 	kmod_module_unref(kmod);
-	return -err ? err < 0 : err;
+	return err < 0 ? err : 0;
 }
 
 
@@ -192,7 +192,7 @@ igt_kmod_unload(const char *mod_name, unsigned int flags)
 
 out:
 	kmod_module_unref(kmod);
-	return -err ? err < 0 : err;
+	return err < 0 ? err : 0;
 }
 
 /**
-- 
2.14.1

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

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

* ✓ Fi.CI.BAT: success for lib/kmod: Fix error reporting for kmod load/unload
  2017-08-25 17:28 [PATCH igt] lib/kmod: Fix error reporting for kmod load/unload Chris Wilson
@ 2017-08-25 17:49 ` Patchwork
  2017-08-26  0:54 ` ✓ Fi.CI.IGT: " Patchwork
  2017-08-28  9:36 ` [PATCH igt] " Petri Latvala
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-08-25 17:49 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: lib/kmod: Fix error reporting for kmod load/unload
URL   : https://patchwork.freedesktop.org/series/29368/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
29d488034a50cd6fbad792cae61321995f0ab51c aubdump: Log some information about the execbuf calls

with latest DRM-Tip kernel build CI_DRM_3006
4823f19b979c drm-tip: 2017y-08m-25d-15h-55m-05s UTC integration manifest

Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-atomic:
                fail       -> PASS       (fi-snb-2600) fdo#100215
Test kms_frontbuffer_tracking:
        Subgroup basic:
                dmesg-warn -> PASS       (fi-bdw-5557u) fdo#102410

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

fi-bdw-5557u     total:279  pass:268  dwarn:0   dfail:0   fail:0   skip:11  time:455s
fi-bdw-gvtdvm    total:279  pass:265  dwarn:0   dfail:0   fail:0   skip:14  time:439s
fi-blb-e6850     total:279  pass:224  dwarn:1   dfail:0   fail:0   skip:54  time:362s
fi-bsw-n3050     total:279  pass:243  dwarn:0   dfail:0   fail:0   skip:36  time:554s
fi-bwr-2160      total:279  pass:184  dwarn:0   dfail:0   fail:0   skip:95  time:252s
fi-bxt-j4205     total:279  pass:260  dwarn:0   dfail:0   fail:0   skip:19  time:524s
fi-byt-j1900     total:279  pass:254  dwarn:1   dfail:0   fail:0   skip:24  time:527s
fi-byt-n2820     total:279  pass:250  dwarn:1   dfail:0   fail:0   skip:28  time:517s
fi-elk-e7500     total:279  pass:230  dwarn:0   dfail:0   fail:0   skip:49  time:438s
fi-glk-2a        total:279  pass:260  dwarn:0   dfail:0   fail:0   skip:19  time:617s
fi-hsw-4770      total:279  pass:263  dwarn:0   dfail:0   fail:0   skip:16  time:449s
fi-hsw-4770r     total:279  pass:263  dwarn:0   dfail:0   fail:0   skip:16  time:426s
fi-ilk-650       total:279  pass:229  dwarn:0   dfail:0   fail:0   skip:50  time:424s
fi-ivb-3520m     total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:506s
fi-ivb-3770      total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:479s
fi-kbl-7500u     total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:478s
fi-kbl-7560u     total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:600s
fi-kbl-r         total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:602s
fi-pnv-d510      total:279  pass:223  dwarn:1   dfail:0   fail:0   skip:55  time:528s
fi-skl-6260u     total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:474s
fi-skl-6700k     total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:484s
fi-skl-6770hq    total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:488s
fi-skl-gvtdvm    total:279  pass:266  dwarn:0   dfail:0   fail:0   skip:13  time:444s
fi-skl-x1585l    total:279  pass:268  dwarn:0   dfail:0   fail:0   skip:11  time:486s
fi-snb-2520m     total:279  pass:251  dwarn:0   dfail:0   fail:0   skip:28  time:551s
fi-snb-2600      total:279  pass:248  dwarn:0   dfail:0   fail:2   skip:29  time:407s

== Logs ==

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

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

* ✓ Fi.CI.IGT: success for lib/kmod: Fix error reporting for kmod load/unload
  2017-08-25 17:28 [PATCH igt] lib/kmod: Fix error reporting for kmod load/unload Chris Wilson
  2017-08-25 17:49 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-08-26  0:54 ` Patchwork
  2017-08-28  9:36 ` [PATCH igt] " Petri Latvala
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-08-26  0:54 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: lib/kmod: Fix error reporting for kmod load/unload
URL   : https://patchwork.freedesktop.org/series/29368/
State : success

== Summary ==

Test vgem_basic:
        Subgroup unload:
                skip       -> PASS       (shard-hsw)
Test perf:
        Subgroup polling:
                pass       -> FAIL       (shard-hsw) fdo#102252

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

shard-hsw        total:2230 pass:1230 dwarn:0   dfail:0   fail:19  skip:981 time:9623s

== Logs ==

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

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

* Re: [PATCH igt] lib/kmod: Fix error reporting for kmod load/unload
  2017-08-25 17:28 [PATCH igt] lib/kmod: Fix error reporting for kmod load/unload Chris Wilson
  2017-08-25 17:49 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-08-26  0:54 ` ✓ Fi.CI.IGT: " Patchwork
@ 2017-08-28  9:36 ` Petri Latvala
  2 siblings, 0 replies; 4+ messages in thread
From: Petri Latvala @ 2017-08-28  9:36 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Fri, Aug 25, 2017 at 06:28:36PM +0100, Chris Wilson wrote:
> A "return -err ? err < 0 : err" managed to slip through. So if err was
> set, we returned 0 or 1 based on sign, or 0 if err was zero.
> 
> If err is negative, we want treat it as an error, so report it back
> to the caller, all other values were a success, so convert those to 0.
> 
> This should actually be no functional change, as all errors were
> reported as 1, and everything else as 0.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>


Reviewed-by: Petri Latvala <petri.latvala@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-08-28  9:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25 17:28 [PATCH igt] lib/kmod: Fix error reporting for kmod load/unload Chris Wilson
2017-08-25 17:49 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-08-26  0:54 ` ✓ Fi.CI.IGT: " Patchwork
2017-08-28  9:36 ` [PATCH igt] " Petri Latvala

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.