All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.
@ 2013-08-20 18:43 Rodrigo Vivi
  2013-08-21  9:00 ` Daniel Vetter
  0 siblings, 1 reply; 9+ messages in thread
From: Rodrigo Vivi @ 2013-08-20 18:43 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.
  2013-08-20 18:43 [PATCH] tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded Rodrigo Vivi
@ 2013-08-21  9:00 ` Daniel Vetter
  2013-08-21  9:16   ` Chris Wilson
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Vetter @ 2013-08-21  9:00 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx

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

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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.
  2013-08-21  9:00 ` Daniel Vetter
@ 2013-08-21  9:16   ` Chris Wilson
  2013-08-21  9:27     ` Daniel Vetter
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Wilson @ 2013-08-21  9:16 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

On Wed, Aug 21, 2013 at 11:00:53AM +0200, Daniel Vetter wrote:
> On Tue, Aug 20, 2013 at 03:43:05PM -0300, Rodrigo Vivi wrote:
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
> 
> 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 ...

Whether or not it makes a good test, it is nice to have a repository of
the little hacks we use for debugging. From little acorns mighty oaks
grow.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.
  2013-08-21  9:16   ` Chris Wilson
@ 2013-08-21  9:27     ` Daniel Vetter
  2013-08-21 11:55       ` Rodrigo Vivi
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Vetter @ 2013-08-21  9:27 UTC (permalink / raw)
  To: Chris Wilson, Daniel Vetter, Rodrigo Vivi, intel-gfx

On Wed, Aug 21, 2013 at 11:16 AM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Wed, Aug 21, 2013 at 11:00:53AM +0200, Daniel Vetter wrote:
>> On Tue, Aug 20, 2013 at 03:43:05PM -0300, Rodrigo Vivi wrote:
>> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
>>
>> 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 ...
>
> Whether or not it makes a good test, it is nice to have a repository of
> the little hacks we use for debugging. From little acorns mighty oaks
> grow.

Agreed, but then it imo shouldn't be added to the default list of
targets of tests to run. We already have a bunch of these scripts
added to EXTRA_DIST, I guess adding a new variable SCRIPTS would be
good.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.
  2013-08-21  9:27     ` Daniel Vetter
@ 2013-08-21 11:55       ` Rodrigo Vivi
  2013-08-21 12:03         ` Daniel Vetter
  0 siblings, 1 reply; 9+ messages in thread
From: Rodrigo Vivi @ 2013-08-21 11:55 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

On Wed, Aug 21, 2013 at 6:27 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Aug 21, 2013 at 11:16 AM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>> On Wed, Aug 21, 2013 at 11:00:53AM +0200, Daniel Vetter wrote:
>>> On Tue, Aug 20, 2013 at 03:43:05PM -0300, Rodrigo Vivi wrote:
>>> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
>>>
>>> I'm confused what exactly this tests, since it seems to never fail ...

fb.o #68030

>>> automated tests should have some checks for expected results.
>>>
>>> Also I'm not sure whether we want such ddx/X tests in igt ...

actually it was your idea and I liked it ;)

>>
>> Whether or not it makes a good test, it is nice to have a repository of
>> the little hacks we use for debugging. From little acorns mighty oaks
>> grow.
>
> Agreed, but then it imo shouldn't be added to the default list of
> targets of tests to run.

Agreed. tbh I didn't realized I was doing that by adding it to TESTS_scripts

> We already have a bunch of these scripts
> added to EXTRA_DIST, I guess adding a new variable SCRIPTS would be
> good.

Do you think we need an extra directory for scripts like this? or just
create this new SCRIPTS variable at Makefile.am?

> -Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.
  2013-08-21 11:55       ` Rodrigo Vivi
@ 2013-08-21 12:03         ` Daniel Vetter
  2013-08-21 12:26           ` Rodrigo Vivi
  2013-08-21 18:13           ` Rodrigo Vivi
  0 siblings, 2 replies; 9+ messages in thread
From: Daniel Vetter @ 2013-08-21 12:03 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx

On Wed, Aug 21, 2013 at 1:55 PM, Rodrigo Vivi <rodrigo.vivi@gmail.com> wrote:
> On Wed, Aug 21, 2013 at 6:27 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
>> On Wed, Aug 21, 2013 at 11:16 AM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>>> On Wed, Aug 21, 2013 at 11:00:53AM +0200, Daniel Vetter wrote:
>>>> On Tue, Aug 20, 2013 at 03:43:05PM -0300, Rodrigo Vivi wrote:
>>>> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
>>>>
>>>> I'm confused what exactly this tests, since it seems to never fail ...
>
> fb.o #68030
>
>>>> automated tests should have some checks for expected results.
>>>>
>>>> Also I'm not sure whether we want such ddx/X tests in igt ...
>
> actually it was your idea and I liked it ;)

Ah, what I meant was a reduced testcase to replay just the special
modesetting sequence to reproduce the bug. Similar to what Imre recently
has done with the kms_setmode.c testcase. If we add the entire script we
essentially depend upon fbdev and our own ddx to not change behaviour ...

