dietlibc/dietlibc-0.31.20080212-teststdout.patch
2009-07-25 14:52:48 +00:00

67 lines
1.7 KiB
Diff

From 7bf571cbff4c43098d9b1cd2b4bbd9457bff5b60 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 19 Apr 2008 17:45:11 +0200
Subject: [PATCH 10/18] Use stdout instead of stderr in testsuite
This patches uses stdout instead stderr when giving out normal status
messages in the testsuite.
---
test/atexit.c | 2 +-
test/malloc-debugger.c | 2 +-
test/sendfile.c | 2 +-
test/waitpid.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/atexit.c b/test/atexit.c
index 709a3e4..79ee392 100644
--- a/test/atexit.c
+++ b/test/atexit.c
@@ -2,7 +2,7 @@
#include <unistd.h>
void blah(void) {
- write(2,"atexit\n",7);
+ write(1,"atexit\n",7);
}
int main() {
diff --git a/test/malloc-debugger.c b/test/malloc-debugger.c
index 040196e..058807e 100644
--- a/test/malloc-debugger.c
+++ b/test/malloc-debugger.c
@@ -4,7 +4,7 @@
int main() {
char* c=malloc(13);
char* tmp;
- fprintf(stderr,"got %p\n",c);
+ fprintf(stdout,"got %p\n",c);
c[0]=14;
// c[15]=0;
tmp=realloc(c,12345);
diff --git a/test/sendfile.c b/test/sendfile.c
index d43cdd2..28b3af5 100644
--- a/test/sendfile.c
+++ b/test/sendfile.c
@@ -11,5 +11,5 @@ int main() {
printf("sendfile returned %d\n",ret);
-return 0;
+ return ret<0 ? 1 : 0;
}
diff --git a/test/waitpid.c b/test/waitpid.c
index fe2cb5b..92c0b0e 100644
--- a/test/waitpid.c
+++ b/test/waitpid.c
@@ -11,7 +11,7 @@ int main() {
perror("fork");
_exit(1);
case 0:
- fprintf(stderr,"child, my pid is %u\n",getpid());
+ fprintf(stdout,"child, my pid is %u\n",getpid());
sleep(1);
_exit(23);
}
--
1.6.2.5