This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: A number of testsuite problems


On Fri, Jun 27, 2003 at 04:31:02PM -0400, Phil Edwards wrote:
> On Fri, Jun 27, 2003 at 11:51:01AM -0500, B. Kosnik wrote:
> 
> > >2)  The trunk testsuite is being linked against the installed system
> > >libstdc++.so, not the freshly built one.
> > 
> > Cannot reproduce. I do have LD_LIBRARY_PATH set to the build dir though.
> 
> The dg harness should be doing this.  I can't reproduce it by hand.  Grr.

The dejangu harness /thinks/ it's doing this.  There's a bit in
libstdc++-v3-init which sets up those variables, and adding a print
statement shows that it's calculating the right paths.  Also, I noticed
that we're not setting LD_RUN_PATH.

I added some code in testsuite_hooks.h which will check where the .so is
coming from.  We'll see what happens.


> > >3)  27_io/basic_filebuf/close/char/4879.cc has two problems:
> > >
> > >  a)  it hangs opening tmp_fifo1, and
> > >  b)  dejagnu isn't killing it after the timeout, and in fact it's recorded
> > >      as a PASS.

(b) might be due to the fact that this test fork()s.  I don't know how
dejagnu deals with forks, but I bet that it doesn't pay attention to
children.

This is interesting.  The test's pseudocode is

    name = "tmp_fifo1";
    mkfifo (name);
    fork();

    if (this is now the child process)
    {
        std::ifstream ifs(name);
        sleep(1);
        ifs.close();
        exit(0);
    }

    std::ofstream ofs(name);
    sleep(2);
    ofs.put('t');
    ofs.close();

    if (ofs' state is /not/ failbit)
    {
        fail the test;
    }
    pass the test;

And the dejagnu log records that the test passes after 3 seconds, which
I bet is the parent.  Because the process which gets hung for hours is
blocking on "open(name, O_RDONLY)", which to me says "std::ifstream".

My head is swimming with theories, but I haven't yet thought of a way to
test them.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]