aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-11-16 02:54:44 -0500
committerMike Frysinger <vapier@gentoo.org>2021-11-16 03:34:00 -0500
commit35818ade9668f04ac99a68b10855a3ae45afc4b5 (patch)
tree6932c93ea4266743c3ba0b62e1e4b33f433e40f9 /sim/testsuite
parent85588c9ab947a4edfeedc7c14bd202d15ccfbbff (diff)
downloadgdb-35818ade9668f04ac99a68b10855a3ae45afc4b5.zip
gdb-35818ade9668f04ac99a68b10855a3ae45afc4b5.tar.gz
gdb-35818ade9668f04ac99a68b10855a3ae45afc4b5.tar.bz2
sim: nrun: add --env-{set,unset,clear} command line options
Provide explicit control over the program's environment with the basic set/unset/clear options. These are a bit clunky to use, but they're functional. The env set operation is split out into a separate function as it'll be used in the next commit. With these in place, we can adjust the custom cris testsuite to use the now standard options and not its one-off hack.
Diffstat (limited to 'sim/testsuite')
-rw-r--r--sim/testsuite/cris/c/c.exp3
-rw-r--r--sim/testsuite/cris/c/readlink7.c5
-rw-r--r--sim/testsuite/cris/c/readlink8.c6
3 files changed, 5 insertions, 9 deletions
diff --git a/sim/testsuite/cris/c/c.exp b/sim/testsuite/cris/c/c.exp
index ec89c5c..506f68a 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(simenv) ""
set opts(kfail) ""
set opts(xfail) ""
set opts(target) ""
@@ -211,7 +210,7 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
}
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/readlink7.c b/sim/testsuite/cris/c/readlink7.c
index 9c2b3b7..52c0733 100644
--- a/sim/testsuite/cris/c/readlink7.c
+++ b/sim/testsuite/cris/c/readlink7.c
@@ -1,6 +1,5 @@
/* Check that rare readlink calls don't cause the simulator to abort.
#notarget: cris*-*-elf
-#simenv: env(-u\ PWD\ foo)=bar
- FIXME: Need to unset PWD, but right now I won't bother tweaking the
- generic parts of the testsuite machinery and instead abuse a flaw. */
+#sim: --env-unset PWD
+ */
#include "readlink2.c"
diff --git a/sim/testsuite/cris/c/readlink8.c b/sim/testsuite/cris/c/readlink8.c
index 55f6fe8..98319fb 100644
--- a/sim/testsuite/cris/c/readlink8.c
+++ b/sim/testsuite/cris/c/readlink8.c
@@ -1,8 +1,6 @@
/* Check that rare readlink calls don't cause the simulator to abort.
#notarget: cris*-*-elf
-#sim: --sysroot=@exedir@
-#simenv: env(-u\ PWD\ foo)=bar
- FIXME: Need to unset PWD, but right now I won't bother tweaking the
- generic parts of the testsuite machinery and instead abuse a flaw. */
+#sim: --sysroot=@exedir@ --env-unset PWD
+ */
#define SYSROOTED 1
#include "readlink2.c"