diff options
author | Rodrigo Vivi <rodrigo.vivi@gmail.com> | 2013-08-21 15:13:13 -0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-21 23:18:00 +0200 |
commit | 4572067c88276c6f72e33e6b204527f8a7ba4481 (patch) | |
tree | d7814a3d5cc4a2f9a42aa44b3ec3cfb69b5760c3 | |
parent | 5e66c8c23925090bc230557704a23aaadbd5ad9a (diff) |
tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.
v2: Don't add to kernel tests.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | tests/Makefile.am | 9 | ||||
-rwxr-xr-x | tests/ddx_intel_after_fbdev | 73 |
2 files changed, 81 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 37dee95f..df7da3e1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -171,8 +171,15 @@ HANG = \ gem_non_secure_batch \ $(NULL) +scripts = \ + check_drm_clients \ + ddx_intel_after_fbdev \ + debugfs_wedged \ + drm_lib.sh \ + $(NULL) + EXTRA_PROGRAMS = $(TESTS_progs) $(TESTS_progs_M) $(HANG) -EXTRA_DIST = $(TESTS_scripts) $(TESTS_scripts_M) drm_lib.sh check_drm_clients debugfs_wedged +EXTRA_DIST = $(TESTS_scripts) $(TESTS_scripts_M) $(scripts) CLEANFILES = $(EXTRA_PROGRAMS) AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \ diff --git a/tests/ddx_intel_after_fbdev b/tests/ddx_intel_after_fbdev new file mode 100755 index 00000000..bcd2c29d --- /dev/null +++ b/tests/ddx_intel_after_fbdev @@ -0,0 +1,73 @@ +#!/bin/bash +# +# Testcase: Load Intel DDX after fbdev was loaded +# + +whoami | grep -q root || { + echo "ERROR: not running as root" + exit 1 +} + +# no other X session should be running +find /tmp/ -name .X*lock 2>/dev/null | grep -q X && { + echo "ERROR: X session already running" + exit 1 +} + +TMPDIR=$(mktemp -d /tmp/igt.XXXX) || { + echo "ERROR: Failed to create temp dir" + exit 1 +} + +cat > $TMPDIR/xorg.conf.fbdev << EOF +Section "Device" + Driver "fbdev" + Identifier "Device[fbdev]" +EndSection +EOF + +cat > $TMPDIR/xorg.conf.intel << EOF +Section "Device" + Driver "intel" + Identifier "Device[intel]" +EndSection +EOF + +# log before fbdev +dmesg -c > $TMPDIR/dmesg.1.before.fbdev +cp /var/log/Xorg.0.log $TMPDIR/Xorg.0.log.1.before.fbdev + +# run fbdev +xinit -- /usr/bin/X -config $TMPDIR/xorg.conf.fbdev & +sleep 5 +if [ -f `which intel_reg_dumper` ]; then +`which intel_reg_dumper` > $TMPDIR/intel_reg_dumped.1.fbdev +fi +killall X + +# log after fbdev & before intel +dmesg -c > $TMPDIR/dmesg.2.after.fbdev.before.intel +cp /var/log/Xorg.0.log $TMPDIR/Xorg.0.log.2.after.fbdev.before.intel + +sleep 5 + +# run intel +xinit -- /usr/bin/X -config $TMPDIR/xorg.conf.intel & +sleep 5 +if [ -f `which intel_reg_dumper` ]; then +`which intel_reg_dumper` > $TMPDIR/intel_reg_dumped.2.intel +fi +killall X + +# log after intel +dmesg -c > $TMPDIR/dmesg.3.after.intel +cp /var/log/Xorg.0.log $TMPDIR/Xorg.0.log.3.after.intel + +cp $0 $TMPDIR/ + +tar czf $TMPDIR.tar.gz $TMPDIR/* +if [ -f $TMPDIR.tar.gz ]; then + echo $TMPDIR.tar.gz contains this script, all configs and logs generated on this tests +fi + +exit 0 |