This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

Patch: gdb/testsuite/gdb.arch/altivec-regs.exp Broken testcase


Hi,

I see this error on ppc in gdb.arch/altivec-regs.exp.

(gdb) show endian^M
The target is assumed to be big endian^M
(gdb) FAIL: gdb.arch/altivec-regs.exp: couldn't get endianness
ERROR: tcl error sourcing /home/deuling/src/gdb/testsuite/gdb.arch/altivec-regs.
exp.
ERROR: can't read "endianness": no such variable
   while executing
"if {$endianness == "big"} {
set vector_register ".uint128 = 0x00000001000000010000000100000001, v4_float = .
0x0, 0x0, 0x0, 0x0., v4_int32 = .0x1, 0x1,..."
   (file "/home/deuling/src/gdb/testsuite/gdb.arch/altivec-regs.exp" line 107)
   invoked from within
"source /home/deuling/src/gdb/testsuite/gdb.arch/altivec-regs.exp"
   ("uplevel" body line 1)
   invoked from within
"uplevel #0 source /home/deuling/src/gdb/testsuite/gdb.arch/altivec-regs.exp"
   invoked from within
"catch "uplevel #0 source $test_file_name""

There is an error while executing the testcase. This error occurs because of a missing initialisation of the variable "endianness" if the prior test fails (which is currently the case).
There are two error branches for that test so I decided to put the initialisation before the test.


Is this ok to apply ?

ChangeLog:

       *gdb.arch/altivec-regs.exp: Initialise variable
       endianness in every case.

===============================================================
diff -urN src/gdb/testsuite/gdb.arch/altivec-regs.exp dev/gdb/testsuite/gdb.arch/altivec-regs.exp
--- src/gdb/testsuite/gdb.arch/altivec-regs.exp 2007-01-10 15:48:12.000000000 +0100
+++ dev/gdb/testsuite/gdb.arch/altivec-regs.exp 2007-01-12 21:28:00.000000000 +0100
@@ -88,6 +88,7 @@

gdb_test "next" "" ""

+set endianness ""
send_gdb "show endian\n"
gdb_expect {
    -re "(The target endianness is set automatically .currently )(big|little)( endian.*)$gdb_prompt $" {


Regards, Markus

--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com



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