Fix more cases of improper test names
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.btrace / record_goto.exp
index 7485fc7908e014c662144d889c475e471a1b8e5b..ea4cf694a2d4f875dc02316988aca8ccc4ca5f77 100644 (file)
@@ -1,6 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 #
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2016 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <markus.t.metzger@intel.com>
 #
@@ -33,16 +33,18 @@ if [info exists COMPILE] {
     # make check RUNTESTFLAGS="gdb.btrace/record_goto.exp COMPILE=1"
     standard_testfile record_goto.c
     lappend opts debug
-} elseif {[istarget "x86_64-*-*"]} {
-       standard_testfile x86_64-record_goto.S
-} elseif {[istarget "i?86-*-*"]} {
-       standard_testfile i686-record_goto.S
+} elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} {
+       if {[is_amd64_regs_target]} {
+               standard_testfile x86_64-record_goto.S
+       } else {
+               standard_testfile i686-record_goto.S
+       }
 } else {
     verbose "Skipping ${testfile}."
     return -1
 }
 
-if [prepare_for_testing record_goto.exp $testfile $srcfile $opts] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile $opts] {
     return -1
 }
 if ![runto_main] {
@@ -58,7 +60,7 @@ gdb_test_no_output "record btrace"
 gdb_test "next"
 
 # start by listing all functions
-gdb_test "record function-call-history /ci 1, +20" [join [list \
+gdb_test "record function-call-history /ci 1, +20" [multi_line \
   "1\tmain\tinst 1,1" \
   "2\t  fun4\tinst 2,4" \
   "3\t    fun1\tinst 5,8" \
@@ -75,118 +77,118 @@ gdb_test "record function-call-history /ci 1, +20" [join [list \
   "14\t      fun2\tinst 35,36" \
   "15\t    fun3\tinst 37,38" \
   "16\t  fun4\tinst 39,40" \
-  ] "\r\n"]
+  ]
 
 # let's see if we can go back in history
 gdb_test "record goto 19" ".*fun4 \\(\\) at record_goto.c:43.*"
 
 # the function call history should start at the new location
-gdb_test "record function-call-history /ci" [join [list \
+gdb_test "record function-call-history /ci" [multi_line \
   "8\t  fun4\tinst 19,19" \
   "9\t    fun3\tinst 20,22" \
   "10\t      fun1\tinst 23,26" \
-  ] "\r\n"] "function-call-history from 19 forwards"
+  ] "function-call-history from 19 forwards"
 
 # the instruction history should start at the new location
-gdb_test "record instruction-history" [join [list \
+gdb_test "record instruction-history" [multi_line \
   "19.*" \
   "20.*" \
   "21.*" \
-  ] "\r\n"] "instruction-history from 19 forwards"
+  ] "instruction-history from 19 forwards"
 
 # let's go to another place in the history
 gdb_test "record goto 27" ".*fun3 \\(\\) at record_goto.c:35.*"
 
 # check the back trace at that location
-gdb_test "backtrace" [join [list \
+gdb_test "backtrace" [multi_line \
   "#0.*fun3.*at record_goto.c:35.*" \
   "#1.*fun4.*at record_goto.c:43.*" \
   "#2.*main.*at record_goto.c:49.*" \
   "Backtrace stopped: not enough registers or memory available to unwind further" \
-  ] "\r\n"]
+  ]
 
 # walk the backtrace
 gdb_test "up" ".*fun4.*at record_goto.c:43.*" "up to fun4"
 gdb_test "up" ".*main.*at record_goto.c:49.*" "up to main"
 
 # the function call history should start at the new location
-gdb_test "record function-call-history /ci -" [join [list \
+gdb_test "record function-call-history /ci -" [multi_line \
   "9\t    fun3\tinst 20,22" \
   "10\t      fun1\tinst 23,26" \
   "11\t    fun3\tinst 27,27" \
-  ] "\r\n"] "function-call-history from 27 backwards"
+  ] "function-call-history from 27 backwards"
 
 # the instruction history should start at the new location
-gdb_test "record instruction-history -" [join [list \
+gdb_test "record instruction-history -" [multi_line \
   "25.*" \
   "26.*" \
   "27.*" \
-  ] "\r\n"] "instruction-history from 27 backwards"
+  ] "instruction-history from 27 backwards"
 
 # test that we can go to the begin of the trace
 gdb_test "record goto begin" ".*main \\(\\) at record_goto.c:49.*"
 
 # check that we're filling up the context correctly
-gdb_test "record function-call-history /ci -" [join [list \
+gdb_test "record function-call-history /ci -" [multi_line \
   "1\tmain\tinst 1,1" \
   "2\t  fun4\tinst 2,4" \
   "3\t    fun1\tinst 5,8" \
-  ] "\r\n"] "function-call-history from begin backwards"
+  ] "function-call-history from begin backwards"
 
 # check that we're filling up the context correctly
-gdb_test "record instruction-history -" [join [list \
+gdb_test "record instruction-history -" [multi_line \
   "1.*" \
   "2.*" \
   "3.*" \
-  ] "\r\n"] "instruction-history from begin backwards"
+  ] "instruction-history from begin backwards"
 
 # we should get the exact same history from the first instruction
 gdb_test "record goto 2" ".*fun4 \\(\\) at record_goto.c:40.*"
 
 # check that we're filling up the context correctly
-gdb_test "record function-call-history /ci -" [join [list \
+gdb_test "record function-call-history /ci -" [multi_line \
   "1\tmain\tinst 1,1" \
   "2\t  fun4\tinst 2,4" \
   "3\t    fun1\tinst 5,8\r" \
-  ] "\r\n"] "function-call-history from 2 backwards"
+  ] "function-call-history from 2 backwards"
 
 # check that we're filling up the context correctly
-gdb_test "record instruction-history -" [join [list \
+gdb_test "record instruction-history -" [multi_line \
   "1.*" \
   "2.*" \
   "3.*" \
-  ] "\r\n"] "instruction-history from 2 backwards"
+  ] "instruction-history from 2 backwards"
 
 # check that we can go to the end of the trace
 gdb_test "record goto end" ".*main \\(\\) at record_goto.c:50.*"
 
 # check that we're filling up the context correctly
-gdb_test "record function-call-history /ci" [join [list \
+gdb_test "record function-call-history /ci" [multi_line \
   "14\t      fun2\tinst 35,36" \
   "15\t    fun3\tinst 37,38" \
   "16\t  fun4\tinst 39,40" \
-  ] "\r\n"] "function-call-history from end forwards"
+  ] "function-call-history from end forwards"
 
 # check that we're filling up the context correctly
-gdb_test "record instruction-history" [join [list \
+gdb_test "record instruction-history" [multi_line \
   "38.*" \
   "39.*" \
   "40.*\r" \
-  ] "\r\n"] "instruction-history from end forwards"
+  ] "instruction-history from end forwards"
 
 # we should get the exact same history from the second to last instruction
 gdb_test "record goto 39" ".*fun4 \\(\\) at record_goto.c:44.*"
 
 # check that we're filling up the context correctly
-gdb_test "record function-call-history /ci" [join [list \
+gdb_test "record function-call-history /ci" [multi_line \
   "14\t      fun2\tinst 35,36" \
   "15\t    fun3\tinst 37,38" \
   "16\t  fun4\tinst 39,40\r" \
-  ] "\r\n"] "function-call-history from 39 forwards"
+  ] "function-call-history from 39 forwards"
 
 # check that we're filling up the context correctly
-gdb_test "record instruction-history" [join [list \
+gdb_test "record instruction-history" [multi_line \
   "38.*" \
   "39.*" \
   "40.*\r" \
-  ] "\r\n"] "instruction-history from 39 forwards"
+  ] "instruction-history from 39 forwards"
This page took 0.02939 seconds and 4 git commands to generate.