summaryrefslogtreecommitdiff
path: root/src/tests/thread-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/thread-test.c')
-rw-r--r--src/tests/thread-test.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/tests/thread-test.c b/src/tests/thread-test.c
index aaa79fb58..6441dc7e0 100644
--- a/src/tests/thread-test.c
+++ b/src/tests/thread-test.c
@@ -46,14 +46,14 @@ static pa_once once = PA_ONCE_INIT;
static void thread_func(void *data) {
pa_tls_set(tls, data);
- pa_log("thread_func() for %s starting...", (char*) pa_tls_get(tls));
+ pa_log_info("thread_func() for %s starting...", (char*) pa_tls_get(tls));
pa_mutex_lock(mutex);
for (;;) {
int k, n;
- pa_log("%s waiting ...", (char*) pa_tls_get(tls));
+ pa_log_info("%s waiting ...", (char*) pa_tls_get(tls));
for (;;) {
@@ -75,7 +75,7 @@ static void thread_func(void *data) {
pa_cond_signal(cond2, 0);
- pa_log("%s got number %i", (char*) pa_tls_get(tls), k);
+ pa_log_info("%s got number %i", (char*) pa_tls_get(tls), k);
/* Spin! */
for (n = 0; n < k; n++)
@@ -88,13 +88,16 @@ quit:
pa_mutex_unlock(mutex);
- pa_log("thread_func() for %s done...", (char*) pa_tls_get(tls));
+ pa_log_info("thread_func() for %s done...", (char*) pa_tls_get(tls));
}
int main(int argc, char *argv[]) {
int i, k;
pa_thread* t[THREADS_MAX];
+ if (!getenv("MAKE_CHECK"))
+ pa_log_set_level(PA_LOG_DEBUG);
+
mutex = pa_mutex_new(FALSE, FALSE);
cond1 = pa_cond_new();
cond2 = pa_cond_new();
@@ -113,7 +116,7 @@ int main(int argc, char *argv[]) {
magic_number = (int) rand() % 0x10000;
- pa_log("iteration %i (%i)", k, magic_number);
+ pa_log_info("iteration %i (%i)", k, magic_number);
pa_cond_signal(cond1, 0);