]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: cris: replace custom "dest" test field with new --argv0
authorMike Frysinger <vapier@gentoo.org>
Mon, 15 Nov 2021 07:44:30 +0000 (02:44 -0500)
committerMike Frysinger <vapier@gentoo.org>
Mon, 15 Nov 2021 07:53:31 +0000 (02:53 -0500)
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.

sim/testsuite/cris/c/c.exp
sim/testsuite/cris/c/readlink11.c
sim/testsuite/cris/c/readlink5.c
sim/testsuite/cris/c/readlink6.c

index 26084682dc955a3d4c2f76ce387221aab3ebe2a6..ec89c5c1de20a8b15b4f875ce432bb31faa293c3 100644 (file)
@@ -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]
index 05a332f65ec22e7687734251d5ad05f3bc66cbac..9d84e7d95fac0a70ed2b2d62a79ea5b25bd32e39 100644 (file)
@@ -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
 */
index 80f20dadd8880c080b58fc568775b45fe8feff79..4bfb7ba3a1d38a71cc20cf36a9c7e4ed1649385d 100644 (file)
@@ -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
index 4bac20d81905c5a6e0ae6e28b3614a16f6fb1811..52a26f496392e6b0c1fffc05ee4f4127279b94d8 100644 (file)
@@ -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"