* [PATCH 1/4] tools: intel_gpu_abrt "get" function
@ 2012-12-13 16:11 Rodrigo Vivi
2012-12-13 16:11 ` [PATCH 2/4] tools: intel_gpu_abrt collecting more useful info Rodrigo Vivi
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Rodrigo Vivi @ 2012-12-13 16:11 UTC (permalink / raw)
To: intel-gfx
A function to make it easy to collect any file or directory needed later.
---
tools/intel_gpu_abrt | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/tools/intel_gpu_abrt b/tools/intel_gpu_abrt
index 141a524..b243a5f 100755
--- a/tools/intel_gpu_abrt
+++ b/tools/intel_gpu_abrt
@@ -1,5 +1,13 @@
#!/bin/sh
+get(){
+ if [ ! -e $tardir/${@:$#} ] ; then
+ mkdir -p $tardir/${@:$#}
+ fi
+ if [ -e $1 ] ; then
+ cp -a ${@:1:$#-1} $tardir/${@:$#} 2>/dev/null
+ fi
+}
if [ -d /debug/dri ] ; then
debugfs_path=/debug_dri
fi
@@ -25,15 +33,15 @@ tmpdir=`mktemp -d`
tardir=$tmpdir/intel_gpu_abrt
mkdir $tardir
-mkdir $tardir/debugfs
-cp $i915_debugfs/* $tardir/debugfs
+get $i915_debugfs/* debugfs
-mkdir $tardir/mod_opts
-cp /sys/module/i915/parameters/* $tardir/mod_opts
+get /sys/module/i915/parameters/* mod_opts
mkdir $tardir/X
-cp /var/log/Xorg.*.log $tardir/X
-cp /etc/X11/xorg.conf $tardir/X
+get /var/log/Xorg.0.log X
+get /var/log/Xorg.0.log.old X
+get /etc/X11/xorg.conf X
+get /etc/X11/xorg.conf.d/ X
dmesg > $tardir/dmesg
lspci -nn > $tardir/lspci
--
1.7.11.7
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] tools: intel_gpu_abrt collecting more useful info
2012-12-13 16:11 [PATCH 1/4] tools: intel_gpu_abrt "get" function Rodrigo Vivi
@ 2012-12-13 16:11 ` Rodrigo Vivi
2012-12-13 16:11 ` [PATCH 3/4] tools: intel_gpu_abrt checking for root access Rodrigo Vivi
2012-12-13 16:11 ` [PATCH 4/4] tools: intel_gpu_abrt bug report template Rodrigo Vivi
2 siblings, 0 replies; 5+ messages in thread
From: Rodrigo Vivi @ 2012-12-13 16:11 UTC (permalink / raw)
To: intel-gfx
---
tools/intel_gpu_abrt | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tools/intel_gpu_abrt b/tools/intel_gpu_abrt
index b243a5f..fe3684d 100755
--- a/tools/intel_gpu_abrt
+++ b/tools/intel_gpu_abrt
@@ -8,6 +8,9 @@ get(){
cp -a ${@:1:$#-1} $tardir/${@:$#} 2>/dev/null
fi
}
+
+igtdir=`dirname $0`
+
if [ -d /debug/dri ] ; then
debugfs_path=/debug_dri
fi
@@ -38,6 +41,7 @@ get $i915_debugfs/* debugfs
get /sys/module/i915/parameters/* mod_opts
mkdir $tardir/X
+xrandr --verbose > $tardir/X/xrandr
get /var/log/Xorg.0.log X
get /var/log/Xorg.0.log.old X
get /etc/X11/xorg.conf X
@@ -46,6 +50,14 @@ get /etc/X11/xorg.conf.d/ X
dmesg > $tardir/dmesg
lspci -nn > $tardir/lspci
+$igtdir/intel_reg_dumper > $tardir/intel_reg_dumper.txt
+$igtdir/intel_bios_dumper $tardir/intel_bios_dump
+$igtdir/intel_stepping > $tardir/intel_stepping
+
+echo 1 > /sys/devices/pci0000:00/0000:00:02.0/rom
+cat /sys/devices/pci0000:00/0000:00:02.0/rom > $tardir/vbios.dump
+echo 0 > /sys/devices/pci0000:00/0000:00:02.0/rom
+
(cd $tmpdir; tar -c intel_gpu_abrt ) > intel_gpu_abrt.tar
rm $tmpdir -Rf
--
1.7.11.7
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] tools: intel_gpu_abrt checking for root access
2012-12-13 16:11 [PATCH 1/4] tools: intel_gpu_abrt "get" function Rodrigo Vivi
2012-12-13 16:11 ` [PATCH 2/4] tools: intel_gpu_abrt collecting more useful info Rodrigo Vivi
@ 2012-12-13 16:11 ` Rodrigo Vivi
2012-12-13 16:11 ` [PATCH 4/4] tools: intel_gpu_abrt bug report template Rodrigo Vivi
2 siblings, 0 replies; 5+ messages in thread
From: Rodrigo Vivi @ 2012-12-13 16:11 UTC (permalink / raw)
To: intel-gfx
needed by other igt tools that are collecting more usefull information.
---
tools/intel_gpu_abrt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/intel_gpu_abrt b/tools/intel_gpu_abrt
index fe3684d..9ca58c0 100755
--- a/tools/intel_gpu_abrt
+++ b/tools/intel_gpu_abrt
@@ -1,5 +1,10 @@
#!/bin/sh
+if [[ $UID -ne 0 ]]; then
+ echo "$0 must be run as root"
+ exit 1
+fi
+
get(){
if [ ! -e $tardir/${@:$#} ] ; then
mkdir -p $tardir/${@:$#}
--
1.7.11.7
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] tools: intel_gpu_abrt bug report template.
2012-12-13 16:11 [PATCH 1/4] tools: intel_gpu_abrt "get" function Rodrigo Vivi
2012-12-13 16:11 ` [PATCH 2/4] tools: intel_gpu_abrt collecting more useful info Rodrigo Vivi
2012-12-13 16:11 ` [PATCH 3/4] tools: intel_gpu_abrt checking for root access Rodrigo Vivi
@ 2012-12-13 16:11 ` Rodrigo Vivi
2012-12-13 17:16 ` Daniel Vetter
2 siblings, 1 reply; 5+ messages in thread
From: Rodrigo Vivi @ 2012-12-13 16:11 UTC (permalink / raw)
To: intel-gfx
checking if file has been generated and output a template for a good bug report
---
tools/intel_gpu_abrt | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/tools/intel_gpu_abrt b/tools/intel_gpu_abrt
index 9ca58c0..4fbff76 100755
--- a/tools/intel_gpu_abrt
+++ b/tools/intel_gpu_abrt
@@ -67,4 +67,36 @@ echo 0 > /sys/devices/pci0000:00/0000:00:02.0/rom
rm $tmpdir -Rf
+if [ -f intel_gpu_abrt.tar ] ; then
+ cat <<EOF
+intel_gpu_abrt.tar has been created.
+
+Please attach it to https://bugs.freedesktop.org
+with a good bug description as suggested in this template:
+
+System environment:
+-- chipset:
+-- system architecture: `uname -m`
+-- xf86-video-intel:
+-- xserver: `grep "X.Org X Server" /var/log/Xorg.0.log | awk '{print $NF}'`
+-- mesa:
+-- libdrm: `pkg-config --modversion libdrm`
+-- kernel: `uname -r`
+-- Linux distribution:
+-- Machine or mobo model:
+-- Display connector:
+
+Reproducing steps:
+
+Additional info:
+
+EOF
exit 0
+else
+cat <<EOF
+Error on tarball generation.
+For bug report, please follow manual instructions available at:
+https://01.org/linuxgraphics/documentation/how-report-bugs-0
+EOF
+exit 1
+fi
--
1.7.11.7
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 4/4] tools: intel_gpu_abrt bug report template.
2012-12-13 16:11 ` [PATCH 4/4] tools: intel_gpu_abrt bug report template Rodrigo Vivi
@ 2012-12-13 17:16 ` Daniel Vetter
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2012-12-13 17:16 UTC (permalink / raw)
To: Rodrigo Vivi; +Cc: intel-gfx
On Thu, Dec 13, 2012 at 02:11:24PM -0200, Rodrigo Vivi wrote:
> checking if file has been generated and output a template for a good bug report
Slurped in all patches, thanks.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-12-13 17:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-13 16:11 [PATCH 1/4] tools: intel_gpu_abrt "get" function Rodrigo Vivi
2012-12-13 16:11 ` [PATCH 2/4] tools: intel_gpu_abrt collecting more useful info Rodrigo Vivi
2012-12-13 16:11 ` [PATCH 3/4] tools: intel_gpu_abrt checking for root access Rodrigo Vivi
2012-12-13 16:11 ` [PATCH 4/4] tools: intel_gpu_abrt bug report template Rodrigo Vivi
2012-12-13 17:16 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox