[Intel-gfx] [PATCH 02/18] tests/drv_module_reload: rename drv_module_reload to include in BATs
Jesse Barnes
jbarnes at virtuousgeek.org
Thu Aug 13 13:31:25 PDT 2015
Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
---
tests/Makefile.sources | 2 +-
tests/drv_module_reload | 60 -------------------------------------------
tests/drv_module_reload_basic | 60 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 61 insertions(+), 61 deletions(-)
delete mode 100755 tests/drv_module_reload
create mode 100755 tests/drv_module_reload_basic
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index cdcee33..4fe7d4c 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -178,7 +178,7 @@ TESTS_scripts = \
debugfs_emon_crash \
drv_debugfs_reader \
drv_missed_irq_hang \
- drv_module_reload \
+ drv_module_reload_basic \
kms_sysfs_edid_timing \
sysfs_l3_parity \
test_rte_check \
diff --git a/tests/drv_module_reload b/tests/drv_module_reload
deleted file mode 100755
index bb29a64..0000000
--- a/tests/drv_module_reload
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-#
-# Testcase: Reload the drm module
-#
-# ... we've broken this way too often :(
-#
-
-SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )"
-. $SOURCE_DIR/drm_lib.sh
-
-# no other drm service should be running, so we can just unbind
-
-# we must kick away fbcon (but only fbcon)
-for vtcon in /sys/class/vtconsole/vtcon*/ ; do
- if grep "frame buffer device" $vtcon/name > /dev/null ; then
- echo unbinding $vtcon: `cat $vtcon/name`
- echo 0 > $vtcon/bind
- fi
-done
-
-# The sound driver uses our power well
-pkill alsactl
-rmmod snd_hda_intel &> /dev/null
-
-#ignore errors in ips - gen5 only
-rmmod intel_ips &> /dev/null
-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)
-rmmod drm_kms_helper &> /dev/null
-rmmod drm &> /dev/null
-
-if lsmod | grep i915 &> /dev/null ; then
- echo WARNING: i915.ko still loaded!
- exit 1
-else
- echo module successfully unloaded
-fi
-
-modprobe i915
-echo 1 > /sys/class/vtconsole/vtcon1/bind
-
-modprobe snd_hda_intel
-
-# does the device exist?
-if $SOURCE_DIR/gem_alive > /dev/null ; then
- echo "module successfully loaded again"
-else
- echo "failed to reload module successfully"
- exit 2
-fi
-
-# then try to run something
-if ! $SOURCE_DIR/gem_exec_nop > /dev/null ; then
- echo "failed to execute a simple batch after reload"
- exit 3
-fi
-
-exit 0
diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic
new file mode 100755
index 0000000..bb29a64
--- /dev/null
+++ b/tests/drv_module_reload_basic
@@ -0,0 +1,60 @@
+#!/bin/bash
+#
+# Testcase: Reload the drm module
+#
+# ... we've broken this way too often :(
+#
+
+SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )"
+. $SOURCE_DIR/drm_lib.sh
+
+# no other drm service should be running, so we can just unbind
+
+# we must kick away fbcon (but only fbcon)
+for vtcon in /sys/class/vtconsole/vtcon*/ ; do
+ if grep "frame buffer device" $vtcon/name > /dev/null ; then
+ echo unbinding $vtcon: `cat $vtcon/name`
+ echo 0 > $vtcon/bind
+ fi
+done
+
+# The sound driver uses our power well
+pkill alsactl
+rmmod snd_hda_intel &> /dev/null
+
+#ignore errors in ips - gen5 only
+rmmod intel_ips &> /dev/null
+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)
+rmmod drm_kms_helper &> /dev/null
+rmmod drm &> /dev/null
+
+if lsmod | grep i915 &> /dev/null ; then
+ echo WARNING: i915.ko still loaded!
+ exit 1
+else
+ echo module successfully unloaded
+fi
+
+modprobe i915
+echo 1 > /sys/class/vtconsole/vtcon1/bind
+
+modprobe snd_hda_intel
+
+# does the device exist?
+if $SOURCE_DIR/gem_alive > /dev/null ; then
+ echo "module successfully loaded again"
+else
+ echo "failed to reload module successfully"
+ exit 2
+fi
+
+# then try to run something
+if ! $SOURCE_DIR/gem_exec_nop > /dev/null ; then
+ echo "failed to execute a simple batch after reload"
+ exit 3
+fi
+
+exit 0
--
1.9.1
More information about the Intel-gfx
mailing list