Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/testsuite/winsup.api')
-rw-r--r--winsup/cygwin/testsuite/winsup.api/devzero.c113
-rw-r--r--winsup/cygwin/testsuite/winsup.api/samples/sample-pass.c4
-rw-r--r--winsup/cygwin/testsuite/winsup.api/samples/xf-sample-fail.c4
-rw-r--r--winsup/cygwin/testsuite/winsup.api/samples/xf-sample-miscompile.c1
-rw-r--r--winsup/cygwin/testsuite/winsup.api/winsup.exp43
5 files changed, 0 insertions, 165 deletions
diff --git a/winsup/cygwin/testsuite/winsup.api/devzero.c b/winsup/cygwin/testsuite/winsup.api/devzero.c
deleted file mode 100644
index 85a2615b1..000000000
--- a/winsup/cygwin/testsuite/winsup.api/devzero.c
+++ /dev/null
@@ -1,113 +0,0 @@
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-main()
-{
- int fd, r, w, l;
- char buf[1024];
- char *v;
-
- fd = open("/dev/zero", O_RDONLY);
- if (fd < 0)
- {
- fprintf(stderr, "Unable to open /dev/zero for reading\n");
- perror("The error was");
- exit(1);
- }
-
- l = read(fd, buf, 1024);
- if (l != 1024)
- {
- fprintf(stderr, "Asked to read 1024 bytes, got %d\n", l);
- exit(1);
- }
-
- for (r=0; r<1024; r++)
- if (buf[r] != 0)
- {
- fprintf(stderr, "/dev/zero returned a byte of %02x at offset %d\n",
- buf[r], r);
- exit(1);
- }
-
- l = lseek(fd, 4096, 0);
- if (l != 0)
- {
- fprintf(stderr, "l == %d\n", l);
- exit(1);
- }
-
- l = close(fd);
- if (l != 0)
- {
- fprintf(stderr, "close: returned %d\n", l);
- perror("The error was");
- exit(1);
- }
-
- fd = open("/dev/zero", O_WRONLY);
- if (fd < 0)
- {
- fprintf(stderr, "Unable to open /dev/zero for writing\n");
- perror("The error was");
- exit(1);
- }
-
- l = write(fd, buf, 1024);
- if (l != 1024)
- {
- fprintf(stderr, "Asked to write 1024 bytes, got %d\n", l);
- exit(1);
- }
-
- l = close(fd);
- if (l != 0)
- {
- fprintf(stderr, "close: returned %d\n", l);
- perror("The error was");
- exit(1);
- }
-
- fd = open("/dev/zero", O_RDWR);
- v = (char *)mmap(0, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
- if (v == (char *)-1)
- {
- fprintf(stderr, "mmap r/w /dev/zero failed\n");
- perror("The error was");
- exit(1);
- }
-
- for (r=0; r<65536; r++)
- if (v[r] != 0)
- {
- fprintf(stderr, "mmap'd r/w /dev/zero has byte %d at offset %d\n",
- v[r], r);
- exit(1);
- }
- munmap(v, 65536);
- close(fd);
-
- fd = open("/dev/zero", O_RDONLY);
- v = (char *)mmap(0, 65536, PROT_READ, MAP_SHARED, fd, 0);
- if (v == (char *)-1)
- {
- fprintf(stderr, "mmap /dev/zero r/o failed\n");
- perror("The error was");
- exit(1);
- }
-
- for (r=0; r<65536; r++)
- if (v[r] != 0)
- {
- fprintf(stderr, "mmap'd r/o /dev/zero has byte %d at offset %d\n",
- v[r], r);
- exit(1);
- }
- munmap(v, 65536);
- close(fd);
-
- exit(0);
-}
diff --git a/winsup/cygwin/testsuite/winsup.api/samples/sample-pass.c b/winsup/cygwin/testsuite/winsup.api/samples/sample-pass.c
deleted file mode 100644
index 893a0b605..000000000
--- a/winsup/cygwin/testsuite/winsup.api/samples/sample-pass.c
+++ /dev/null
@@ -1,4 +0,0 @@
-main()
-{
- return 0;
-}
diff --git a/winsup/cygwin/testsuite/winsup.api/samples/xf-sample-fail.c b/winsup/cygwin/testsuite/winsup.api/samples/xf-sample-fail.c
deleted file mode 100644
index d8beb90be..000000000
--- a/winsup/cygwin/testsuite/winsup.api/samples/xf-sample-fail.c
+++ /dev/null
@@ -1,4 +0,0 @@
-main()
-{
- return 1;
-}
diff --git a/winsup/cygwin/testsuite/winsup.api/samples/xf-sample-miscompile.c b/winsup/cygwin/testsuite/winsup.api/samples/xf-sample-miscompile.c
deleted file mode 100644
index bc0d21d2e..000000000
--- a/winsup/cygwin/testsuite/winsup.api/samples/xf-sample-miscompile.c
+++ /dev/null
@@ -1 +0,0 @@
-foo bar grill
diff --git a/winsup/cygwin/testsuite/winsup.api/winsup.exp b/winsup/cygwin/testsuite/winsup.api/winsup.exp
deleted file mode 100644
index 5c85cc00b..000000000
--- a/winsup/cygwin/testsuite/winsup.api/winsup.exp
+++ /dev/null
@@ -1,43 +0,0 @@
-source "site.exp"
-
-if { ! [isnative] } {
- verbose "skipping winsup.api because it's not native"
- return
-}
-
-set rv ""
-
-proc ws_spawn {cmd args} {
- global rv
- verbose "running $cmd\n"
- catch [eval "exec $cmd"] rv
- verbose send "catchCode = $rv\n"
-}
-
-foreach src [glob -nocomplain $srcdir/$subdir/*.c $srcdir/$subdir/*/*.c] {
- regsub "^$srcdir/$subdir/" $src "" testcase
- regsub ".c$" $testcase "" base
- regsub ".*/" $base "" basename
- regsub "/" $base "-" base
-
- if { [regexp "^xf-" $basename] } {
- setup_xfail "*-*-*"
- } else {
- clear_xfail
- }
-
- ws_spawn "$CC $src $rootme/new-libcygwin.a -o $base.exe"
- if { $rv != "" } {
- verbose -log "$rv"
- fail "$testcase (compile)"
- } else {
- ws_spawn "../cygrun ./$base.exe"
- if { $rv != "" } {
- verbose -log "$testcase: $rv"
- fail "$testcase (execute)"
- } else {
- pass "$testcase"
- file delete "$base.exe"
- }
- }
-}