>>> Whether or not it makes a good test, it is nice to have a repository of
>>> the little hacks we use for debugging. From little acorns mighty oaks
>>> grow.
>>
>> Agreed, but then it imo shouldn't be added to the default list of
>> targets of tests to run.
>
> Agreed. tbh I didn't realized I was doing that by adding it to TESTS_scripts
>
>> We already have a bunch of these scripts
>> added to EXTRA_DIST, I guess adding a new variable SCRIPTS would be
>> good.
>
> Do you think we need an extra directory for scripts like this? or just
> create this new SCRIPTS variable at Makefile.am?

Since it's essentially a special testcase script I think tests/ is good
enough. Something like the below diff:

Cheers, Daniel

diff --git a/tests/Makefile.am b/tests/Makefile.am
index ddb709f..805d90f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -170,8 +170,14 @@ HANG = \
 	gem_non_secure_batch \
 	$(NULL)
 
+scripts = \
+	  check_drm_clients \
+	  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) \
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.
  2013-08-21 12:03         ` Daniel Vetter
@ 2013-08-21 12:26           ` Rodrigo Vivi
  2013-08-21 18:13           ` Rodrigo Vivi
  1 sibling, 0 replies; 9+ messages in thread
From: Rodrigo Vivi @ 2013-08-21 12:26 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

On Wed, Aug 21, 2013 at 9:03 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Aug 21, 2013 at 1:55 PM, Rodrigo Vivi <rodrigo.vivi@gmail.com> wrote:
>> On Wed, Aug 21, 2013 at 6:27 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
>>> On Wed, Aug 21, 2013 at 11:16 AM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>>>> On Wed, Aug 21, 2013 at 11:00:53AM +0200, Daniel Vetter wrote:
>>>>> On Tue, Aug 20, 2013 at 03:43:05PM -0300, Rodrigo Vivi wrote:
>>>>> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
>>>>>
>>>>> I'm confused what exactly this tests, since it seems to never fail ...
>>
>> fb.o #68030
>>
>>>>> automated tests should have some checks for expected results.
>>>>>
>>>>> Also I'm not sure whether we want such ddx/X tests in igt ...
>>
>> actually it was your idea and I liked it ;)
>
> Ah, what I meant was a reduced testcase to replay just the special
> modesetting sequence to reproduce the bug. Similar to what Imre recently
> has done with the kms_setmode.c testcase. If we add the entire script we
> essentially depend upon fbdev and our own ddx to not change behaviour ...

got your idea now... I had misunderstood... mainly because what is in
my mind is the remaining blank screen in my suse case...
chris patch apparently fixed the modesetting sequence and the
remaining blank screen is still mysterious.

>
>>>> Whether or not it makes a good test, it is nice to have a repository of
>>>> the little hacks we use for debugging. From little acorns mighty oaks
>>>> grow.
>>>
>>> Agreed, but then it imo shouldn't be added to the default list of
>>> targets of tests to run.
>>
>> Agreed. tbh I didn't realized I was doing that by adding it to TESTS_scripts
>>
>>> We already have a bunch of these scripts
>>> added to EXTRA_DIST, I guess adding a new variable SCRIPTS would be
>>> good.
>>
>> Do you think we need an extra directory for scripts like this? or just
>> create this new SCRIPTS variable at Makefile.am?
>
> Since it's essentially a special testcase script I think tests/ is good
> enough. Something like the below diff:
>
> Cheers, Daniel
>
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index ddb709f..805d90f 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -170,8 +170,14 @@ HANG = \
>         gem_non_secure_batch \
>         $(NULL)
>
> +scripts = \
> +         check_drm_clients \
> +         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) \
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.
  2013-08-21 12:03         ` Daniel Vetter
  2013-08-21 12:26           ` Rodrigo Vivi
@ 2013-08-21 18:13           ` Rodrigo Vivi
  2013-08-21 21:18             ` Daniel Vetter
  1 sibling, 1 reply; 9+ messages in thread
From: Rodrigo Vivi @ 2013-08-21 18:13 UTC (permalink / raw)
  To: intel-gfx

v2: Don't add to kernel tests.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
---
 tests/Makefile.am           |  9 +++++-
 tests/ddx_intel_after_fbdev | 73 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+), 1 deletion(-)
 create mode 100755 tests/ddx_intel_after_fbdev

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9e46cac..935495e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -169,8 +169,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 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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.
  2013-08-21 18:13           ` Rodrigo Vivi
@ 2013-08-21 21:18             ` Daniel Vetter
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Vetter @ 2013-08-21 21:18 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx

On Wed, Aug 21, 2013 at 03:13:13PM -0300, Rodrigo Vivi wrote:
> v2: Don't add to kernel tests.
> 
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>

lgtm, applied.
-Daniel

> ---
>  tests/Makefile.am           |  9 +++++-
>  tests/ddx_intel_after_fbdev | 73 +++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 81 insertions(+), 1 deletion(-)
>  create mode 100755 tests/ddx_intel_after_fbdev
> 
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index 9e46cac..935495e 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -169,8 +169,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 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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-08-21 21:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-20 18:43 [PATCH] tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded Rodrigo Vivi
2013-08-21  9:00 ` Daniel Vetter
2013-08-21  9:16   ` Chris Wilson
2013-08-21  9:27     ` Daniel Vetter
2013-08-21 11:55       ` Rodrigo Vivi
2013-08-21 12:03         ` Daniel Vetter
2013-08-21 12:26           ` Rodrigo Vivi
2013-08-21 18:13           ` Rodrigo Vivi
2013-08-21 21:18             ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.