public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: egcs testsuite & dejagnu : A special case?
@ 1998-07-01  0:54 Mike Stump
  1998-07-01  7:26 ` Craig Burley
  0 siblings, 1 reply; 14+ messages in thread
From: Mike Stump @ 1998-07-01  0:54 UTC (permalink / raw)
  To: burley; +Cc: egcs

> Date: Tue, 30 Jun 1998 09:44:28 -0400 (EDT)
> From: Craig Burley <burley@gnu.org>

> >dejagnu however is not exactly a model of cleanliness.

> This reminds me of a thought I had the other day while not on-line.

> I've gotten the impression (not knowing much about how all this
> testing stuff actually works at this point) that some of the
> problems we've run into are due to attempting to be able to test an
> *uninstalled* compiler as well as an installed one.  Is that true?

:-)  Craig, what a question!  There's not enough information for me to
tell...

For C++ there is a way to run the compiler out of the build tree such
that is is almost indistinguishable from an installed compiler.  For
testing purposes, it is usually indistinguishable.

dejagnu has some of the logic and the Makefiles have some of the
logic.

gcc also runs fairly well I think.

> Certainly it's often the case that I want to run tests of my own
> (using my own primitive test suite, or just try out a submitted test
> case or something), and I've done a variety of things over the years
> to cope with the fact that I want to try out a *built*, but not
> *installed*, version of the compiler.

For a maintainer, this is critical.  I do something like (when last I
did this):

#!/bin/sh
case "$HOSTTYPE" in
    sparc) arch=sol
	;;
    hp9000s700) arch=hppa
	;;
    sgi) arch=sgi
	;;
    alpha) arch=alpha
	;;
    RISC6000) arch=rs6000
	;;
esac

#arch=sol
#arch=tic80
#arch=sun4
#arch=sgi
#arch=alpha
#arch=rs6000
#arch=alpha-dec-osf2.0
#arch=hppa

#arch=i586-unknown-linux
#arch=i586

srcdir=${HOME}/egcs
objdir=${HOME}/$arch

LIBS=
echo " $* " | grep " -[cSE] " >/dev/null
if [ $? = 1 ]; then LIBS="-lstdc++"
fi
exec ${objdir}/gcc/xgcc -B${objdir}/gcc/ ${1+"$@"} -I${objdir}/libio -I${srcdir}/libg++/src -I${srcdir}/libio -I${srcdir}/libstdc++ -I${srcdir}/libstdc++/stl -I${objdir}/gcc/include -L${objdir}/libg++ -L${objdir}/libstdc++ $LIBS

Not pretty, but it is close.

> (On my old 486/33, I had a bunch of shells scripts installed in
> /usr/local/bin that'd invoke the compiler in canonical places in my
> home directory, using the appropriate -B and -L switches, etc.  Now
> that I have a much faster system, I just specify a unique --prefix
> and do "make install" each time it seems appropriate, which takes
> only about a minute, but not everybody has that.  And, I admit it's
> tedious to keeping typing full pathnames like
> `/develop/g77/0.5.23/bin/g77' to specify which version of the
> compiler I want to run.  That's a minor problem compared to back
> when I couldn't really maintain more than two versions, though!)

I install a full tree every now and then, but for the day to day
stuff, I only ever use the build directory.  Also, you can get around
names by having sym links from things like ../local/bin/gcc272 to
../local/gcc-2.7.2.3/bin/gcc have only have local/bin in your path.

Further, I usually g++ -E to get a .ii file, and then I can feed that
stright to cc1plus by hand.  I then just look at the .s file and go
from there.

> It occurred to me that, maybe, we could avoid much of this trouble
> by, instead of working around the differences between installed and
> uninstalled compilers *externally* (to the compiler itself, that
> is), we could define a new interface to the compiler *itself* that,
> when invoked, amounts to saying "I'm invoking the *uninstalled*
> compiler", and leave all the mucking about with pathnames and such
> to the new interface.

A way I like better is to have an etc/{g77,gcc,g++} in the build tree
that invokes out of the build tree, and if you want it, you just use
it.

> For example, what if we had the build process automatically build,
> but not install (obviously), shell scripts

Yes.

> Does this idea have any merit?

Yes.

