Re: [PATCH] tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 20, 2013 at 03:43:05PM -0300, Rodrigo Vivi wrote:
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>

I'm confused what exactly this tests, since it seems to never fail ...
automated tests should have some checks for expected results.

Also I'm not sure whether we want such ddx/X tests in igt ...
-Daniel

> ---
>  tests/Makefile.am           |  1 +
>  tests/ddx_intel_after_fbdev | 73 +++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 74 insertions(+)
>  create mode 100755 tests/ddx_intel_after_fbdev
> 
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index 9e46cac..cce75ee 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -127,6 +127,7 @@ TESTS_scripts = \
>  	sysfs_l3_parity \
>  	test_rte_check \
>  	tools_test \
> +	ddx_intel_after_fbdev \
>  	ZZ_hangman \
>  	$(NULL)
>  
> diff --git a/tests/ddx_intel_after_fbdev b/tests/ddx_intel_after_fbdev
> new file mode 100755
> index 0000000..bcd2c29
> --- /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
> -- 
> 1.8.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux