diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2021-02-25 11:59:36 -0500 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2021-02-25 18:11:52 -0500 |
commit | f329eee8c5b92306ab12646580f6f3743f3ca812 (patch) | |
tree | ec6df4e8dadcb95290d08ee22cf66741fbc77e5e /test | |
parent | c89582fc1f55c03d7781d562b187a2e97e6ce560 (diff) | |
download | libfaketime-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.c | 4 | ||||
-rw-r--r-- | test/librandom.c | 6 | ||||
-rw-r--r-- | test/use_lib_getpid.c | 2 |
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; } |