dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

current xml log input/output handling.


From: cgd
Subject: current xml log input/output handling.
Date: 10 Jul 2003 18:28:35 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

(Yes, despite appearances, i'm actually working on the XML stuff.  8-)

I'd been working in the sources.redhat.com version of dejagnu (since
that's what i can most easily test), and was just beginning to merge
some of my initial cleanups back into the official version...

Anyway, one difference is the xml log file's <input> and <output>
handling.  (sources.redhat.com has a version like master framework.exp
rev 1.6.)


I don't think the existing dejagnu behaviour (i.e., <input> and
<output>) is correct at all.

My reasoning:

(1) expect_out(buffer) seemingly can't be relied upon for this
    purpose, because you don't know whether people have invoked
    'expect' to match output since the "meat" of the test.

    for instance, for some of GDB's simple tests:

(gdb) run 
Starting program:
/projects/bbp_ext13/systems/users/cgd/proj/gnu/write/gdb/src.c
lean/bld/gdb/testsuite/gdb.asm/asm-source 

Breakpoint 1, main () at
../../../src/gdb/testsuite/gdb.asm/asmsrc1.s:29
29              gdbasm_several_nops
Current language:  auto; currently asm
(gdb) f
#0  main () at ../../../src/gdb/testsuite/gdb.asm/asmsrc1.s:29
29              gdbasm_several_nops
(gdb) PASS: gdb.asm/asm-source.exp: f at main
n
33              gdbasm_call foo2
(gdb) PASS: gdb.asm/asm-source.exp: next over macro
s
foo2 () at ../../../src/gdb/testsuite/gdb.asm/asmsrc2.s:8
8               gdbasm_enter
(gdb) PASS: gdb.asm/asm-source.exp: step into foo2

    expect_out(buffer) dns up being ** EMPTY **.  Obviously, this is
    not reflective of reality.  (I don't quite understand this,
    because some other tests which pass include in expect_out(buffer)
    all the stuff up to and including the GDB prompt.  But that's not
    the point, which is that doing this is simply not reliable.)

(2) in the case of a test with multi-line output (hey, that seems like
    a reasonable thing), this only includes the first line.  This is
    especially ironic in light of the fact that the *last* thing in
    expect_out(buffer) is what caused the test to pass.

(3) more generally, when presented with multiple lines of stuff in
    expect_out(buffer), one cannot know which were "input" and which
    were "output".  e.g. consider command line continuations like:

                foo bar baz \
                   bar baz

    (why one would do that except when testing line continuations
    themselves, I can't say, but that at least is a valid time.  8-)



Anyway, what i'm planning to do with this is just get rid of <input>
and <output> and instead allow <log> (or something similar) to be
output at virtually any time.

Given that the current behaviour is broken (and makes syncing w/ the
sources.redhat.com version a bit harder 8-), I'm going to submit a
patch to remove it after i've tested it adequately.



cgd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]