3 # Testcase: Load Intel DDX after fbdev was loaded
6 whoami | grep -q root || {
7 echo "ERROR: not running as root"
11 # no other X session should be running
12 find /tmp/ -name .X*lock 2>/dev/null | grep -q X && {
13 echo "ERROR: X session already running"
17 TMPDIR=$(mktemp -d /tmp/igt.XXXX) || {
18 echo "ERROR: Failed to create temp dir"
22 cat > $TMPDIR/xorg.conf.fbdev << EOF
25 Identifier "Device[fbdev]"
29 cat > $TMPDIR/xorg.conf.intel << EOF
32 Identifier "Device[intel]"
37 dmesg -c > $TMPDIR/dmesg.1.before.fbdev
38 cp /var/log/Xorg.0.log $TMPDIR/Xorg.0.log.1.before.fbdev
41 xinit -- /usr/bin/X -config $TMPDIR/xorg.conf.fbdev &
43 if [ -f `which intel_reg_dumper` ]; then
44 `which intel_reg_dumper` > $TMPDIR/intel_reg_dumped.1.fbdev
48 # log after fbdev & before intel
49 dmesg -c > $TMPDIR/dmesg.2.after.fbdev.before.intel
50 cp /var/log/Xorg.0.log $TMPDIR/Xorg.0.log.2.after.fbdev.before.intel
55 xinit -- /usr/bin/X -config $TMPDIR/xorg.conf.intel &
57 if [ -f `which intel_reg_dumper` ]; then
58 `which intel_reg_dumper` > $TMPDIR/intel_reg_dumped.2.intel
63 dmesg -c > $TMPDIR/dmesg.3.after.intel
64 cp /var/log/Xorg.0.log $TMPDIR/Xorg.0.log.3.after.intel
68 tar czf $TMPDIR.tar.gz $TMPDIR/*
69 if [ -f $TMPDIR.tar.gz ]; then
70 echo $TMPDIR.tar.gz contains this script, all configs and logs generated on this tests