Blame TODO

Packit 62fe53
Bigger items
Packit 62fe53
============
Packit 62fe53
Packit 62fe53
* Internationali[sz]ation.
Packit 62fe53
* Use a throw-away slave interpreter for running each test case.
Packit 62fe53
* Transfer timeouts should be dependent on file size and link speed.
Packit 62fe53
* Add more support for target boards and RTOSes.
Packit 62fe53
* Use the new expect terminal support for an "escape codes" API.
Packit 62fe53
* Use expectk and write a GUI testing API, complete with record/playback.
Packit 62fe53
Packit 62fe53
Packit 62fe53

Packit 62fe53
Date: Thu, 29 Aug 2013 19:42:07 +0200
Packit 62fe53
From: Jan Kratochvil <jan.kratochvil@redhat.com>
Packit 62fe53
To: dejagnu@gnu.org
Packit 62fe53
Subject: dejagnu-2.0 feature wishlist (from Cauldron 2013)
Packit 62fe53
Packit 62fe53
Hi,
Packit 62fe53
Packit 62fe53
I haven't found any discussion here about the features in hypothetical
Packit 62fe53
dejagnu-2.0, as presented by Rob Savoye at Cauldron 2013.
Packit 62fe53
Packit 62fe53
I wrote some scripts on top of DejaGNU but I think at least some of the
Packit 62fe53
functionality could be integrated into DejaGNU itself.  It depends whether
Packit 62fe53
dejagnu-2.0 scope will remain the same or whether DejaGNU should be used
Packit 62fe53
together with tools like buildbot or whether dejagnu-2.0 will integrate some
Packit 62fe53
of the buildbot-like functionality (multi-note continuous runs).
Packit 62fe53
Packit 62fe53
Maybe there exists something similar already?  Originally I wrote it only for
Packit 62fe53
myself but I see nowadays such tool may be useful for more people.
Packit 62fe53
Packit 62fe53
Former announcement of my scripts:
Packit 62fe53
	https://sourceware.org/ml/archer/2010-q3/msg00194.html
Packit 62fe53
URLs are no longer valid, the files can be found now at:
Packit 62fe53
	git clone git://git.jankratochvil.net/nethome
Packit 62fe53
	(that is my whole $HOME, not just the testsuite scripts)
Packit 62fe53
The primary script 'hammock' is at:
Packit 62fe53
	http://git.jankratochvil.net/?p=nethome.git;a=blob;f=bin/hammock
Packit 62fe53
Packit 62fe53
Essential fixup of current DejaGNU:
Packit 62fe53
------------------------------------------------------------------------------
Packit 62fe53
--orphanripper: It is used by default, normal DejaGNU scripts do not track
Packit 62fe53
their spawned children which share fds 0/1/2 (stdio).  This means some such
Packit 62fe53
children are due to *.exp code bugs occasionally leftover running forever.  As
Packit 62fe53
they have their fds still open the testsuite with output redirected somewhere
Packit 62fe53
will lock up at the end.  Some runaway processes also hog CPU for 100%.  The
Packit 62fe53
following utility identifies runaway processes by using custom pty for them
Packit 62fe53
and kills them at the end of testsuite run:
Packit 62fe53
	http://pkgs.fedoraproject.org/cgit/gdb.git/plain/gdb-orphanripper.c
Packit 62fe53
It sure should be better integrated in DejaGNU somehow.
Packit 62fe53
Packit 62fe53
Features outside of the current scope of DejaGNU:
Packit 62fe53
------------------------------------------------------------------------------
Packit 62fe53
--distro: Testing in various OSes.  My script implement it based on chroot
Packit 62fe53
(Fedora/RHEL has tool 'mock' for it), it has some performance/management
Packit 62fe53
advantages but it has to (1) run all OSes with the same kernel, (2) mock
Packit 62fe53
supports only Fedora/RHEL OSes, (3) it can run only x86_64/i386 arch this way.
Packit 62fe53
The real solution should be multi-node (so that it can also support non-x86*
Packit 62fe53
testing), for x86* it would be commonly using VMs.  But it still could support
Packit 62fe53
even mock/chroot as it runs without the hassle of disk images.
Packit 62fe53
Packit 62fe53
--component: Pre-set remote repositories for download of gdb/binutils/gcc etc.
Packit 62fe53
I want to run my patches on top of clean tree, not in some existing directory
Packit 62fe53
which may have leftover files forgotten to be checked into repository etc.
Packit 62fe53
Understandably it also supports local repository caches.
Packit 62fe53
--srcrpm is similar, it builds tree from a prepared archive - I should be able
Packit 62fe53
to provide also .src.rpm (or .tar.gz) to run the test for.
Packit 62fe53
--branch asks for example for branch "gdb_7_6-branch" from the repository.
Packit 62fe53
Packit 62fe53
--file: Provide custom patches for the newly built tree.
Packit 62fe53
Packit 62fe53
--target: Provide a list of custom configure --target options.  This could be
Packit 62fe53
more general such as to provide any custom configure options.
Packit 62fe53
Packit 62fe53
--parallel: Parallelization of multiple build+testsuite runs, not just
Packit 62fe53
parallelization of the testsuite run part.
Packit 62fe53
If I ask to build 40x binutils with 40 different targets I may want to do
Packit 62fe53
run it in parallel (like with make -j8).
Packit 62fe53
Packit 62fe53
Convenience:
Packit 62fe53
------------------------------------------------------------------------------
Packit 62fe53
--gdbserver, --valgrind, --bfd32, --gdbindex, --dwz, --dwarf=X, --stabs:
Packit 62fe53
Various pre-set options.  One can configure it by hand but it is too difficult
Packit 62fe53
for daily use, for example for --dwz it means for GDB
Packit 62fe53
	runtest CC_FOR_TARGET=/bin/sh\ $PWD/../contrib/cc-with-tweaks.sh\ -m\ gcc CXX_FOR_TARGET=/bin/sh\ $PWD/../contrib/cc-with-tweaks.sh\ -m\ g++ ...
