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:
authorJeff Johnston <jjohnstn@redhat.com>2002-11-15 02:04:05 +0300
committerJeff Johnston <jjohnstn@redhat.com>2002-11-15 02:04:05 +0300
commit665b994e3ac0c7e71e8813bef99a655ed2381ddd (patch)
treeaf0710307248be8a884792608184e824da11d700 /newlib/testsuite
parent16f880fcbaa9de304b7fce1edd80126474ed05e2 (diff)
2002-11-14 Jeff Johnston <jjohnstn@redhat.com>
* testsuite/lib/passfail.exp (newlib_pass_fail): Changed to only issue one pass/fail message for a compile/link/execute. * testsuite/newlib.elix/elix.exp: New file. * testsuite/newlib.elix/tmmap.c: Ditto.
Diffstat (limited to 'newlib/testsuite')
-rw-r--r--newlib/testsuite/lib/passfail.exp2
-rw-r--r--newlib/testsuite/newlib.elix/elix.exp19
-rw-r--r--newlib/testsuite/newlib.elix/tmmap.c42
3 files changed, 61 insertions, 2 deletions
diff --git a/newlib/testsuite/lib/passfail.exp b/newlib/testsuite/lib/passfail.exp
index 0a01f4816..82dc0093c 100644
--- a/newlib/testsuite/lib/passfail.exp
+++ b/newlib/testsuite/lib/passfail.exp
@@ -42,9 +42,7 @@ proc newlib_pass_fail { srcfile } {
if { $comp_output != "" } {
fail "Failed to compile $fullsrcfile.\n"
- fail "$fullsrcfile"
} else {
- pass "Compiled $fullsrcfile.\n"
set result [newlib_load $test_driver ""]
set status [lindex $result 0]
$status "$fullsrcfile"
diff --git a/newlib/testsuite/newlib.elix/elix.exp b/newlib/testsuite/newlib.elix/elix.exp
new file mode 100644
index 000000000..6c0ee92e6
--- /dev/null
+++ b/newlib/testsuite/newlib.elix/elix.exp
@@ -0,0 +1,19 @@
+# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software
+# is freely granted, provided that this notice is preserved.
+#
+
+global host_triplet target_triplet
+
+load_lib passfail.exp
+
+set exclude_list {
+}
+
+verbose $host_triplet
+verbose $target_triplet
+
+if [string match "i\[3456\]86-pc-linux-gnu" $target_triplet] then {
+ newlib_pass_fail_all -x $exclude_list
+}
diff --git a/newlib/testsuite/newlib.elix/tmmap.c b/newlib/testsuite/newlib.elix/tmmap.c
new file mode 100644
index 000000000..d930c96b1
--- /dev/null
+++ b/newlib/testsuite/newlib.elix/tmmap.c
@@ -0,0 +1,42 @@
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include "check.h"
+
+int main()
+{
+ int fd;
+ char *x;
+ FILE *fp;
+ char buf[40];
+
+ fd = open("my.file", O_CREAT | O_TRUNC | O_RDWR, 0644);
+
+ CHECK (fd != -1);
+
+ CHECK (write (fd, "abcdefgh", 8) == 8);
+
+ x = (char *)mmap (0, 20, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+
+ CHECK (x != MAP_FAILED);
+
+ x[3] = 'j';
+
+ CHECK (munmap (x, 20) == 0);
+
+ CHECK (close(fd) != -1);
+
+ fp = fopen("my.file","r");
+
+ CHECK (fp != NULL);
+
+ CHECK (fread(buf, 1, 20, fp) == 8);
+
+ CHECK (strncmp (buf, "abcjefgh", 8) == 0);
+
+ exit (0);
+}
+