diff options
| author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-07-30 01:56:45 +0000 |
|---|---|---|
| committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-07-30 01:56:45 +0000 |
| commit | 04ab95efe9d498e9ac07a37c80b80b6f267ddcf0 (patch) | |
| tree | 57ca40d5c9c1efa6025867cca1d1572a15f1eac6 /test | |
| parent | b87804d0362d55f8a0291595036ebfccf5b1a59f (diff) | |
| download | uClibc-alpine-04ab95efe9d498e9ac07a37c80b80b6f267ddcf0.tar.bz2 uClibc-alpine-04ab95efe9d498e9ac07a37c80b80b6f267ddcf0.tar.xz | |
More merges with main trunk.
Diffstat (limited to 'test')
| -rw-r--r-- | test/stdlib/Makefile | 17 | ||||
| -rw-r--r-- | test/unistd/Makefile | 2 | ||||
| -rw-r--r-- | test/unistd/errno.c | 27 |
3 files changed, 32 insertions, 14 deletions
diff --git a/test/stdlib/Makefile b/test/stdlib/Makefile index 6c485efe6..f7b03be1a 100644 --- a/test/stdlib/Makefile +++ b/test/stdlib/Makefile @@ -42,7 +42,6 @@ teststrtol: teststrtol.c Makefile $(TESTDIR)/Rules.mak $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS) $(STRIPTOOL) -x -R .note -R .comment $@ -$(LDD) $@ - ls -l $@ ./$@ > $@.out -@ echo " " @@ -55,7 +54,6 @@ teststrtol_glibc: teststrtol.c Makefile $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@ $(STRIPTOOL) -x -R .note -R .comment $@ -$(LDD) $@ - ls -l $@ ./$@ > $@.out -@ echo " " @@ -64,7 +62,7 @@ teststrtol_diff: teststrtol_glibc teststrtol -@ echo " " -@ echo "Diffing output: " -@ echo " " - -diff -u teststrtol_glibc.out teststrtol.out + diff -u teststrtol_glibc.out teststrtol.out -@ echo " " qsort: qsort.c Makefile $(TESTDIR)/Rules.mak @@ -76,7 +74,6 @@ qsort: qsort.c Makefile $(TESTDIR)/Rules.mak $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS) $(STRIPTOOL) -x -R .note -R .comment $@ -$(LDD) $@ - ls -l $@ ./$@ > $@.out -@ echo " " @@ -89,7 +86,6 @@ qsort_glibc: qsort.c Makefile $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@ $(STRIPTOOL) -x -R .note -R .comment $@ -$(LDD) $@ - ls -l $@ ./$@ > $@.out -@ echo " " @@ -98,7 +94,7 @@ qsort_diff: qsort_glibc qsort -@ echo " " -@ echo "Diffing output: " -@ echo " " - -diff -u qsort_glibc.out qsort.out + diff -u qsort_glibc.out qsort.out -@ echo " " teston_exit: teston_exit.c Makefile $(TESTDIR)/Rules.mak @@ -110,7 +106,6 @@ teston_exit: teston_exit.c Makefile $(TESTDIR)/Rules.mak $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS) $(STRIPTOOL) -x -R .note -R .comment $@ -$(LDD) $@ - ls -l $@ ./$@ > $@.out -@ echo " " @@ -123,7 +118,6 @@ teston_exit_glibc: teston_exit.c Makefile $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@ $(STRIPTOOL) -x -R .note -R .comment $@ -$(LDD) $@ - ls -l $@ ./$@ > $@.out -@ echo " " @@ -132,7 +126,7 @@ teston_exit_diff: teston_exit_glibc teston_exit -@ echo " " -@ echo "Diffing output: " -@ echo " " - -diff -u teston_exit_glibc.out teston_exit.out + diff -u teston_exit_glibc.out teston_exit.out -@ echo " " testatexit: testatexit.c Makefile $(TESTDIR)/Rules.mak @@ -144,7 +138,6 @@ testatexit: testatexit.c Makefile $(TESTDIR)/Rules.mak $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS) $(STRIPTOOL) -x -R .note -R .comment $@ -$(LDD) $@ - ls -l $@ ./$@ > $@.out -@ echo " " @@ -157,7 +150,6 @@ testatexit_glibc: testatexit.c Makefile $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@ $(STRIPTOOL) -x -R .note -R .comment $@ -$(LDD) $@ - ls -l $@ ./$@ > $@.out -@ echo " " @@ -166,7 +158,7 @@ testatexit_diff: testatexit_glibc testatexit -@ echo " " -@ echo "Diffing output: " -@ echo " " - -diff -u testatexit_glibc.out testatexit.out + diff -u testatexit_glibc.out testatexit.out -@ echo " " ptytest: ptytest.c Makefile $(TESTDIR)/Rules.mak @@ -178,7 +170,6 @@ ptytest: ptytest.c Makefile $(TESTDIR)/Rules.mak $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS) $(STRIPTOOL) -x -R .note -R .comment $@ -$(LDD) $@ - ls -l $@ ./$@ -@ echo " " diff --git a/test/unistd/Makefile b/test/unistd/Makefile index d684f0690..4db50174d 100644 --- a/test/unistd/Makefile +++ b/test/unistd/Makefile @@ -1,7 +1,7 @@ # uClibc unistd tests # Licensed under the GNU Library General Public License, see COPYING.LIB -TESTS = clone fork getcwd getopt getopt_long preadwrite vfork +TESTS = clone errno fork getcwd getopt getopt_long preadwrite vfork include ../Test.mak diff --git a/test/unistd/errno.c b/test/unistd/errno.c new file mode 100644 index 000000000..cb082b890 --- /dev/null +++ b/test/unistd/errno.c @@ -0,0 +1,27 @@ +/* based originally on one the clone tests in the LTP */ + +#include <stdio.h> +#include <stdlib.h> +#include <errno.h> +#include <sched.h> + +int child_fn(void *arg) +{ + fprintf(stderr, "in child_fn\n"); + exit(1); +} + +int main(void) +{ + int r_clone, ret_errno; + + r_clone = clone(child_fn, NULL, (int) NULL, NULL); + ret_errno = errno; + if (ret_errno != EINVAL || r_clone != -1) { + fprintf(stderr, "clone: res=%d (wanted -1) errno=%d (wanted %d)\n", + r_clone, errno, EINVAL); + return 1; + } + + return 0; +} |