Packit 62fe53
	(plus also GNATMAKE_FOR_TARGET, GO_FOR_TARGET and GO_LD_FOR_TARGET)
Packit 62fe53
For --valgrind it means other cryptic options like:
Packit 62fe53
	RUNTESTFLAGS=--target_board=valgrind
Packit 62fe53
Packit 62fe53
Incomplete racy reads ("read1"):
Packit 62fe53
------------------------------------------------------------------------------
Packit 62fe53
https://sourceware.org/bugzilla/show_bug.cgi?id=12649
Packit 62fe53
GDB testsuite contains (yes, it still contains them) various racy cases:
Packit 62fe53
  gdb_test_multiple "set dprintf-style agent" $msg {
Packit 62fe53
      -re "warning: Target cannot run dprintf commands.*" {
Packit 62fe53
It commonly works as when expect does the read() syscall all the GDB output is
Packit 62fe53
ready.  But occasionally the next testcase FAILs.  This is because
Packit 62fe53
occasionally only part of the output gets read by the read() syscall, regex
Packit 62fe53
gets matched but the final $gdb_prompt is not discarded - and the leftover
Packit 62fe53
$gdb_prompt corrupts the next testcase below.  Sure the fix is:
Packit 62fe53
  gdb_test_multiple "set dprintf-style agent" $msg {
Packit 62fe53
    -re "warning: Target cannot run dprintf commands.*\r\n$gdb_prompt $" {
Packit 62fe53
Packit 62fe53
There is LD_PRELOAD *.so file in the Bug above to reproduce these cases
Packit 62fe53
reliably.  There is also a reproducer of different kind of bugs ("writew")
Packit 62fe53
although those do not happen so often AFAIK.  This functionality could be
Packit 62fe53
better integrated into DejaGNU.
Packit 62fe53
Packit 62fe53
(Sure the primary problem is that the testsuite should not use regex matching
Packit 62fe53
and it should use generic GDB MI output parser.  But that is a problem that
Packit 62fe53
only a few GDB features have implemented the GDB MI interface.)
Packit 62fe53
Packit 62fe53
Diffing of results:
Packit 62fe53
------------------------------------------------------------------------------
Packit 62fe53
http://git.jankratochvil.net/?p=nethome.git;a=blob;f=bin/diffgdb
Packit 62fe53
 * GDB has various known FAILs.  They should be but they are not KFAILed or
Packit 62fe53
   XFAILed.  (On recent Fedora I see there are only 23 of them but on CentOS-5
Packit 62fe53
   there is 1063 of them.)
Packit 62fe53
 * One is only interested in introduced regressions so one needs to diff two
Packit 62fe53
   *.sum files.  Looking again and again at the same known FAILing cases is
Packit 62fe53
   not productive.
Packit 62fe53
 * During diff one is not interested for example in newly PASSing testcases.
Packit 62fe53
   One also is not interested in FAIL->PASS cases.  One is definitely
Packit 62fe53
   interested in PASS->FAIL regressions.  New FAILing testcases are also
Packit 62fe53
   interesting.
Packit 62fe53
Therefore the script above does a filtering of the diff results.  It parses
Packit 62fe53
DejaGNU *.sum output although DejaGNU did already knew them internally.
Packit 62fe53
Packit 62fe53
The script also filters out unstable/racy results.  This may be outside of the
Packit 62fe53
scope but in fact an unimplemented feature would be to provide statistics on
Packit 62fe53
unstable results (so one can fix those) if I run the same build+testsuite many
Packit 62fe53
times.
Packit 62fe53
Packit 62fe53
Not yet implemented: Finding a regression common reason:
Packit 62fe53
------------------------------------------------------------------------------
Packit 62fe53
I run 73 testsuite runs daily - primarily GDB in different OSes, for each OS
Packit 62fe53
its x86_64 and i686 variant, for x86_64 OS also in -m32 mode.
Packit 62fe53
If there happens a general regression I get 73 times PASS->FAIL result.  That
Packit 62fe53
is not too convenient to filter out other changes out of the 73 regressions.
Packit 62fe53
Moreover sometimes the regression affects for example only 32-bit OSes
Packit 62fe53
- therefore there will be only about 24 PASS->FAILs and I have to figure out
Packit 62fe53
in which testsuite combinations they happen.
Packit 62fe53
In other cases the regression happens for example only on (older) RHELs and
Packit 62fe53
not on Fedoras but that again means about 6 PASS->FAIL cases.
Packit 62fe53
There would be nice some summary that this PASS->FAIL occured in testsuite
Packit 62fe53
runs in directories rhel* and it did not occur in directories fedora* etc.