aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-11-11 00:29:41 -0500
committerMike Frysinger <vapier@gentoo.org>2021-11-26 20:06:55 -0500
commit1214c97666139d06fd1d1301af05844f7771f377 (patch)
tree820e41dfbd93c33a10e3f4f7ea1282a1fac618ef /sim/testsuite
parent264dcc17cc4d2252d58bda347dfd78c1b78517da (diff)
downloadgdb-1214c97666139d06fd1d1301af05844f7771f377.zip
gdb-1214c97666139d06fd1d1301af05844f7771f377.tar.gz
gdb-1214c97666139d06fd1d1301af05844f7771f377.tar.bz2
sim: testsuite: initial support for OS-specific tests
We usually test against the newlib/libgloss environment, but for a few ports that also support Linux apps, we want to test that logic too. A lot of the C code is written such that it works with either newlib/libgloss or glibc/linux toolchains, but we have some tests that end up being Linux-specific. Cris has been using the target tuple as a rough proxy for this (where cris*-*-elf is assumed to be newlib/libgloss, and everything else is glibc/linux), but that is a bit too rough, and it doesn't work in a multitarget build. So lets create a few stub files that we can do compile tests with to detect the different setups, and then let tests declare which one they require (if they require any at all).
Diffstat (limited to 'sim/testsuite')
-rw-r--r--sim/testsuite/cris/c/access1.c2
-rw-r--r--sim/testsuite/cris/c/badldso1.c2
-rw-r--r--sim/testsuite/cris/c/badldso2.c2
-rw-r--r--sim/testsuite/cris/c/badldso3.c2
-rw-r--r--sim/testsuite/cris/c/c.exp7
-rw-r--r--sim/testsuite/cris/c/clone1.c2
-rw-r--r--sim/testsuite/cris/c/clone2.c2
-rw-r--r--sim/testsuite/cris/c/clone3.c2
-rw-r--r--sim/testsuite/cris/c/clone4.c2
-rw-r--r--sim/testsuite/cris/c/clone5.c2
-rw-r--r--sim/testsuite/cris/c/clone6.c2
-rw-r--r--sim/testsuite/cris/c/ex1.c2
-rw-r--r--sim/testsuite/cris/c/exitg1.c2
-rw-r--r--sim/testsuite/cris/c/exitg2.c2
-rw-r--r--sim/testsuite/cris/c/fcntl1.c2
-rw-r--r--sim/testsuite/cris/c/fcntl2.c2
-rw-r--r--sim/testsuite/cris/c/ftruncate1.c2
-rw-r--r--sim/testsuite/cris/c/ftruncate2.c2
-rw-r--r--sim/testsuite/cris/c/getcwd1.c2
-rw-r--r--sim/testsuite/cris/c/hellodyn3.c2
-rw-r--r--sim/testsuite/cris/c/mmap1.c2
-rw-r--r--sim/testsuite/cris/c/mmap2.c2
-rw-r--r--sim/testsuite/cris/c/mmap3.c2
-rw-r--r--sim/testsuite/cris/c/mmap4.c2
-rw-r--r--sim/testsuite/cris/c/mmap5.c2
-rw-r--r--sim/testsuite/cris/c/mmap6.c2
-rw-r--r--sim/testsuite/cris/c/mmap7.c2
-rw-r--r--sim/testsuite/cris/c/mmap8.c2
-rw-r--r--sim/testsuite/cris/c/mprotect1.c2
-rw-r--r--sim/testsuite/cris/c/mprotect2.c2
-rw-r--r--sim/testsuite/cris/c/openpf5.c2
-rw-r--r--sim/testsuite/cris/c/pipe1.c2
-rw-r--r--sim/testsuite/cris/c/pipe2.c2
-rw-r--r--sim/testsuite/cris/c/pipe3.c2
-rw-r--r--sim/testsuite/cris/c/pipe4.c2
-rw-r--r--sim/testsuite/cris/c/pipe5.c2
-rw-r--r--sim/testsuite/cris/c/pipe6.c2
-rw-r--r--sim/testsuite/cris/c/pipe7.c2
-rw-r--r--sim/testsuite/cris/c/readlink1.c2
-rw-r--r--sim/testsuite/cris/c/readlink10.c2
-rw-r--r--sim/testsuite/cris/c/readlink11.c2
-rw-r--r--sim/testsuite/cris/c/readlink2.c2
-rw-r--r--sim/testsuite/cris/c/readlink3.c2
-rw-r--r--sim/testsuite/cris/c/readlink4.c2
-rw-r--r--sim/testsuite/cris/c/readlink5.c2
-rw-r--r--sim/testsuite/cris/c/readlink6.c2
-rw-r--r--sim/testsuite/cris/c/readlink7.c2
-rw-r--r--sim/testsuite/cris/c/readlink8.c2
-rw-r--r--sim/testsuite/cris/c/readlink9.c2
-rw-r--r--sim/testsuite/cris/c/rtsigprocmask1.c2
-rw-r--r--sim/testsuite/cris/c/rtsigprocmask2.c2
-rw-r--r--sim/testsuite/cris/c/rtsigsuspend1.c2
-rw-r--r--sim/testsuite/cris/c/rtsigsuspend2.c2
-rw-r--r--sim/testsuite/cris/c/sched1.c2
-rw-r--r--sim/testsuite/cris/c/sched2.c2
-rw-r--r--sim/testsuite/cris/c/sched3.c2
-rw-r--r--sim/testsuite/cris/c/sched4.c2
-rw-r--r--sim/testsuite/cris/c/sched5.c2
-rw-r--r--sim/testsuite/cris/c/sched6.c2
-rw-r--r--sim/testsuite/cris/c/sched7.c2
-rw-r--r--sim/testsuite/cris/c/sched8.c2
-rw-r--r--sim/testsuite/cris/c/sched9.c2
-rw-r--r--sim/testsuite/cris/c/setrlimit1.c2
-rw-r--r--sim/testsuite/cris/c/settls1.c2
-rw-r--r--sim/testsuite/cris/c/sig10.c2
-rw-r--r--sim/testsuite/cris/c/sig11.c2
-rw-r--r--sim/testsuite/cris/c/sig12.c2
-rw-r--r--sim/testsuite/cris/c/sig13.c2
-rw-r--r--sim/testsuite/cris/c/sig2.c2
-rw-r--r--sim/testsuite/cris/c/sig4.c2
-rw-r--r--sim/testsuite/cris/c/sig6.c2
-rw-r--r--sim/testsuite/cris/c/sig7.c2
-rw-r--r--sim/testsuite/cris/c/sig9.c2
-rw-r--r--sim/testsuite/cris/c/sigreturn1.c2
-rw-r--r--sim/testsuite/cris/c/sigreturn2.c2
-rw-r--r--sim/testsuite/cris/c/sigreturn3.c2
-rw-r--r--sim/testsuite/cris/c/sigreturn4.c2
-rw-r--r--sim/testsuite/cris/c/sock1.c2
-rw-r--r--sim/testsuite/cris/c/stat2.c2
-rw-r--r--sim/testsuite/cris/c/stat4.c2
-rw-r--r--sim/testsuite/cris/c/stat5.c2
-rw-r--r--sim/testsuite/cris/c/stat7.c2
-rw-r--r--sim/testsuite/cris/c/stat8.c2
-rw-r--r--sim/testsuite/cris/c/syscall1.c2
-rw-r--r--sim/testsuite/cris/c/syscall2.c2
-rw-r--r--sim/testsuite/cris/c/syscall3.c2
-rw-r--r--sim/testsuite/cris/c/syscall4.c2
-rw-r--r--sim/testsuite/cris/c/syscall5.c2
-rw-r--r--sim/testsuite/cris/c/syscall6.c2
-rw-r--r--sim/testsuite/cris/c/syscall7.c2
-rw-r--r--sim/testsuite/cris/c/syscall8.c2
-rw-r--r--sim/testsuite/cris/c/sysctl1.c2
-rw-r--r--sim/testsuite/cris/c/sysctl2.c2
-rw-r--r--sim/testsuite/cris/c/sysctl3.c2
-rw-r--r--sim/testsuite/cris/c/thread2.c2
-rw-r--r--sim/testsuite/cris/c/thread3.c2
-rw-r--r--sim/testsuite/cris/c/thread4.c2
-rw-r--r--sim/testsuite/cris/c/thread5.c2
-rw-r--r--sim/testsuite/cris/c/truncate1.c2
-rw-r--r--sim/testsuite/cris/c/truncate2.c2
-rw-r--r--sim/testsuite/cris/c/ugetrlimit1.c2
-rw-r--r--sim/testsuite/cris/c/uname1.c2
-rw-r--r--sim/testsuite/cris/c/writev1.c2
-rw-r--r--sim/testsuite/cris/c/writev2.c2
-rw-r--r--sim/testsuite/lib/linuxcheck.c9
-rw-r--r--sim/testsuite/lib/newlibcheck.c10
-rw-r--r--sim/testsuite/lib/sim-defs.exp33
107 files changed, 158 insertions, 107 deletions
diff --git a/sim/testsuite/cris/c/access1.c b/sim/testsuite/cris/c/access1.c
index ba9be34..10a47ea 100644
--- a/sim/testsuite/cris/c/access1.c
+++ b/sim/testsuite/cris/c/access1.c
@@ -1,5 +1,5 @@
/* Check access(2) trivially. Newlib doesn't have it.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <unistd.h>
#include <stdio.h>
diff --git a/sim/testsuite/cris/c/badldso1.c b/sim/testsuite/cris/c/badldso1.c
index 70414b5..fbd320c 100644
--- a/sim/testsuite/cris/c/badldso1.c
+++ b/sim/testsuite/cris/c/badldso1.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
#xerror:
#output: *: could not load ELF interpreter `*' for program `*'\n
*/
diff --git a/sim/testsuite/cris/c/badldso2.c b/sim/testsuite/cris/c/badldso2.c
index 92efc13..2f58bff 100644
--- a/sim/testsuite/cris/c/badldso2.c
+++ b/sim/testsuite/cris/c/badldso2.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
#xerror:
#cc: additional_flags=-Wl,-dynamic-linker,/dev/null
#output: *: could not load ELF interpreter `*' for program `*'\n
diff --git a/sim/testsuite/cris/c/badldso3.c b/sim/testsuite/cris/c/badldso3.c
index f827e77..7039ad4 100644
--- a/sim/testsuite/cris/c/badldso3.c
+++ b/sim/testsuite/cris/c/badldso3.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
#xerror:
#cc: additional_flags=-Wl,-dynamic-linker,/compilercheck.x
#sim: --sysroot=$pwd
diff --git a/sim/testsuite/cris/c/c.exp b/sim/testsuite/cris/c/c.exp
index dfafa00..e432594 100644
--- a/sim/testsuite/cris/c/c.exp
+++ b/sim/testsuite/cris/c/c.exp
@@ -34,6 +34,7 @@ if [istarget cris*-*-elf] {
# Using target_compile, since it is less noisy,
global global_cc_works
+global global_cc_os
if { $global_cc_works == 1 } {
# Now check if we can link a program dynamically, and where
# libc.so is located. If it is, we provide a sym link to the
@@ -103,6 +104,7 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
set opts(sim) ""
set opts(output) ""
set opts(progoptions) ""
+ set opts(progos) ""
set opts(timeout) ""
set opts(mach) ""
set opts(xerror) "no"
@@ -164,6 +166,11 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
continue
}
+ if { $opts(progos) != "" && $opts(progos) != $global_cc_os } {
+ untested $testname
+ continue
+ }
+
# If no machine specific options, default to the general version.
if ![info exists opts(sim,$mach)] {
set opts(sim,$mach) $opts(sim)
diff --git a/sim/testsuite/cris/c/clone1.c b/sim/testsuite/cris/c/clone1.c
index 163b186..9c4cca4 100644
--- a/sim/testsuite/cris/c/clone1.c
+++ b/sim/testsuite/cris/c/clone1.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
#output: got: a\nthen: bc\nexit: 0\n
*/
diff --git a/sim/testsuite/cris/c/clone2.c b/sim/testsuite/cris/c/clone2.c
index aaa0873..88a984f 100644
--- a/sim/testsuite/cris/c/clone2.c
+++ b/sim/testsuite/cris/c/clone2.c
@@ -1,5 +1,5 @@
/* Make sure the thread system trivially works with trace output.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --cris-trace=basic --trace-file=$pwd/clone2.tmp
#output: got: a\nthen: bc\nexit: 0\n
*/
diff --git a/sim/testsuite/cris/c/clone3.c b/sim/testsuite/cris/c/clone3.c
index 0a97484..6c5b881 100644
--- a/sim/testsuite/cris/c/clone3.c
+++ b/sim/testsuite/cris/c/clone3.c
@@ -1,5 +1,5 @@
/* Check that exiting from a parent thread does not kill the child.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <stddef.h>
diff --git a/sim/testsuite/cris/c/clone4.c b/sim/testsuite/cris/c/clone4.c
index 81489dd..c2e684c 100644
--- a/sim/testsuite/cris/c/clone4.c
+++ b/sim/testsuite/cris/c/clone4.c
@@ -1,5 +1,5 @@
/* Check that TRT happens when we reach the #threads implementation limit.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <stddef.h>
diff --git a/sim/testsuite/cris/c/clone5.c b/sim/testsuite/cris/c/clone5.c
index 9380a1e..5cd1644 100644
--- a/sim/testsuite/cris/c/clone5.c
+++ b/sim/testsuite/cris/c/clone5.c
@@ -1,5 +1,5 @@
/* Check that unimplemented clone syscalls get the right treatment.
-#notarget: cris*-*-elf
+#progos: linux
#xerror:
#output: Unimplemented clone syscall *
#output: program stopped with signal 4 (*).\n
diff --git a/sim/testsuite/cris/c/clone6.c b/sim/testsuite/cris/c/clone6.c
index 586b5c6..9ecd489 100644
--- a/sim/testsuite/cris/c/clone6.c
+++ b/sim/testsuite/cris/c/clone6.c
@@ -1,5 +1,5 @@
/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --cris-unknown-syscall=enosys-quiet
#output: ENOSYS\n
#output: xyzzy\n
diff --git a/sim/testsuite/cris/c/ex1.c b/sim/testsuite/cris/c/ex1.c
index 2447319..ea239c2 100644
--- a/sim/testsuite/cris/c/ex1.c
+++ b/sim/testsuite/cris/c/ex1.c
@@ -1,5 +1,5 @@
/* Compiler options:
-#notarget: cris*-*-elf
+#progos: linux
#cc: additional_flags=-pthread
#output: Starting process a\naaaaaaaaStarting process b\nababbbbbbbbb
diff --git a/sim/testsuite/cris/c/exitg1.c b/sim/testsuite/cris/c/exitg1.c
index 0b4c425..acaad92 100644
--- a/sim/testsuite/cris/c/exitg1.c
+++ b/sim/testsuite/cris/c/exitg1.c
@@ -1,7 +1,7 @@
/* Check exit_group(2) trivially. Newlib doesn't have it and the
pre-v32 glibc requires updated headers we'd have to check or adjust
for.
-#notarget: cris-*-* *-*-elf
+#progos: linux
#output: exit_group\n
*/
#include <unistd.h>
diff --git a/sim/testsuite/cris/c/exitg2.c b/sim/testsuite/cris/c/exitg2.c
index e222cc4..e5b0be7 100644
--- a/sim/testsuite/cris/c/exitg2.c
+++ b/sim/testsuite/cris/c/exitg2.c
@@ -1,5 +1,5 @@
/* Check exit_group(2) trivially with non-zero status.
-#notarget: cris-*-* *-*-elf
+#progos: linux
#output: exit_group\n
#xerror:
*/
diff --git a/sim/testsuite/cris/c/fcntl1.c b/sim/testsuite/cris/c/fcntl1.c
index 032f6b5..7c05018 100644
--- a/sim/testsuite/cris/c/fcntl1.c
+++ b/sim/testsuite/cris/c/fcntl1.c
@@ -1,5 +1,5 @@
/* Check that we get the expected message for unsupported fcntl calls.
-#notarget: cris*-*-elf
+#progos: linux
#xerror:
#output: Unimplemented fcntl*
#output: program stopped with signal 4 (*).\n
diff --git a/sim/testsuite/cris/c/fcntl2.c b/sim/testsuite/cris/c/fcntl2.c
index fc9f95b..5298e7a 100644
--- a/sim/testsuite/cris/c/fcntl2.c
+++ b/sim/testsuite/cris/c/fcntl2.c
@@ -1,5 +1,5 @@
/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --cris-unknown-syscall=enosys-quiet
#output: ENOSYS\n
#output: xyzzy\n
diff --git a/sim/testsuite/cris/c/ftruncate1.c b/sim/testsuite/cris/c/ftruncate1.c
index 46b8756..cc213b8 100644
--- a/sim/testsuite/cris/c/ftruncate1.c
+++ b/sim/testsuite/cris/c/ftruncate1.c
@@ -1,5 +1,5 @@
/* Check that the ftruncate syscall works trivially.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <stdio.h>
diff --git a/sim/testsuite/cris/c/ftruncate2.c b/sim/testsuite/cris/c/ftruncate2.c
index f1ef18c..712c185 100644
--- a/sim/testsuite/cris/c/ftruncate2.c
+++ b/sim/testsuite/cris/c/ftruncate2.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
/* Check that we get a proper error indication if trying ftruncate on a
diff --git a/sim/testsuite/cris/c/getcwd1.c b/sim/testsuite/cris/c/getcwd1.c
index 3838916..f7b6bd9 100644
--- a/sim/testsuite/cris/c/getcwd1.c
+++ b/sim/testsuite/cris/c/getcwd1.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <unistd.h>
diff --git a/sim/testsuite/cris/c/hellodyn3.c b/sim/testsuite/cris/c/hellodyn3.c
index 4dd8bdd..ff3ca70 100644
--- a/sim/testsuite/cris/c/hellodyn3.c
+++ b/sim/testsuite/cris/c/hellodyn3.c
@@ -2,7 +2,7 @@
works. Jump through a few hoops to avoid reading the host
ld.so.cache (having no absolute path specified for the executable
falls back on loading through the same mechanisms as a DSO).
-#notarget: *-*-elf
+#progos: linux
#sim: --sysroot=$pwd $pwd/lib/ld.so.1 --library-path /
*/
#include "hello.c"
diff --git a/sim/testsuite/cris/c/mmap1.c b/sim/testsuite/cris/c/mmap1.c
index 9db94c1..0bb0ea5 100644
--- a/sim/testsuite/cris/c/mmap1.c
+++ b/sim/testsuite/cris/c/mmap1.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#define _GNU_SOURCE
diff --git a/sim/testsuite/cris/c/mmap2.c b/sim/testsuite/cris/c/mmap2.c
index 35139a0..7c99e4e 100644
--- a/sim/testsuite/cris/c/mmap2.c
+++ b/sim/testsuite/cris/c/mmap2.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#define _GNU_SOURCE
diff --git a/sim/testsuite/cris/c/mmap3.c b/sim/testsuite/cris/c/mmap3.c
index 34401fa..3667644 100644
--- a/sim/testsuite/cris/c/mmap3.c
+++ b/sim/testsuite/cris/c/mmap3.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#define _GNU_SOURCE
diff --git a/sim/testsuite/cris/c/mmap4.c b/sim/testsuite/cris/c/mmap4.c
index b3a66e4..551cdb1 100644
--- a/sim/testsuite/cris/c/mmap4.c
+++ b/sim/testsuite/cris/c/mmap4.c
@@ -1,5 +1,5 @@
/* Just check that MAP_DENYWRITE is "honored" (ignored).
-#notarget: cris*-*-elf
+#progos: linux
*/
#define MMAP_FLAGS (MAP_PRIVATE|MAP_DENYWRITE)
#include "mmap1.c"
diff --git a/sim/testsuite/cris/c/mmap5.c b/sim/testsuite/cris/c/mmap5.c
index 95f00c3..a10fdc2 100644
--- a/sim/testsuite/cris/c/mmap5.c
+++ b/sim/testsuite/cris/c/mmap5.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#define _GNU_SOURCE
diff --git a/sim/testsuite/cris/c/mmap6.c b/sim/testsuite/cris/c/mmap6.c
index 929d9cc..29f70f5 100644
--- a/sim/testsuite/cris/c/mmap6.c
+++ b/sim/testsuite/cris/c/mmap6.c
@@ -1,6 +1,6 @@
/* Check that mmapping specifying a previously mmapped address without
MAP_FIXED works; that we just don't get the same address.
-#notarget: cris*-*-elf
+#progos: linux
*/
#define NO_MUNMAP
#define MMAP_FLAGS2 MAP_PRIVATE
diff --git a/sim/testsuite/cris/c/mmap7.c b/sim/testsuite/cris/c/mmap7.c
index c4b14b0..d7a7f3b 100644
--- a/sim/testsuite/cris/c/mmap7.c
+++ b/sim/testsuite/cris/c/mmap7.c
@@ -1,7 +1,7 @@
/* Check that mmapping a page-aligned size, larger than the file,
works.
-#notarget: cris*-*-elf
+#progos: linux
*/
/* Make sure we get an address where the size fits. */
diff --git a/sim/testsuite/cris/c/mmap8.c b/sim/testsuite/cris/c/mmap8.c
index 0564c79..b81d9c0 100644
--- a/sim/testsuite/cris/c/mmap8.c
+++ b/sim/testsuite/cris/c/mmap8.c
@@ -1,6 +1,6 @@
/* Check that mmapping 0 using MAP_FIXED works, both with/without
there being previously mmapped contents.
-#notarget: cris*-*-elf
+#progos: linux
*/
#define MMAP_FLAGS1 MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED
#define NO_MUNMAP
diff --git a/sim/testsuite/cris/c/mprotect1.c b/sim/testsuite/cris/c/mprotect1.c
index 8dae50b..1afbd96 100644
--- a/sim/testsuite/cris/c/mprotect1.c
+++ b/sim/testsuite/cris/c/mprotect1.c
@@ -1,5 +1,5 @@
/* Check unimplemented-output for mprotect call.
-#notarget: cris*-*-elf
+#progos: linux
#xerror:
#output: Unimplemented mprotect call (0x0, 0x2001, 0x4)\n
#output: program stopped with signal 4 (*).\n
diff --git a/sim/testsuite/cris/c/mprotect2.c b/sim/testsuite/cris/c/mprotect2.c
index 4d83945..ba8a3da 100644
--- a/sim/testsuite/cris/c/mprotect2.c
+++ b/sim/testsuite/cris/c/mprotect2.c
@@ -1,5 +1,5 @@
/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --cris-unknown-syscall=enosys-quiet
#output: ENOSYS\n
#output: xyzzy\n
diff --git a/sim/testsuite/cris/c/openpf5.c b/sim/testsuite/cris/c/openpf5.c
index 90bebe5..9fa80a9 100644
--- a/sim/testsuite/cris/c/openpf5.c
+++ b/sim/testsuite/cris/c/openpf5.c
@@ -1,5 +1,5 @@
/* Check that TRT happens when error on too many opened files.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --sysroot=$pwd
*/
#include <stddef.h>
diff --git a/sim/testsuite/cris/c/pipe1.c b/sim/testsuite/cris/c/pipe1.c
index 735974b..21b1776 100644
--- a/sim/testsuite/cris/c/pipe1.c
+++ b/sim/testsuite/cris/c/pipe1.c
@@ -1,5 +1,5 @@
/* Check for proper pipe semantics at corner cases.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <stddef.h>
diff --git a/sim/testsuite/cris/c/pipe2.c b/sim/testsuite/cris/c/pipe2.c
index 18ccf38..7f3de61 100644
--- a/sim/testsuite/cris/c/pipe2.c
+++ b/sim/testsuite/cris/c/pipe2.c
@@ -1,5 +1,5 @@
/* Check that closing a pipe with a nonempty buffer works.
-#notarget: cris*-*-elf
+#progos: linux
#output: got: a\ngot: b\nexit: 0\n
*/
diff --git a/sim/testsuite/cris/c/pipe3.c b/sim/testsuite/cris/c/pipe3.c
index bf08a38..467b5ca 100644
--- a/sim/testsuite/cris/c/pipe3.c
+++ b/sim/testsuite/cris/c/pipe3.c
@@ -1,5 +1,5 @@
/* Check that TRT happens when error on pipe call.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <stddef.h>
diff --git a/sim/testsuite/cris/c/pipe4.c b/sim/testsuite/cris/c/pipe4.c
index 1cb309f..842e2fe7 100644
--- a/sim/testsuite/cris/c/pipe4.c
+++ b/sim/testsuite/cris/c/pipe4.c
@@ -1,5 +1,5 @@
/* Check that TRT happens for pipe corner cases.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <stddef.h>
#include <signal.h>
diff --git a/sim/testsuite/cris/c/pipe5.c b/sim/testsuite/cris/c/pipe5.c
index 2b4d763..440cdbc 100644
--- a/sim/testsuite/cris/c/pipe5.c
+++ b/sim/testsuite/cris/c/pipe5.c
@@ -1,5 +1,5 @@
/* Check that TRT happens for pipe corner cases (for our definition of TRT).
-#notarget: cris*-*-elf
+#progos: linux
#xerror:
#output: Terminating simulation due to writing pipe * from one single thread\n
#output: program stopped with signal 4 (*).\n
diff --git a/sim/testsuite/cris/c/pipe6.c b/sim/testsuite/cris/c/pipe6.c
index a8830cc..cbfb313 100644
--- a/sim/testsuite/cris/c/pipe6.c
+++ b/sim/testsuite/cris/c/pipe6.c
@@ -1,5 +1,5 @@
/* Check that writing an inordinate amount of data works (somewhat).
-#notarget: cris*-*-elf
+#progos: linux
#output: got: a\nexit: 0\n
This test-case will *not* work on host (or for real): the first
pipemax+1 bytes will be successfully written. It's just for
diff --git a/sim/testsuite/cris/c/pipe7.c b/sim/testsuite/cris/c/pipe7.c
index 552ddb8..5125138e 100644
--- a/sim/testsuite/cris/c/pipe7.c
+++ b/sim/testsuite/cris/c/pipe7.c
@@ -1,5 +1,5 @@
/* Check for proper pipe semantics at corner cases.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <stdio.h>
diff --git a/sim/testsuite/cris/c/readlink1.c b/sim/testsuite/cris/c/readlink1.c
index 1898e8e..5bec2d5 100644
--- a/sim/testsuite/cris/c/readlink1.c
+++ b/sim/testsuite/cris/c/readlink1.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <unistd.h>
diff --git a/sim/testsuite/cris/c/readlink10.c b/sim/testsuite/cris/c/readlink10.c
index 2174408..f4705df 100644
--- a/sim/testsuite/cris/c/readlink10.c
+++ b/sim/testsuite/cris/c/readlink10.c
@@ -1,5 +1,5 @@
/* Check that odd cases of readlink work.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <unistd.h>
diff --git a/sim/testsuite/cris/c/readlink11.c b/sim/testsuite/cris/c/readlink11.c
index 9d84e7d..d082d22 100644
--- a/sim/testsuite/cris/c/readlink11.c
+++ b/sim/testsuite/cris/c/readlink11.c
@@ -1,5 +1,5 @@
/* As readlink5.c (sic), but specifying silent ENOSYS.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --cris-unknown-syscall=enosys-quiet --argv0 ./readlink11.c.x
#output: ENOSYS\n
#output: xyzzy\n
diff --git a/sim/testsuite/cris/c/readlink2.c b/sim/testsuite/cris/c/readlink2.c
index e5e9d94..235817f 100644
--- a/sim/testsuite/cris/c/readlink2.c
+++ b/sim/testsuite/cris/c/readlink2.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <unistd.h>
diff --git a/sim/testsuite/cris/c/readlink3.c b/sim/testsuite/cris/c/readlink3.c
index d728087..2a4e075 100644
--- a/sim/testsuite/cris/c/readlink3.c
+++ b/sim/testsuite/cris/c/readlink3.c
@@ -1,5 +1,5 @@
/* Simulator options:
-#notarget: cris*-*-elf
+#progos: linux
#sim: --sysroot=$pwd
*/
#define SYSROOTED 1
diff --git a/sim/testsuite/cris/c/readlink4.c b/sim/testsuite/cris/c/readlink4.c
index 028f3ee..66cfca5 100644
--- a/sim/testsuite/cris/c/readlink4.c
+++ b/sim/testsuite/cris/c/readlink4.c
@@ -1,5 +1,5 @@
/* Check for corner case: readlink of too-long name.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <unistd.h>
diff --git a/sim/testsuite/cris/c/readlink5.c b/sim/testsuite/cris/c/readlink5.c
index 4bfb7ba..b0b56ab 100644
--- a/sim/testsuite/cris/c/readlink5.c
+++ b/sim/testsuite/cris/c/readlink5.c
@@ -1,5 +1,5 @@
/* Check that unsupported readlink calls don't cause the simulator to abort.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --argv0 ./readlink5.c.x
#xerror:
#output: Unimplemented readlink syscall (*)\n
diff --git a/sim/testsuite/cris/c/readlink6.c b/sim/testsuite/cris/c/readlink6.c
index d64b959..67868af 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
+#progos: linux
#sim: --argv0 $pwd/readlink6.c.x
*/
#include "readlink2.c"
diff --git a/sim/testsuite/cris/c/readlink7.c b/sim/testsuite/cris/c/readlink7.c
index 52c0733..d15f59d 100644
--- a/sim/testsuite/cris/c/readlink7.c
+++ b/sim/testsuite/cris/c/readlink7.c
@@ -1,5 +1,5 @@
/* Check that rare readlink calls don't cause the simulator to abort.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --env-unset PWD
*/
#include "readlink2.c"
diff --git a/sim/testsuite/cris/c/readlink8.c b/sim/testsuite/cris/c/readlink8.c
index ddc424e..9465592 100644
--- a/sim/testsuite/cris/c/readlink8.c
+++ b/sim/testsuite/cris/c/readlink8.c
@@ -1,5 +1,5 @@
/* Check that rare readlink calls don't cause the simulator to abort.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --sysroot=$pwd --env-unset PWD
*/
#define SYSROOTED 1
diff --git a/sim/testsuite/cris/c/readlink9.c b/sim/testsuite/cris/c/readlink9.c
index 7316b7a..ce5d446 100644
--- a/sim/testsuite/cris/c/readlink9.c
+++ b/sim/testsuite/cris/c/readlink9.c
@@ -1,5 +1,5 @@
/* Check that odd cases of readlink work.
-#notarget: cris*-*-elf
+#progos: linux
#cc: additional_flags=-DX="$pwd"
*/
diff --git a/sim/testsuite/cris/c/rtsigprocmask1.c b/sim/testsuite/cris/c/rtsigprocmask1.c
index b76c338..a47b377 100644
--- a/sim/testsuite/cris/c/rtsigprocmask1.c
+++ b/sim/testsuite/cris/c/rtsigprocmask1.c
@@ -1,5 +1,5 @@
/* Compiler options:
-#notarget: cris*-*-elf
+#progos: linux
#cc: additional_flags=-pthread
#xerror:
#output: Unimplemented rt_sigprocmask syscall (0x3, 0x0, 0x3dff*\n
diff --git a/sim/testsuite/cris/c/rtsigprocmask2.c b/sim/testsuite/cris/c/rtsigprocmask2.c
index 5026908..4ae2be6 100644
--- a/sim/testsuite/cris/c/rtsigprocmask2.c
+++ b/sim/testsuite/cris/c/rtsigprocmask2.c
@@ -1,5 +1,5 @@
/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
+#progos: linux
#cc: additional_flags=-pthread
#sim: --cris-unknown-syscall=enosys-quiet
#output: ENOSYS\n
diff --git a/sim/testsuite/cris/c/rtsigsuspend1.c b/sim/testsuite/cris/c/rtsigsuspend1.c
index 66ca795..04139a8 100644
--- a/sim/testsuite/cris/c/rtsigsuspend1.c
+++ b/sim/testsuite/cris/c/rtsigsuspend1.c
@@ -1,5 +1,5 @@
/* Test that TRT happens for invalid rt_sigsuspend calls. Single-thread.
-#notarget: cris*-*-elf
+#progos: linux
#xerror:
#output: Unimplemented rt_sigsuspend syscall arguments (0x1, 0x2)\n
#output: program stopped with signal 4 (*).\n
diff --git a/sim/testsuite/cris/c/rtsigsuspend2.c b/sim/testsuite/cris/c/rtsigsuspend2.c
index 9ce165d..4f32cca 100644
--- a/sim/testsuite/cris/c/rtsigsuspend2.c
+++ b/sim/testsuite/cris/c/rtsigsuspend2.c
@@ -1,5 +1,5 @@
/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --cris-unknown-syscall=enosys-quiet
#output: ENOSYS\n
#output: xyzzy\n
diff --git a/sim/testsuite/cris/c/sched1.c b/sim/testsuite/cris/c/sched1.c
index 1b778f4..0a461b2 100644
--- a/sim/testsuite/cris/c/sched1.c
+++ b/sim/testsuite/cris/c/sched1.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <sched.h>
diff --git a/sim/testsuite/cris/c/sched2.c b/sim/testsuite/cris/c/sched2.c
index f40a19a..fbde1e1 100644
--- a/sim/testsuite/cris/c/sched2.c
+++ b/sim/testsuite/cris/c/sched2.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <sched.h>
diff --git a/sim/testsuite/cris/c/sched3.c b/sim/testsuite/cris/c/sched3.c
index 2909a4b..94051e9 100644
--- a/sim/testsuite/cris/c/sched3.c
+++ b/sim/testsuite/cris/c/sched3.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <sched.h>
diff --git a/sim/testsuite/cris/c/sched4.c b/sim/testsuite/cris/c/sched4.c
index df372f2..7821cf0 100644
--- a/sim/testsuite/cris/c/sched4.c
+++ b/sim/testsuite/cris/c/sched4.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <sched.h>
diff --git a/sim/testsuite/cris/c/sched5.c b/sim/testsuite/cris/c/sched5.c
index ddfe14d..87468d0 100644
--- a/sim/testsuite/cris/c/sched5.c
+++ b/sim/testsuite/cris/c/sched5.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <sched.h>
diff --git a/sim/testsuite/cris/c/sched6.c b/sim/testsuite/cris/c/sched6.c
index d5adedc..26deb21 100644
--- a/sim/testsuite/cris/c/sched6.c
+++ b/sim/testsuite/cris/c/sched6.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <sched.h>
diff --git a/sim/testsuite/cris/c/sched7.c b/sim/testsuite/cris/c/sched7.c
index 35d006b..c047461 100644
--- a/sim/testsuite/cris/c/sched7.c
+++ b/sim/testsuite/cris/c/sched7.c
@@ -1,5 +1,5 @@
/* Check corner error case: specifying invalid PID.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <sched.h>
diff --git a/sim/testsuite/cris/c/sched8.c b/sim/testsuite/cris/c/sched8.c
index cd3e06e..b0d3c82 100644
--- a/sim/testsuite/cris/c/sched8.c
+++ b/sim/testsuite/cris/c/sched8.c
@@ -1,5 +1,5 @@
/* Check corner error case: specifying invalid PID.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <string.h>
#include <sched.h>
diff --git a/sim/testsuite/cris/c/sched9.c b/sim/testsuite/cris/c/sched9.c
index 8499e43..c9647b6 100644
--- a/sim/testsuite/cris/c/sched9.c
+++ b/sim/testsuite/cris/c/sched9.c
@@ -1,5 +1,5 @@
/* Check corner error case: specifying invalid scheduling policy.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <sched.h>
diff --git a/sim/testsuite/cris/c/setrlimit1.c b/sim/testsuite/cris/c/setrlimit1.c
index 747f16c..1222619 100644
--- a/sim/testsuite/cris/c/setrlimit1.c
+++ b/sim/testsuite/cris/c/setrlimit1.c
@@ -1,5 +1,5 @@
/* Check corner error case: specifying unimplemented resource.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <sys/time.h>
#include <sys/resource.h>
diff --git a/sim/testsuite/cris/c/settls1.c b/sim/testsuite/cris/c/settls1.c
index bd55aa1..c6f84c5 100644
--- a/sim/testsuite/cris/c/settls1.c
+++ b/sim/testsuite/cris/c/settls1.c
@@ -1,5 +1,5 @@
/* Check that the syscall set_thread_area is supported and does the right thing.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <unistd.h>
diff --git a/sim/testsuite/cris/c/sig10.c b/sim/testsuite/cris/c/sig10.c
index ef54832..7ae4609 100644
--- a/sim/testsuite/cris/c/sig10.c
+++ b/sim/testsuite/cris/c/sig10.c
@@ -1,5 +1,5 @@
/* Check that TRT happens when trying to IGN an non-ignorable signal, more than one thread.
-#notarget: cris*-*-elf
+#progos: linux
#cc: additional_flags=-pthread
#xerror:
#output: Exiting pid 42 due to signal 9\n
diff --git a/sim/testsuite/cris/c/sig11.c b/sim/testsuite/cris/c/sig11.c
index 9c8aad7..69dc278 100644
--- a/sim/testsuite/cris/c/sig11.c
+++ b/sim/testsuite/cris/c/sig11.c
@@ -1,5 +1,5 @@
/* Check that TRT happens when getting a non-standard (realtime) signal, more than one thread.
-#notarget: cris*-*-elf
+#progos: linux
#cc: additional_flags=-pthread
#xerror:
#output: Unimplemented signal: 77\n
diff --git a/sim/testsuite/cris/c/sig12.c b/sim/testsuite/cris/c/sig12.c
index 5a2e65f..7131cbc 100644
--- a/sim/testsuite/cris/c/sig12.c
+++ b/sim/testsuite/cris/c/sig12.c
@@ -1,6 +1,6 @@
/* Check that TRT happens for a signal sent to a non-existent process/thread, more than one thread.
#cc: additional_flags=-pthread
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <stdlib.h>
diff --git a/sim/testsuite/cris/c/sig13.c b/sim/testsuite/cris/c/sig13.c
index 4d71752..2558f67 100644
--- a/sim/testsuite/cris/c/sig13.c
+++ b/sim/testsuite/cris/c/sig13.c
@@ -1,5 +1,5 @@
/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --cris-unknown-syscall=enosys-quiet
#output: ENOSYS\n
#output: xyzzy\n
diff --git a/sim/testsuite/cris/c/sig2.c b/sim/testsuite/cris/c/sig2.c
index 65596ef..35b2802 100644
--- a/sim/testsuite/cris/c/sig2.c
+++ b/sim/testsuite/cris/c/sig2.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <stdio.h>
diff --git a/sim/testsuite/cris/c/sig4.c b/sim/testsuite/cris/c/sig4.c
index 57491f8..e932b08 100644
--- a/sim/testsuite/cris/c/sig4.c
+++ b/sim/testsuite/cris/c/sig4.c
@@ -1,5 +1,5 @@
/* Check that TRT happens at an abort (3) call, more than one thread.
-#notarget: cris*-*-elf
+#progos: linux
#cc: additional_flags=-pthread
#xerror:
#output: Exiting pid 42 due to signal 6\n
diff --git a/sim/testsuite/cris/c/sig6.c b/sim/testsuite/cris/c/sig6.c
index a1f5720..f8c8f80 100644
--- a/sim/testsuite/cris/c/sig6.c
+++ b/sim/testsuite/cris/c/sig6.c
@@ -1,5 +1,5 @@
/* Check that TRT happens at an non-abort non-caught signal, more than one thread.
-#notarget: cris*-*-elf
+#progos: linux
#cc: additional_flags=-pthread
#xerror:
#output: Exiting pid 42 due to signal 7\n
diff --git a/sim/testsuite/cris/c/sig7.c b/sim/testsuite/cris/c/sig7.c
index b04f7c8..b939fb8 100644
--- a/sim/testsuite/cris/c/sig7.c
+++ b/sim/testsuite/cris/c/sig7.c
@@ -1,5 +1,5 @@
/* Check unsupported case of sigaction syscall.
-#notarget: cris*-*-elf
+#progos: linux
#xerror:
#output: Unimplemented rt_sigaction syscall (0x8, 0x3df*\n
#output: program stopped with signal 4 (*).\n
diff --git a/sim/testsuite/cris/c/sig9.c b/sim/testsuite/cris/c/sig9.c
index c86681b..8e972fa 100644
--- a/sim/testsuite/cris/c/sig9.c
+++ b/sim/testsuite/cris/c/sig9.c
@@ -1,5 +1,5 @@
/* Check that TRT happens at an non-abort ignored signal, more than one thread.
-#notarget: cris*-*-elf
+#progos: linux
#cc: additional_flags=-pthread
*/
diff --git a/sim/testsuite/cris/c/sigreturn1.c b/sim/testsuite/cris/c/sigreturn1.c
index 40fc852..af23965 100644
--- a/sim/testsuite/cris/c/sigreturn1.c
+++ b/sim/testsuite/cris/c/sigreturn1.c
@@ -1,5 +1,5 @@
/* Test that TRT happens for spurious sigreturn calls. Single-thread.
-#notarget: cris*-*-elf
+#progos: linux
#xerror:
#output: Invalid sigreturn syscall: no signal handler active (0x1, 0x2, 0x3, 0x4, 0x5, 0x6)\n
#output: program stopped with signal 4 (*).\n
diff --git a/sim/testsuite/cris/c/sigreturn2.c b/sim/testsuite/cris/c/sigreturn2.c
index 3848b5f..a86ca25 100644
--- a/sim/testsuite/cris/c/sigreturn2.c
+++ b/sim/testsuite/cris/c/sigreturn2.c
@@ -1,5 +1,5 @@
/* Check that TRT happens for spurious sigreturn calls. Multiple threads.
-#notarget: cris*-*-elf
+#progos: linux
#cc: additional_flags=-pthread
#xerror:
#output: Invalid sigreturn syscall: no signal handler active (0x1, 0x2, 0x3, 0x4, 0x5, 0x6)\n
diff --git a/sim/testsuite/cris/c/sigreturn3.c b/sim/testsuite/cris/c/sigreturn3.c
index f5ed90f..c2b149e 100644
--- a/sim/testsuite/cris/c/sigreturn3.c
+++ b/sim/testsuite/cris/c/sigreturn3.c
@@ -1,5 +1,5 @@
/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --cris-unknown-syscall=enosys-quiet
#output: ENOSYS\n
#output: xyzzy\n
diff --git a/sim/testsuite/cris/c/sigreturn4.c b/sim/testsuite/cris/c/sigreturn4.c
index 456e312..041970a 100644
--- a/sim/testsuite/cris/c/sigreturn4.c
+++ b/sim/testsuite/cris/c/sigreturn4.c
@@ -1,5 +1,5 @@
/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
+#progos: linux
#cc: additional_flags=-pthread
#sim: --cris-unknown-syscall=enosys-quiet
#output: ENOSYS\n
diff --git a/sim/testsuite/cris/c/sock1.c b/sim/testsuite/cris/c/sock1.c
index e59f673..8d06bfa 100644
--- a/sim/testsuite/cris/c/sock1.c
+++ b/sim/testsuite/cris/c/sock1.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <sys/types.h>
diff --git a/sim/testsuite/cris/c/stat2.c b/sim/testsuite/cris/c/stat2.c
index 78c5c44..3ade5d2 100644
--- a/sim/testsuite/cris/c/stat2.c
+++ b/sim/testsuite/cris/c/stat2.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <sys/types.h>
diff --git a/sim/testsuite/cris/c/stat4.c b/sim/testsuite/cris/c/stat4.c
index e524ac8..3606bcc 100644
--- a/sim/testsuite/cris/c/stat4.c
+++ b/sim/testsuite/cris/c/stat4.c
@@ -1,5 +1,5 @@
/* Simulator options:
-#notarget: cris*-*-elf
+#progos: linux
#sim: --sysroot=$pwd
*/
diff --git a/sim/testsuite/cris/c/stat5.c b/sim/testsuite/cris/c/stat5.c
index 41ab493..fe9fbc0 100644
--- a/sim/testsuite/cris/c/stat5.c
+++ b/sim/testsuite/cris/c/stat5.c
@@ -1,5 +1,5 @@
/* Check that lstat:ing an nonexistent file works as expected.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <sys/types.h>
diff --git a/sim/testsuite/cris/c/stat7.c b/sim/testsuite/cris/c/stat7.c
index cbd5282..d61bd8e 100644
--- a/sim/testsuite/cris/c/stat7.c
+++ b/sim/testsuite/cris/c/stat7.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <sys/types.h>
diff --git a/sim/testsuite/cris/c/stat8.c b/sim/testsuite/cris/c/stat8.c
index c7eb49f..1778b3e 100644
--- a/sim/testsuite/cris/c/stat8.c
+++ b/sim/testsuite/cris/c/stat8.c
@@ -1,6 +1,6 @@
/* For this test, we need to do the lstat syscall directly, or else
glibc gets a SEGV.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <unistd.h>
diff --git a/sim/testsuite/cris/c/syscall1.c b/sim/testsuite/cris/c/syscall1.c
index 84aacb6..be6eb27 100644
--- a/sim/testsuite/cris/c/syscall1.c
+++ b/sim/testsuite/cris/c/syscall1.c
@@ -1,5 +1,5 @@
/* Test unknown-syscall output.
-#notarget: cris*-*-elf
+#progos: linux
#xerror:
#output: Unimplemented syscall: 166 (0x1, 0x2, 0x3, 0x4, 0x5, 0x6)\n
#output: program stopped with signal 4 (*).\n
diff --git a/sim/testsuite/cris/c/syscall2.c b/sim/testsuite/cris/c/syscall2.c
index b4dbead..d2b5a62 100644
--- a/sim/testsuite/cris/c/syscall2.c
+++ b/sim/testsuite/cris/c/syscall2.c
@@ -1,5 +1,5 @@
/* Test unknown-syscall output.
-#notarget: cris*-*-elf
+#progos: linux
#xerror:
#output: Unimplemented syscall: 0 (0x3, 0x2, 0x1, 0x4, 0x6, 0x5)\n
#output: program stopped with signal 4 (*).\n
diff --git a/sim/testsuite/cris/c/syscall3.c b/sim/testsuite/cris/c/syscall3.c
index f4d02eb..6d5ea28 100644
--- a/sim/testsuite/cris/c/syscall3.c
+++ b/sim/testsuite/cris/c/syscall3.c
@@ -1,5 +1,5 @@
/* As the included file, just actually specifying the default.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --cris-unknown-syscall=stop
#xerror:
#output: Unimplemented syscall: 166 (0x1, 0x2, 0x3, 0x4, 0x5, 0x6)\n
diff --git a/sim/testsuite/cris/c/syscall4.c b/sim/testsuite/cris/c/syscall4.c
index ba01cfd..4314522 100644
--- a/sim/testsuite/cris/c/syscall4.c
+++ b/sim/testsuite/cris/c/syscall4.c
@@ -1,5 +1,5 @@
/* As the included file, just actually specifying the default.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --cris-unknown-syscall=stop
#xerror:
#output: Unimplemented syscall: 0 (0x3, 0x2, 0x1, 0x4, 0x6, 0x5)\n
diff --git a/sim/testsuite/cris/c/syscall5.c b/sim/testsuite/cris/c/syscall5.c
index 2eac900..75a014a 100644
--- a/sim/testsuite/cris/c/syscall5.c
+++ b/sim/testsuite/cris/c/syscall5.c
@@ -1,5 +1,5 @@
/* As the included file, but specifying ENOSYS with message.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --cris-unknown-syscall=enosys
#output: Unimplemented syscall: 166 (0x1, 0x2, 0x3, 0x4, 0x5, 0x6)\n
#output: ENOSYS\n
diff --git a/sim/testsuite/cris/c/syscall6.c b/sim/testsuite/cris/c/syscall6.c
index 91375df..f59dc1c 100644
--- a/sim/testsuite/cris/c/syscall6.c
+++ b/sim/testsuite/cris/c/syscall6.c
@@ -1,5 +1,5 @@
/* As the included file, but specifying ENOSYS with message.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --cris-unknown-syscall=enosys
#output: Unimplemented syscall: 0 (0x3, 0x2, 0x1, 0x4, 0x6, 0x5)\n
#output: ENOSYS\n
diff --git a/sim/testsuite/cris/c/syscall7.c b/sim/testsuite/cris/c/syscall7.c
index 0f1daf1..e38d944 100644
--- a/sim/testsuite/cris/c/syscall7.c
+++ b/sim/testsuite/cris/c/syscall7.c
@@ -1,5 +1,5 @@
/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --cris-unknown-syscall=enosys-quiet
#output: ENOSYS\n
#output: xyzzy\n
diff --git a/sim/testsuite/cris/c/syscall8.c b/sim/testsuite/cris/c/syscall8.c
index c579436..38d6cc9 100644
--- a/sim/testsuite/cris/c/syscall8.c
+++ b/sim/testsuite/cris/c/syscall8.c
@@ -1,5 +1,5 @@
/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --cris-unknown-syscall=enosys-quiet
#output: ENOSYS\n
#output: xyzzy\n
diff --git a/sim/testsuite/cris/c/sysctl1.c b/sim/testsuite/cris/c/sysctl1.c
index 6646fac..5742fa4 100644
--- a/sim/testsuite/cris/c/sysctl1.c
+++ b/sim/testsuite/cris/c/sysctl1.c
@@ -1,5 +1,5 @@
/*
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <unistd.h>
diff --git a/sim/testsuite/cris/c/sysctl2.c b/sim/testsuite/cris/c/sysctl2.c
index f27c37c..53e810b 100644
--- a/sim/testsuite/cris/c/sysctl2.c
+++ b/sim/testsuite/cris/c/sysctl2.c
@@ -2,7 +2,7 @@
#xerror:
#output: Unimplemented _sysctl syscall *\n
#output: program stopped with signal 4 (*).\n
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <unistd.h>
diff --git a/sim/testsuite/cris/c/sysctl3.c b/sim/testsuite/cris/c/sysctl3.c
index 747e784..b198ed8 100644
--- a/sim/testsuite/cris/c/sysctl3.c
+++ b/sim/testsuite/cris/c/sysctl3.c
@@ -1,5 +1,5 @@
/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
+#progos: linux
#sim: --cris-unknown-syscall=enosys-quiet
#output: ENOSYS\n
#output: xyzzy\n
diff --git a/sim/testsuite/cris/c/thread2.c b/sim/testsuite/cris/c/thread2.c
index c9ad2f9..1da539d 100644
--- a/sim/testsuite/cris/c/thread2.c
+++ b/sim/testsuite/cris/c/thread2.c
@@ -1,6 +1,6 @@
/* Compiler options:
#cc: additional_flags=-pthread
-#notarget: cris*-*-elf
+#progos: linux
A sanity check for syscalls resulting from
pthread_getschedparam and pthread_setschedparam. */
diff --git a/sim/testsuite/cris/c/thread3.c b/sim/testsuite/cris/c/thread3.c
index 3b6945a..8cfc0d7 100644
--- a/sim/testsuite/cris/c/thread3.c
+++ b/sim/testsuite/cris/c/thread3.c
@@ -1,6 +1,6 @@
/* Compiler options:
#cc: additional_flags=-pthread
-#notarget: cris*-*-elf
+#progos: linux
To test sched_yield in the presencs of threads. Core from ex1.c. */
diff --git a/sim/testsuite/cris/c/thread4.c b/sim/testsuite/cris/c/thread4.c
index cfa2327..0df5fba 100644
--- a/sim/testsuite/cris/c/thread4.c
+++ b/sim/testsuite/cris/c/thread4.c
@@ -1,5 +1,5 @@
/* Compiler options:
-#notarget: cris*-*-elf
+#progos: linux
#cc: additional_flags=-pthread
#output: abb ok\n
diff --git a/sim/testsuite/cris/c/thread5.c b/sim/testsuite/cris/c/thread5.c
index 494251f..84b53e0 100644
--- a/sim/testsuite/cris/c/thread5.c
+++ b/sim/testsuite/cris/c/thread5.c
@@ -1,5 +1,5 @@
/* Compiler options:
-#notarget: cris*-*-elf
+#progos: linux
#cc: additional_flags=-pthread
#output: abbb ok\n
diff --git a/sim/testsuite/cris/c/truncate1.c b/sim/testsuite/cris/c/truncate1.c
index 477dc3d..acd0490 100644
--- a/sim/testsuite/cris/c/truncate1.c
+++ b/sim/testsuite/cris/c/truncate1.c
@@ -1,5 +1,5 @@
/* Check that the truncate syscall works trivially.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <stdio.h>
diff --git a/sim/testsuite/cris/c/truncate2.c b/sim/testsuite/cris/c/truncate2.c
index f021ae8..b24c308 100644
--- a/sim/testsuite/cris/c/truncate2.c
+++ b/sim/testsuite/cris/c/truncate2.c
@@ -1,6 +1,6 @@
/*
#sim: --sysroot=$pwd
-#notarget: cris*-*-elf
+#progos: linux
*/
#define PREFIX "/"
#include "truncate1.c"
diff --git a/sim/testsuite/cris/c/ugetrlimit1.c b/sim/testsuite/cris/c/ugetrlimit1.c
index 2a49b95..6f3eb4d1 100644
--- a/sim/testsuite/cris/c/ugetrlimit1.c
+++ b/sim/testsuite/cris/c/ugetrlimit1.c
@@ -1,5 +1,5 @@
/* Check corner error case: specifying unimplemented resource.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <sys/time.h>
diff --git a/sim/testsuite/cris/c/uname1.c b/sim/testsuite/cris/c/uname1.c
index 83518d6..02db974 100644
--- a/sim/testsuite/cris/c/uname1.c
+++ b/sim/testsuite/cris/c/uname1.c
@@ -1,5 +1,5 @@
/* Check that the right machine name appears in the uname result.
-#notarget: *-*-elf
+#progos: linux
*/
#include <sys/utsname.h>
#include <stdio.h>
diff --git a/sim/testsuite/cris/c/writev1.c b/sim/testsuite/cris/c/writev1.c
index fad5b7f..a723171 100644
--- a/sim/testsuite/cris/c/writev1.c
+++ b/sim/testsuite/cris/c/writev1.c
@@ -1,5 +1,5 @@
/* Trivial test of writev.
-#notarget: cris*-*-elf
+#progos: linux
#output: abcdefghijklmn\npass\n
*/
#include <sys/uio.h>
diff --git a/sim/testsuite/cris/c/writev2.c b/sim/testsuite/cris/c/writev2.c
index 5cb92b6..e4904df 100644
--- a/sim/testsuite/cris/c/writev2.c
+++ b/sim/testsuite/cris/c/writev2.c
@@ -1,5 +1,5 @@
/* Trivial test of failing writev: invalid file descriptor.
-#notarget: cris*-*-elf
+#progos: linux
*/
#include <sys/uio.h>
#include <errno.h>
diff --git a/sim/testsuite/lib/linuxcheck.c b/sim/testsuite/lib/linuxcheck.c
new file mode 100644
index 0000000..d1f4bc1
--- /dev/null
+++ b/sim/testsuite/lib/linuxcheck.c
@@ -0,0 +1,9 @@
+/* Used by the test harness to see if toolchain targets Linux. */
+#ifdef __linux__
+int main()
+{
+ return 0;
+}
+#else
+# error "not linux"
+#endif
diff --git a/sim/testsuite/lib/newlibcheck.c b/sim/testsuite/lib/newlibcheck.c
new file mode 100644
index 0000000..ea1d864
--- /dev/null
+++ b/sim/testsuite/lib/newlibcheck.c
@@ -0,0 +1,10 @@
+/* Used by the test harness to see if toolchain uses newlib. */
+#include <newlib.h>
+#if defined(__NEWLIB__) || defined(_NEWLIB_VERSION)
+int main()
+{
+ return 0;
+}
+#else
+# error "not newlib"
+#endif
diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index f399d2f..535f76c 100644
--- a/sim/testsuite/lib/sim-defs.exp
+++ b/sim/testsuite/lib/sim-defs.exp
@@ -48,16 +48,33 @@ proc sim_init_toolchain {} {
global srcdir
global global_cpp_works
global global_cc_works
+ global global_cc_os
# See if we have a preprocessor available.
set result [target_compile $srcdir/lib/compilercheck.c \
$objdir/compilercheck.x "preprocess" ""]
set global_cpp_works [string equal "" "$result"]
- # See if we have a compiler available.
- set result [target_compile $srcdir/lib/compilercheck.c \
- $objdir/compilercheck.x "executable" ""]
- set global_cc_works [string equal "" "$result"]
+ # See if we have a compiler available, and which environment it's targeting.
+ if { [target_compile $srcdir/lib/newlibcheck.c \
+ $objdir/compilercheck.x "executable" ""] == "" } {
+ verbose -log "Found newlib C compiler"
+ set global_cc_works 1
+ set global_cc_os "newlib"
+ } elseif { [target_compile $srcdir/lib/linuxcheck.c \
+ $objdir/compilercheck.x "executable" ""] == "" } {
+ verbose -log "Found Linux C compiler"
+ set global_cc_works 1
+ set global_cc_os "linux"
+ } elseif { [target_compile $srcdir/lib/compilercheck.c \
+ $objdir/compilercheck.x "executable" ""] == "" } {
+ verbose -log "Found C compiler, but unknown OS"
+ set global_cc_works 1
+ set global_cc_os ""
+ } {
+ verbose -log "Can't execute C compiler"
+ set global_cc_works 0
+ }
file delete $objdir/compilercheck.x
}
@@ -189,6 +206,7 @@ proc sim_run { prog sim_opts prog_opts redir options } {
# cc[(mach-list)]: <compiler options>
# sim[(mach-list)]: <simulator options>
# progopts: <arguments to the program being simulated>
+# progos: OS required for the test
# status: program exit status to treat as "pass"
# output: program output pattern to match with string-match
# xerror: program is expected to return with a "failure" exit code
@@ -211,6 +229,7 @@ proc run_sim_test { name requested_machs } {
global SIMFLAGS_FOR_TARGET
global global_cpp_works
global global_cc_works
+ global global_cc_os
if ![file exists $sim_path] {
unsupported "$name: missing simulator $sim_path"
@@ -234,6 +253,7 @@ proc run_sim_test { name requested_machs } {
set opts(ld) ""
set opts(cc) ""
set opts(progopts) ""
+ set opts(progos) ""
set opts(sim) ""
set opts(status) "0"
set opts(output) ""
@@ -291,6 +311,11 @@ proc run_sim_test { name requested_machs } {
}
}
+ if { $opts(progos) != "" && $opts(progos) != $global_cc_os } {
+ untested $subdir/$name
+ return
+ }
+
set testname $name
set sourcefile $file
if { $seen_output == 0 } {