summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2021-02-25 11:59:36 -0500
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2021-02-25 18:11:52 -0500
commitf329eee8c5b92306ab12646580f6f3743f3ca812 (patch)
treeec6df4e8dadcb95290d08ee22cf66741fbc77e5e /test
parentc89582fc1f55c03d7781d562b187a2e97e6ce560 (diff)
downloadlibfaketime-f329eee8c5b92306ab12646580f6f3743f3ca812.tar.gz
Send test output to stdout, not stderr
debian autopkgtest instances (and maybe other test systems) will report a failure if messages are sent to stderr. Since these messages are diagnostic messages for the test suite, and not indicators of actual failure, they should go to stdout, not stderr.
Diffstat (limited to 'test')
-rw-r--r--test/libgetpid.c4
-rw-r--r--test/librandom.c6
-rw-r--r--test/use_lib_getpid.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/test/libgetpid.c b/test/libgetpid.c
index 1fb84c5..fce94ce 100644
--- a/test/libgetpid.c
+++ b/test/libgetpid.c
@@ -3,11 +3,11 @@
#include <unistd.h>
void getpid_func() {
- fprintf(stderr, " called getpid_func()\n");
+ printf(" called getpid_func()\n");
}
static __attribute__((constructor)) void getpid_init() {
pid_t pid = getpid();
- fprintf(stderr, " getpid() yielded %d\n", pid);
+ printf(" getpid() yielded %d\n", pid);
}
diff --git a/test/librandom.c b/test/librandom.c
index d11ba23..8152776 100644
--- a/test/librandom.c
+++ b/test/librandom.c
@@ -2,7 +2,7 @@
#include <sys/random.h>
void func() {
- fprintf(stderr, " called func()\n");
+ printf(" called func()\n");
}
@@ -10,8 +10,8 @@ static __attribute__((constructor)) void rnd_init() {
unsigned int targ;
ssize_t ret = getrandom(&targ, sizeof(targ), 0);
if (ret == sizeof(targ)) {
- fprintf(stderr, " getrandom() yielded 0x%08x\n", targ);
+ printf(" getrandom() yielded 0x%08x\n", targ);
} else {
- fprintf(stderr, " getrandom() failed with only %zd\n", ret);
+ printf(" getrandom() failed with only %zd\n", ret);
}
}
diff --git a/test/use_lib_getpid.c b/test/use_lib_getpid.c
index c9f3deb..f9b5d94 100644
--- a/test/use_lib_getpid.c
+++ b/test/use_lib_getpid.c
@@ -7,6 +7,6 @@ int main() {
pid_t pid;
getpid_func();
pid = getpid();
- fprintf(stderr, " getpid() -> %d\n", pid);
+ printf(" getpid() -> %d\n", pid);
return 0;
}