arc: Don't use multiline in arc-disassembler-options.exp test

Message ID CY8PR12MB7516A6706A10968EEF365FD8A84B2@CY8PR12MB7516.namprd12.prod.outlook.com
State New
Headers
Series arc: Don't use multiline in arc-disassembler-options.exp test |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply

Commit Message

Yuriy Kolerov Feb. 9, 2024, 2:08 p.m. UTC
  Breaking a TCL string to several lines leads to adding of extra
symbols to the resuling expect string. In turn, this leads to
failing of all test cases in gdb.arch/arc-disassembler-options.exp
testsuite.

Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
---
 gdb/testsuite/gdb.arch/arc-disassembler-options.exp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Patch

diff --git a/gdb/testsuite/gdb.arch/arc-disassembler-options.exp b/gdb/testsuite/gdb.arch/arc-disassembler-options.exp
index 655edcc774b..dda4f996a13 100644
--- a/gdb/testsuite/gdb.arch/arc-disassembler-options.exp
+++ b/gdb/testsuite/gdb.arch/arc-disassembler-options.exp
@@ -28,10 +28,10 @@  if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {}] \
 clean_restart ${objfile}
 
 proc arc_disassemble_test { func insn mesg } {
-    gdb_test "disassemble $func" \
-       "Dump of assembler code for function $func:\r\n\
-       \[^:\]+:\t$insn\r\nEnd of assembler dump\." \
-       $mesg
+    set prologue "Dump of assembler code for function $func:\r\n"
+    set content "\[^:\]+:\t$insn\r\n"
+    set epilogue "End of assembler dump\."
+    gdb_test "disassemble $func" "$prologue$content$epilogue" $mesg
 }
 
 # Verify defaults.