diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-02-20 03:21:46 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-02-20 03:21:46 +0100 |
commit | 7bc1847596bdedea6a06c8c0a019da773476a965 (patch) | |
tree | 521be5207d649ff24f022c9bfe31a716a2674317 /src/tests | |
parent | 26a270a934f0f174f7bd7eb89e85301963721deb (diff) | |
parent | 2e250aaebb7708b25b5342d8ced657364adedc95 (diff) |
Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/interpol-test.c | 3 | ||||
-rw-r--r-- | src/tests/ipacl-test.c | 3 | ||||
-rw-r--r-- | src/tests/sync-playback.c | 7 | ||||
-rw-r--r-- | src/tests/thread-mainloop-test.c | 2 |
4 files changed, 11 insertions, 4 deletions
diff --git a/src/tests/interpol-test.c b/src/tests/interpol-test.c index 20d2c230..d7da660c 100644 --- a/src/tests/interpol-test.c +++ b/src/tests/interpol-test.c @@ -126,7 +126,8 @@ int main(int argc, char *argv[]) { pa_gettimeofday(&start); - pa_threaded_mainloop_start(m); + r = pa_threaded_mainloop_start(m); + assert(r >= 0); for (k = 0; k < 5000; k++) { pa_bool_t success = FALSE, changed = FALSE; diff --git a/src/tests/ipacl-test.c b/src/tests/ipacl-test.c index 7b7564a4..f89665cd 100644 --- a/src/tests/ipacl-test.c +++ b/src/tests/ipacl-test.c @@ -25,6 +25,7 @@ #endif #include "../pulsecore/winsock.h" +#include "../pulsecore/macro.h" #include <pulsecore/ipacl.h> @@ -96,7 +97,7 @@ int main(int argc, char *argv[]) { memset(&sa6, 0, sizeof(sa6)); sa6.sin6_family = AF_INET6; sa6.sin6_port = htons(22); - inet_pton(AF_INET6, "::1", &sa6.sin6_addr); + pa_assert_se(inet_pton(AF_INET6, "::1", &sa6.sin6_addr) == 1); r = connect(fd, (struct sockaddr*) &sa6, sizeof(sa6)); assert(r >= 0); diff --git a/src/tests/sync-playback.c b/src/tests/sync-playback.c index 42c479a1..f2a15601 100644 --- a/src/tests/sync-playback.c +++ b/src/tests/sync-playback.c @@ -174,11 +174,16 @@ int main(int argc, char *argv[]) { pa_context_set_state_callback(context, context_state_callback, NULL); - pa_context_connect(context, NULL, 0, NULL); + /* Connect the context */ + if (pa_context_connect(context, NULL, 0, NULL) < 0) { + fprintf(stderr, "pa_context_connect() failed.\n"); + goto quit; + } if (pa_mainloop_run(m, &ret) < 0) fprintf(stderr, "pa_mainloop_run() failed.\n"); +quit: pa_context_unref(context); for (i = 0; i < NSTREAMS; i++) diff --git a/src/tests/thread-mainloop-test.c b/src/tests/thread-mainloop-test.c index 263cd57d..3bcf4f16 100644 --- a/src/tests/thread-mainloop-test.c +++ b/src/tests/thread-mainloop-test.c @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) { pa_assert_se(m = pa_threaded_mainloop_new()); pa_assert_se(a = pa_threaded_mainloop_get_api(m)); - pa_threaded_mainloop_start(m); + pa_assert_se(pa_threaded_mainloop_start(m) >= 0); pa_threaded_mainloop_lock(m); |