aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-11-15 02:44:30 -0500
committerMike Frysinger <vapier@gentoo.org>2021-11-15 02:53:31 -0500
commit565cbe4b9170aca9e337b2d756b1ef75edb49424 (patch)
treeee23b5dc7da4641b2a685561cd338ac7b9d7f0ea
parent852016f92107581dbc9513196c9a74a91b5a5b6e (diff)
downloadgdb-565cbe4b9170aca9e337b2d756b1ef75edb49424.zip
gdb-565cbe4b9170aca9e337b2d756b1ef75edb49424.tar.gz
gdb-565cbe4b9170aca9e337b2d756b1ef75edb49424.tar.bz2
sim: cris: replace custom "dest" test field with new --argv0
The #dest field used in the cris testsuite is a bit of hack to set the argv[0] for the tests to read out later on. Now that the sim has an option to set argv[0] explicitly, we don't need this custom field, so let's drop it to harmonize the testsuites a little.
-rw-r--r--sim/testsuite/cris/c/c.exp6
-rw-r--r--sim/testsuite/cris/c/readlink11.c3
-rw-r--r--sim/testsuite/cris/c/readlink5.c2
-rw-r--r--sim/testsuite/cris/c/readlink6.c2
4 files changed, 5 insertions, 8 deletions
diff --git a/sim/testsuite/cris/c/c.exp b/sim/testsuite/cris/c/c.exp
index 2608468..ec89c5c 100644
--- a/sim/testsuite/cris/c/c.exp
+++ b/sim/testsuite/cris/c/c.exp
@@ -101,7 +101,6 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
set opts(timeout) ""
set opts(mach) ""
set opts(xerror) "no"
- set opts(dest) "$testname.x"
set opts(simenv) ""
set opts(kfail) ""
set opts(xfail) ""
@@ -188,8 +187,7 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
verbose -log "Compiling $src with $opts(cc)"
- set dest "$opts(dest)"
- if { [target_compile $src $dest "executable" "$opts(cc)" ] != "" } {
+ if { [target_compile $src "$testname.x" "executable" "$opts(cc)" ] != "" } {
unresolved $testname
continue
}
@@ -212,7 +210,7 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
eval setup_kfail $opts(kfail)
}
- set result [sim_run $dest "$opts(sim,$mach)" "$opts(progoptions)" \
+ set result [sim_run "$testname.x" "$opts(sim,$mach)" "$opts(progoptions)" \
"" "$opts(simenv)"]
set return_code [lindex $result 0]
set output [lindex $result 1]
diff --git a/sim/testsuite/cris/c/readlink11.c b/sim/testsuite/cris/c/readlink11.c
index 05a332f..9d84e7d 100644
--- a/sim/testsuite/cris/c/readlink11.c
+++ b/sim/testsuite/cris/c/readlink11.c
@@ -1,7 +1,6 @@
/* As readlink5.c (sic), but specifying silent ENOSYS.
#notarget: cris*-*-elf
-#dest: ./readlink11.c.x
-#sim: --cris-unknown-syscall=enosys-quiet
+#sim: --cris-unknown-syscall=enosys-quiet --argv0 ./readlink11.c.x
#output: ENOSYS\n
#output: xyzzy\n
*/
diff --git a/sim/testsuite/cris/c/readlink5.c b/sim/testsuite/cris/c/readlink5.c
index 80f20da..4bfb7ba 100644
--- a/sim/testsuite/cris/c/readlink5.c
+++ b/sim/testsuite/cris/c/readlink5.c
@@ -1,6 +1,6 @@
/* Check that unsupported readlink calls don't cause the simulator to abort.
#notarget: cris*-*-elf
-#dest: ./readlink5.c.x
+#sim: --argv0 ./readlink5.c.x
#xerror:
#output: Unimplemented readlink syscall (*)\n
#output: program stopped with signal 4 (*).\n
diff --git a/sim/testsuite/cris/c/readlink6.c b/sim/testsuite/cris/c/readlink6.c
index 4bac20d..52a26f4 100644
--- a/sim/testsuite/cris/c/readlink6.c
+++ b/sim/testsuite/cris/c/readlink6.c
@@ -1,5 +1,5 @@
/* Check that rare readlink calls don't cause the simulator to abort.
#notarget: cris*-*-elf
-#dest: @exedir@/readlink6.c.x
+#sim: --argv0 @exedir@/readlink6.c.x
*/
#include "readlink2.c"