This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] testsuite/gdb.c++/anon-union.exp: fix corruption of next script
- From: Michael Elizabeth Chastain <mec at shout dot net>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 5 Feb 2003 01:20:12 -0600
- Subject: [commit] testsuite/gdb.c++/anon-union.exp: fix corruption of next script
This patch removes the call to gdb_suppress_entire_file when the
program-under-test fails to compile.
gcc HEAD has been ice'ing on anon-union.c since 2002-12-22
(pr gcc/9039). This causes a bunch of yelling in anon-union.exp,
which is fine. It also spills over and corrupts the first result
in the next test script, because errcnt and warncnt are *not* reset
when a new script starts. They *are* reset when any test gives
a result, which is why the corruption hits only one test result.
We want to get rid of gdb_suppress_entire_file anyways. This
is a bit of a hack: it uses the 2-argument format of 'perror'
to set errcnt to a specific value. Cripes!
I really need this corruption to stop, because the next file,
gdb.c++/casts.exp, has problems of its own and I need to see them.
Testing: tested with native i686-pc-linux-gnu, gdb HEAD,
gcc HEAD, binutils-2.13.2.1, dwarf-2.
I am committing this now.
Michael C
2003-02-04 Michael Chastain <mec@shout.net>
* gdb.c++/anon-union.exp: Do not call gdb_suppress_entire_file.
Call perror and then continue.
Index: anon-union.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/anon-union.exp,v
retrieving revision 1.2
diff -u -r1.2 anon-union.exp
--- anon-union.exp 6 Mar 2001 08:21:52 -0000 1.2
+++ anon-union.exp 5 Feb 2003 07:08:20 -0000
@@ -1,5 +1,5 @@
# Tests for anonymous union support.
-# Copyright 1998, 1999 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -40,7 +40,8 @@
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ perror "Testcase compile failed" 0
+ continue
}
# Start with a fresh gdb