Re: [patch] delete namespace __gnu_test from C++ testsuite

Michael Elizabeth Chastain
2002-12-18T19:00:56Z

I would change this code:

# simple object, enum
gdb_test "print test1.value" "\\$\[0-9\]* = egyptian" "simple object, enum"

To:

send_gdb "test1.value\n"
gdb_expect {
-re "\\$\[0-9\]+ = __gnu_test::egyptian\r\n$gdb_prompt $" {
pass "simple object, enum
}
-re "\\$\[0-9\]+ = egyptain\r\n$gdb_prompt $" {
fail "simple object, enum (gdb/895)"
}
-re ".*$gdb_prompt $" {
fail "simple object, enum"
}
timeout {
fail "simple object, enum (timeout)"
}

If the FAIL happens with a PR number, then anybody who is reviewing the
results can look at the PR and notice that it says "this was broken in
5.3 as well". (Also when I do this kind of review, I just look in the
gdb.log files and notice that the gdb output was the same, just the
result changed).

If the FAIL happens without a PR number, that is a genuinely new bug
in gdb (or gcc), and deserves to be treated the same as any other
regression.

In the "= egyptian" case, I would call kfail or setup_kfail as soon as
we start using KFAIL's. KFAIL is moving way up my priority list.

If the "= egyptian" case is due to bad output from gcc, then I would
add a big comment and then call setup_xfail (or call xfail outright).
I would also want to have a gcc bug # in hand and refer to it in
the test script source.

Michael C