Hi again,
I had another look at Agar's demos, and wrote the attached
agar-run-demos.sh test script (to be run from the 'demos' directory),
which could help debugging issues.
It first gathers some system infos, runs all tests in a row, collects
errors and al, allows to generate a gdb stacktrace and generates a
summary text file that can be sent to the maintainer.
I ran it on my system and will send the results off-line.
In a few words, if configured with --disable-network --disable-threads
--disable-server --enable-gui --enable-utf8 --with-gl --with-jpeg
--with-freetype, on my system more than 1/4 of the tests fail with an
error like:
"""
[Thread debugging using libthread_db enabled]
Caught X error: GLXBadContextTag
Program received signal SIGABRT, Aborted.
0x00007ffff6545a75 in *__GI_raise (sig=<value optimised out>) at
..../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier
de ce type.
in ../nptl/sysdeps/unix/sysv/linux/raise.c
"""
Hope this helps!
Best regards,
Olivier Boudeville.
#!/bin/sh
report_file=`pwd`/`date "+%Y%m%d"`"-agar-demos-from-"`hostname`".txt"
maintainer_email="[email protected]"
message_prefix="###########################"
offset=" + "
do_configure=1
do_build=1
do_run=0
use_gdb_on_failure=0
add()
{
echo "${offset}$*" >> ${report_file}
}
addDir()
{
if [ -d "$1" ] ; then
add "$1 found, content is "
add "<---"
ls $1 2>&1 1>>${report_file}
add "end of directory listing for $1 --->"
else
add "No $1 found."
fi
}
blankLine()
{
echo >> ${report_file}
}
# Preliminary checkings:
agar_config_name="agar-config"
agar_config=`which $agar_config_name`
if [ ! -x "$agar_config" ] ; then
echo "Error, no esxecutable Agar config script ($agar_config) found." 1>&2
exit 5
fi
if [ $use_gdb_on_failure -eq 0 ] ; then
if [ ! -x `which gdb` ] ; then
echo "Error, settings tell us to use GDB on failure, but the debugger does not seem available." 1>&2
exit 25
fi
fi
#echo "Will write all information in $report_file."
echo
echo " Welcome to Agar's test report generator."
echo
echo "This script will collect information about your host configuration and your Agar installation, in order to ease the troubleshooting."
echo "The result of the inquiry will be stored in file <${report_file}>, please feel free to peer into it before sending it."
# Blanks too any previous report file:
echo "${message_prefix} Beginning of test report" > ${report_file}
echo >> ${report_file}
add "Test report generated for ${us...@`hostname`, on `LANG= date '+%A %d %B, %Y at %H:%M:%S'`, from `pwd`" >> ${report_file}
add "Host platform: `uname -a`"
add "Available disk size: " `LANG= df -h .`
add "gcc: `gcc -v 2>&1`"
add "ld: `ld -v 2>&1`"
add "PATH: $PATH"
add "LD_LIBRARY_PATH: $LD_LIBRARY_PATH "
blankLine
# First display:
DISPLAY=:0
add "Hardware-accelerated rendering:"
glxinfo | egrep "direct rendering" >> ${report_file}
glxinfo | egrep "OpenGL .* string" >> ${report_file}
blankLine
add "Graphical controller: "
lspci | grep "VGA" >> ${report_file}
blankLine
add "Installed GL libraries:"
/bin/ls -l /usr/lib/libGL.so* >> ${report_file}
blankLine
add "AIGLX status: "
grep AIGLX /var/log/Xorg.0.log | grep -v '(WW)' >> ${report_file}
blankLine
blankLine
#add "ensuring the test cases are built:"
# Note that the 'threads' test should be disabled in Agar is not built with
# multithread support.
if [ $do_configure -eq 0 ] ; then
echo " - configuring Agar demos..."
add "configuring Agar demos"
blankLine
./configure 1>> ${report_file} 2>&1
res=$?
if [ ! $res -eq 0 ] ; then
echo "Error while configuring the Agar demos (code: $res)." 1>&2
exit 10
fi
fi
if [ $do_build -eq 0 ] ; then
echo " - building Agar demos"
add "building Agar demos"
blankLine
make 1>> ${report_file} 2>&1
res=$?
if [ ! $res -eq 0 ] ; then
echo "Error while building the Agar demos (code: $res)." 1>&2
exit 15
fi
fi
if [ $do_run -eq 0 ] ; then
echo " - running Agar demos..."
add "running Agar demos"
blankLine
if [ $use_gdb_on_failure -eq 0 ] ; then
echo "(you may use: 'tail -f $report_file' from another terminal to follow progress)"
fi
for d in * ; do
if [ -d "$d" ] ; then
cd $d
blankLine
add "$message_prefix"
if [ -x "./$d" ] ; then
echo " + running $d"
add "running demo $d"
./$d 1>> ${report_file} 2>&1
res=$?
if [ ! $res -eq 0 ] ; then
echo "(failed, code: $res)"
add "Demo $d failed (code: $res), linking information were:"
add `ldd $d`
if [ $use_gdb_on_failure -eq 0 ] ; then
add "running GDB on that crashing demo $d:"
echo "(reproduce the behaviour that just led to a crash then type blilndly on this terminal 'quit' then enter, on this GDB console when finished; if not continuing with the next test, gdb is actually asking 'Quit anyway? (y or n)', answer 'y' then enter)"
gdb_cmd_file=".gdb-command.txt"
echo "run" > $gdb_cmd_file
gdb -x $gdb_cmd_file $d 2>&1 | tee 1>> ${report_file} 2>&1
/bin/rm -f $gdb_cmd_file
fi
else
echo "(success)"
add "Demo $d apparently succeeded."
fi
else
add "(no executable $d found)"
fi
add "$message_prefix"
blankLine
cd ..
fi
done
add "All demos were run."
fi
echo >> ${report_file}
echo >> ${report_file}
echo "${message_prefix} End of test report" >> ${report_file}
echo
echo "If happy with the content of ${report_file}, send this file as attachment to $maintainer_email to help Agar's maintenance. You may also specify the configure settings you supplied to the Agar library configure script. Thanks!"
_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html