tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.
PATCH 1/1 tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.
--- tests/Makefile.am | 1 + tests/ddx_intel_after_fbdev | 73 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100755 tests/ddx_intel_after_fbdev
tests/Makefile.am +1 -0
@@ -127,6 +127,7 @@ TESTS_scripts = \ sysfs_l3_parity \ test_rte_check \ tools_test \ + ddx_intel_after_fbdev \ ZZ_hangman \ $(NULL)
tests/ddx_intel_after_fbdev new file +73 -0
73 lines not on this page · raw message
Signature · 1 line
1.8.1.4
Quoted 1 line · Rodrigo Vivi
Signed-off-by Rodrigo Vivi <[email protected]>
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
Quoted 104 lines
--- tests/Makefile.am | 1 + tests/ddx_intel_after_fbdev | 73 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100755 tests/ddx_intel_after_fbdevtests/Makefile.am +1
-0@@ -127,6 +127,7 @@ TESTS_scripts = \ sysfs_l3_parity \ test_rte_check \ tools_test \ + ddx_intel_after_fbdev \ ZZ_hangman \ $(NULL)tests/ddx_intel_after_fbdev new file +73
-0@@ -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 0Signature · 6 lines
1.8.1.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 7 lines · Daniel Vetter
Quoted 1 line · Rodrigo Vivi
Signed-off-by Rodrigo Vivi <[email protected]>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
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 4 lines · Chris Wilson
Quoted 3 lines · Daniel Vetter
Quoted 1 line · Rodrigo Vivi
Signed-off-by Rodrigo Vivi <[email protected]>
Quoted 8 lines
Quoted 4 lines
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
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 6 lines · Daniel Vetter
Quoted 5 lines · Chris Wilson
Quoted 4 lines · Daniel Vetter
Quoted 1 line · Rodrigo Vivi
Signed-off-by Rodrigo Vivi <[email protected]>I'm confused what exactly this tests, since it seems to never fail ...
fb.o #68030
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
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 ;)
Quoted 7 lines
Quoted 4 lines
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
Quoted 3 lines
We already have a bunch of these scripts
added toEXTRA_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?
Quoted 5 lines
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
Quoted 8 lines · Rodrigo Vivi
Quoted 6 lines · Daniel Vetter
Quoted 5 lines · Chris Wilson
Quoted 4 lines · Daniel Vetter
Quoted 1 line · Rodrigo Vivi
Signed-off-by Rodrigo Vivi <[email protected]>I'm confused what exactly this tests, since it seems to never fail ...
Quoted 7 lines
fb.o #68030
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
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 ...
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
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.
Quoted 8 lines
Agreed. tbh I didn't realized I was doing that by adding it to
TESTS_scriptsQuoted 3 lines
We already have a bunch of these scripts
added toEXTRA_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
tests/Makefile.am +7 -1
@@ -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) \
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 13 lines · Daniel Vetter
Quoted 12 lines · Rodrigo Vivi
Quoted 6 lines · Daniel Vetter
Quoted 5 lines · Chris Wilson
Quoted 4 lines · Daniel Vetter
Quoted 1 line · Rodrigo Vivi
Signed-off-by Rodrigo Vivi <[email protected]>I'm confused what exactly this tests, since it seems to never fail ...
fb.o #68030
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
automated tests should have some checks for expected results.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
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.ctestcase. 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.
Quoted 46 lines
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
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.
Quoted 8 lines
Agreed. tbh I didn't realized I was doing that by adding it to
TESTS_scriptsQuoted 3 lines
We already have a bunch of these scripts
added toEXTRA_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
tests/Makefile.am +7
-2@@ -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
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
PATCH 1/1 tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.
In reply to Daniel Vetterv2: Don't add to kernel tests.
--- 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
tests/Makefile.am +8 -1
@@ -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) \
tests/ddx_intel_after_fbdev new file +73 -0
73 lines not on this page · raw message
Signature · 1 line
1.8.1.4
Quoted 3 lines · Rodrigo Vivi
v2: Don't add to kernel tests.
Signed-off-by Rodrigo Vivi <[email protected]>
lgtm, applied.
-Daniel
Quoted 113 lines
--- tests/Makefile.am | 9 +++++- tests/ddx_intel_after_fbdev | 73 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100755 tests/ddx_intel_after_fbdevtests/Makefile.am +8
-1@@ -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) \tests/ddx_intel_after_fbdev new file +73
-0@@ -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 0Signature · 6 lines
1.8.1.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch