]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kselftests: Exercise hw-independent mock tests for i915.ko
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 7 Dec 2016 13:58:19 +0000 (13:58 +0000)
committerShuah Khan <shuahkh@osg.samsung.com>
Thu, 8 Dec 2016 16:34:13 +0000 (09:34 -0700)
commitc461265679ce934c26339897bba2ff5c2120262f
tree2cea0b0e1584839d78b27fcfea65bc15d7ad4024
parent8b27787a6dda01c5281d8fb22ae79063f8b21e33
kselftests: Exercise hw-independent mock tests for i915.ko

Although being a GPU driver most functionality of i915.ko depends upon
real hardware, many of its internal interfaces can be "mocked" and so
tested independently of any hardware. Expanding the test coverage is not
only useful for i915.ko, but should provide some integration tests for
core infrastructure as well.

Loading i915.ko with mock_selftests=-1 will cause it to execute its mock
tests then fail with -ENOTTY. If the driver is already loaded and bound
to hardware, it requires a few more steps to unbind, and so the simple
preliminary modprobe -r will fail.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
tools/testing/selftests/drivers/gpu/i915.sh [new file with mode: 0755]