public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/drv_module_reload_basic: Don't use rmmod exit code when reloading the module.
@ 2016-05-20 15:20 Marius Vlad
  2016-05-20 16:00 ` Imre Deak
  0 siblings, 1 reply; 9+ messages in thread
From: Marius Vlad @ 2016-05-20 15:20 UTC (permalink / raw)
  To: intel-gfx

Either we return $IGT_EXIT_FAILURE or remove it entirely (like in this
patch). If rmmod returns non-zero (i.e., Module: i915 is still in use), reload
will bail with $IGT_EXIT_SKIP, making the check with lsmod useless.
Also use the return value in the fault-injection loop.

Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
---
 tests/drv_module_reload_basic | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic
index 3bba796..3a8df33 100755
--- a/tests/drv_module_reload_basic
+++ b/tests/drv_module_reload_basic
@@ -30,7 +30,7 @@ function reload() {
 
 	#ignore errors in ips - gen5 only
 	rmmod intel_ips &> /dev/null
-	rmmod i915 || return $IGT_EXIT_SKIP
+	rmmod i915
 	#ignore errors in intel-gtt, often built-in
 	rmmod intel-gtt &> /dev/null
 	# drm may be used by other devices (nouveau, radeon, udl, etc)
@@ -76,7 +76,7 @@ finish_load || exit $?
 
 # Repeat the module reload trying to to generate faults
 for i in $(seq 1 4); do
-	reload inject_load_failure=$i
+	reload inject_load_failure=$i || exit $?
 done
 
 reload || exit $?
-- 
2.5.0

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

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

end of thread, other threads:[~2016-05-24  8:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-20 15:20 [PATCH i-g-t] tests/drv_module_reload_basic: Don't use rmmod exit code when reloading the module Marius Vlad
2016-05-20 16:00 ` Imre Deak
2016-05-20 16:23   ` Chris Wilson
2016-05-20 16:32     ` Imre Deak
2016-05-23 10:43     ` Marius Vlad
2016-05-24  7:55       ` Daniel Vetter
2016-05-24  8:03         ` Chris Wilson
2016-05-24  8:08           ` Chris Wilson
2016-05-24  8:18           ` Daniel Vetter

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