> Offhand it seems fairly simple to implement, and, once we change the
> pertinent tools (egcs top-level Makefile such as when doing `make
> check') to use them, could really reduce the maintenance headaches
> we seem to be having with trying to do useful work on uninstalled
> compilers.

I din't have any headaches because this is what I already do.  :-)

^ permalink raw reply	[flat|nested] 14+ messages in thread
[parent not found: <199807031310.PAA24690@jolan.ppro>]
* Re: egcs testsuite & dejagnu : A special case?
@ 1998-06-29 22:34 Mike Stump
  1998-06-30 15:15 ` Craig Burley
  0 siblings, 1 reply; 14+ messages in thread
From: Mike Stump @ 1998-06-29 22:34 UTC (permalink / raw)
  To: carlo, egcs; +Cc: law

> From: Carlo Wood <carlo@runaway.xs4all.nl>
> Date: Thu, 25 Jun 1998 17:27:34 +0200 (CEST)

> I investigated this new problem and found that it basically is the
> result of the fact that dejagnu is written to test other packages,
> other packages that need a compiler to be compiled, but that
> definitely are not the compiler itself.

Could you rephrase this?

If you meant to say that dejagnu is not written to test the compiler
itself, then I wonder why you say that, as it was.

> The problem, when needing the package itself to compile the package
> (testsuite executables), has not been addressed in dejagnu.

Could you rephrase this?

If you meant to say that dejagnu doesn't address the problem of
testing executables in egcs that are built with the compiler in egcs,
then I wonder why you say that, as it was.

> My feeling is that this is not really a problem of dejagnu: We can't
> expect them

That them is us.  dejagnu exists to test the compiler.  That is why it
was written, and that is it's main purpose in life.

> to hardcode support for all the compiler cases into dejagnu,

We all agree here.  Cleanliness says that we should use generic
interfaces with as little built in knowledge of the compiler specifics
as we can.  dejagnu however is not exactly a model of cleanliness.

> I am more then willing to write the small changes for egcs to make
> it work smoothly, but I'd like to hear a "go" from you before I do
> :).  These patches will be logical, but only if you accept the idea
> that testing a package that is a compiler is a special case.

If your changes make it work more often and don't introduce bugs, then
I'd support them.  The problem is the later one.  If you massively
rearchitect dejagnu and unless you test in many different ways on many
different targets, or are really good, there will be bugs.  What is
painful, is if you break testing that does work today.  This is why, I
think when it comes to dejagnu, I don't like to see a whole lot of
code motion in it, just a little bit every now and then to fix
specific problems in specific ways.

^ permalink raw reply	[flat|nested] 14+ messages in thread
* egcs testsuite & dejagnu : A special case?
@ 1998-06-25 18:53 Carlo Wood
  1998-06-26  2:49 ` Manfred Hollstein
  0 siblings, 1 reply; 14+ messages in thread
From: Carlo Wood @ 1998-06-25 18:53 UTC (permalink / raw)
  To: egcs; +Cc: law

Hey all, I love working in this team :).
Quite a change from the seven years I worked
on the undernet ircd project: Here there are
actually others that do something too! :)

But back to serious work:

----

My self-assigned task of checking how well
the egcs testsuite works with dejagnu has
lead to a the following conclusion on which
I'd like to get some feedback from you:

The latest dejagnu (980528) did address the
problem that was temporally fixed with the
lookfor_dir_with_trigger.patch (to be applied
to dejagnu-971222 only thus).

However, as already reported by H.J. Lu,
dejagnu-980528 is broken again (even with
the lookfor_dir_with_trigger.patch because
something else is broken now).

I investigated this new problem and found that
it basically is the result of the fact that
dejagnu is written to test other packages,
other packages that need a compiler to be
compiled, but that definitely are not the
compiler itself.

The problem, when needing the package itself
to compile the package (testsuite executables),
has not been addressed in dejagnu.

My feeling is that this is not really a problem
of dejagnu: We can't expect them to hardcode
support for all the compiler cases into dejagnu,
not unless there is a simple solution that makes
egcs take care of this "special handling".
For example, dejagnu sets $gccpath to the path
of the installed compiler.  I think it is the
responsibility of egcs to explicitly make sure
that it is set to the correct directory of the
package being tested (egcs); and not the
responsibility of dejagnu to detect it is now
testing a compiler package.

I am more then willing to write the small changes
for egcs to make it work smoothly, but I'd like
to hear a "go" from you before I do :).
These patches will be logical, but only if you
accept the idea that testing a package that is
a compiler is a special case.

Comments please?

Carlo Wood

carlo@runaway.xs4all.nl


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

end of thread, other threads:[~1998-07-03 15:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-07-01  0:54 egcs testsuite & dejagnu : A special case? Mike Stump
1998-07-01  7:26 ` Craig Burley
1998-07-01 20:20   ` Jeffrey A Law
1998-07-02 11:02   ` Carlo Wood
1998-07-03  0:12     ` Craig Burley
1998-07-03  0:50       ` Carlo Wood
1998-07-03  8:38         ` Craig Burley
1998-07-03  9:35           ` Carlo Wood
     [not found] <199807031310.PAA24690@jolan.ppro>
1998-07-03 15:29 ` Craig Burley
  -- strict thread matches above, loose matches on Subject: below --
1998-06-29 22:34 Mike Stump
1998-06-30 15:15 ` Craig Burley
1998-06-30 14:46   ` Jeffrey A Law
1998-06-25 18:53 Carlo Wood
1998-06-26  2:49 ` Manfred Hollstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).