gdb/testsuite: use proc parameters in gdb.arch/amd64-osabi.exp
authorSimon Marchi <simon.marchi@polymtl.ca>
Mon, 10 May 2021 16:43:06 +0000 (12:43 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Mon, 10 May 2021 16:43:07 +0000 (12:43 -0400)
This test has a little oversight: the test procedure doesn't actually
use its parameters, the commands and expected patterns are hard-coded,
so we always test with i386:x86-64, instead of with the three arches.
Fix that.

gdb/testsuite/ChangeLog:

* gdb.arch/amd64-osabi.exp (test_osabi_none): Use the
parameters.

Change-Id: Iee2c32963d09e502ae791d5df2b6c04a1f49a57a

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.arch/amd64-osabi.exp

index afdd887c72b4867c9e618e139587472eb76b9881..a22e014b45a772ba996b5a3c64b44b6e04aba93a 100644 (file)
@@ -1,3 +1,8 @@
+2021-05-10  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * gdb.arch/amd64-osabi.exp (test_osabi_none): Use the
+       parameters.
+
 2021-05-07  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * gdb.guile/guile.exp: Add an extra test.
index 0c435893bfd3baf77542e68fb984789ab6d3eaa2..151fa35e8e4c267dd6df178b59b1ddc4f1451a73 100644 (file)
@@ -24,10 +24,10 @@ if { ![istarget x86_64-*-* ] } {
 proc test_osabi_none { arch void_ptr_size long_double_size } {
     clean_restart
 
-    gdb_test "set architecture i386:x86-64" "The target architecture is set to \"i386:x86-64\"\\."
+    gdb_test "set architecture $arch" "The target architecture is set to \"$arch\"\\."
     gdb_test_no_output "set osabi none" "set osabi none"
-    gdb_test "print sizeof (void*)" " = 8"
-    gdb_test "print sizeof (long double)" " = 16"
+    gdb_test "print sizeof (void*)" " = $void_ptr_size"
+    gdb_test "print sizeof (long double)" " = $long_double_size"
 }
 
 set infos { \
This page took 0.033032 seconds and 4 git commands to generate.