From: Mike Frysinger Date: Mon, 15 Nov 2021 07:44:30 +0000 (-0500) Subject: sim: cris: replace custom "dest" test field with new --argv0 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=565cbe4b9170aca9e337b2d756b1ef75edb49424;p=binutils-gdb.git 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. --- diff --git a/sim/testsuite/cris/c/c.exp b/sim/testsuite/cris/c/c.exp index 26084682dc9..ec89c5c1de2 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 05a332f65ec..9d84e7d95fa 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 80f20dadd88..4bfb7ba3a1d 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 4bac20d8190..52a26f49639 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"