summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/asyncmsgq-test.c2
-rw-r--r--src/tests/asyncq-test.c2
-rw-r--r--src/tests/channelmap-test.c7
-rw-r--r--src/tests/close-test.c20
-rw-r--r--src/tests/cpulimit-test.c2
-rw-r--r--src/tests/envelope-test.c2
-rw-r--r--src/tests/flist-test.c2
-rw-r--r--src/tests/get-binary-name-test.c2
-rw-r--r--src/tests/hook-list-test.c12
-rw-r--r--src/tests/interpol-test.c2
-rw-r--r--src/tests/ipacl-test.c2
-rw-r--r--src/tests/mainloop-test.c2
-rw-r--r--src/tests/mcalign-test.c2
-rw-r--r--src/tests/memblock-test.c2
-rw-r--r--src/tests/memblockq-test.c2
-rw-r--r--src/tests/mix-test.c2
-rw-r--r--src/tests/pacat-simple.c2
-rw-r--r--src/tests/parec-simple.c2
-rw-r--r--src/tests/proplist-test.c2
-rw-r--r--src/tests/queue-test.c2
-rw-r--r--src/tests/remix-test.c2
-rw-r--r--src/tests/resampler-test.c2
-rw-r--r--src/tests/rtpoll-test.c2
-rw-r--r--src/tests/rtstutter.c4
-rw-r--r--src/tests/sig2str-test.c2
-rw-r--r--src/tests/smoother-test.c2
-rw-r--r--src/tests/stripnul.c2
-rw-r--r--src/tests/sync-playback.c2
-rw-r--r--src/tests/thread-mainloop-test.c2
-rw-r--r--src/tests/thread-test.c2
-rw-r--r--src/tests/utf8-test.c2
-rw-r--r--src/tests/voltest.c2
32 files changed, 30 insertions, 69 deletions
diff --git a/src/tests/asyncmsgq-test.c b/src/tests/asyncmsgq-test.c
index 380c5e7f..08ad3dd4 100644
--- a/src/tests/asyncmsgq-test.c
+++ b/src/tests/asyncmsgq-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/asyncq-test.c b/src/tests/asyncq-test.c
index 0e10ed89..4e8a1207 100644
--- a/src/tests/asyncq-test.c
+++ b/src/tests/asyncq-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/channelmap-test.c b/src/tests/channelmap-test.c
index d26d2cff..9c234602 100644
--- a/src/tests/channelmap-test.c
+++ b/src/tests/channelmap-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
#include <stdio.h>
#include <assert.h>
@@ -22,12 +20,15 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char *argv[]) {
fprintf(stderr, "map: <%s>\n", pa_channel_map_snprint(cm, sizeof(cm), &map));
+ pa_channel_map_init_extend(&map, 14, PA_CHANNEL_MAP_ALSA);
+
+ fprintf(stderr, "map: <%s>\n", pa_channel_map_snprint(cm, sizeof(cm), &map));
+
pa_channel_map_parse(&map2, cm);
assert(pa_channel_map_equal(&map, &map2));
pa_channel_map_parse(&map2, "left,test");
-
return 0;
}
diff --git a/src/tests/close-test.c b/src/tests/close-test.c
new file mode 100644
index 00000000..7a6fec57
--- /dev/null
+++ b/src/tests/close-test.c
@@ -0,0 +1,20 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <unistd.h>
+#include <fcntl.h>
+
+#include <pulsecore/core-util.h>
+
+int main(int argc, char *argv[]) {
+
+ open("/dev/null", O_RDONLY);
+ open("/dev/null", O_RDONLY);
+ open("/dev/null", O_RDONLY);
+ open("/dev/null", O_RDONLY);
+
+ pa_close_all(5, -1);
+
+ return 0;
+}
diff --git a/src/tests/cpulimit-test.c b/src/tests/cpulimit-test.c
index 4563c0f6..b7145e8a 100644
--- a/src/tests/cpulimit-test.c
+++ b/src/tests/cpulimit-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/envelope-test.c b/src/tests/envelope-test.c
index 240747d7..9f914553 100644
--- a/src/tests/envelope-test.c
+++ b/src/tests/envelope-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/flist-test.c b/src/tests/flist-test.c
index 7e54454e..b2c648da 100644
--- a/src/tests/flist-test.c
+++ b/src/tests/flist-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/get-binary-name-test.c b/src/tests/get-binary-name-test.c
index 29ebbe22..7c7a8996 100644
--- a/src/tests/get-binary-name-test.c
+++ b/src/tests/get-binary-name-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/hook-list-test.c b/src/tests/hook-list-test.c
index 8628f521..60b965cd 100644
--- a/src/tests/hook-list-test.c
+++ b/src/tests/hook-list-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -7,12 +5,12 @@
#include <pulsecore/hook-list.h>
#include <pulsecore/log.h>
-static pa_hook_result_t func1(const char*hook_data, const char*call_data, const char*slot_data) {
+static pa_hook_result_t func1(const char *hook_data, const char *call_data, const char *slot_data) {
pa_log("(func1) hook=%s call=%s slot=%s", hook_data, call_data, slot_data);
return PA_HOOK_OK;
}
-static pa_hook_result_t func2(const char*hook_data, const char*call_data, const char*slot_data) {
+static pa_hook_result_t func2(const char *hook_data, const char *call_data, const char *slot_data) {
pa_log("(func2) hook=%s call=%s slot=%s", hook_data, call_data, slot_data);
return PA_HOOK_OK;
}
@@ -23,9 +21,9 @@ int main(int argc, char *argv[]) {
pa_hook_init(&hook, (void*) "hook");
- pa_hook_connect(&hook, (pa_hook_cb_t) func1, (void*) "slot1");
- slot = pa_hook_connect(&hook, (pa_hook_cb_t) func2, (void*) "slot2");
- pa_hook_connect(&hook, (pa_hook_cb_t) func1, (void*) "slot3");
+ pa_hook_connect(&hook, PA_HOOK_LATE, (pa_hook_cb_t) func1, (void*) "slot1");
+ slot = pa_hook_connect(&hook, PA_HOOK_NORMAL, (pa_hook_cb_t) func2, (void*) "slot2");
+ pa_hook_connect(&hook, PA_HOOK_NORMAL, (pa_hook_cb_t) func1, (void*) "slot3");
pa_hook_fire(&hook, (void*) "call1");
diff --git a/src/tests/interpol-test.c b/src/tests/interpol-test.c
index f894d2f3..9d930774 100644
--- a/src/tests/interpol-test.c
+++ b/src/tests/interpol-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/ipacl-test.c b/src/tests/ipacl-test.c
index d1bcb3e3..bcdd469a 100644
--- a/src/tests/ipacl-test.c
+++ b/src/tests/ipacl-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
diff --git a/src/tests/mainloop-test.c b/src/tests/mainloop-test.c
index 79a4aaa0..9fa2e466 100644
--- a/src/tests/mainloop-test.c
+++ b/src/tests/mainloop-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/mcalign-test.c b/src/tests/mcalign-test.c
index 79dd5797..9e358359 100644
--- a/src/tests/mcalign-test.c
+++ b/src/tests/mcalign-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/memblock-test.c b/src/tests/memblock-test.c
index 2b9d3401..6da1b1e9 100644
--- a/src/tests/memblock-test.c
+++ b/src/tests/memblock-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/memblockq-test.c b/src/tests/memblockq-test.c
index 3fa8d79f..7bf992a1 100644
--- a/src/tests/memblockq-test.c
+++ b/src/tests/memblockq-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/mix-test.c b/src/tests/mix-test.c
index d07b1b0c..f3f6f829 100644
--- a/src/tests/mix-test.c
+++ b/src/tests/mix-test.c
@@ -1,5 +1,3 @@
-/* $Id: resampler-test.c 2037 2007-11-09 02:45:07Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/pacat-simple.c b/src/tests/pacat-simple.c
index c2123b74..b26e4b68 100644
--- a/src/tests/pacat-simple.c
+++ b/src/tests/pacat-simple.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/parec-simple.c b/src/tests/parec-simple.c
index 9c66cc23..6c0d529b 100644
--- a/src/tests/parec-simple.c
+++ b/src/tests/parec-simple.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/proplist-test.c b/src/tests/proplist-test.c
index 5f7a78f3..20041af6 100644
--- a/src/tests/proplist-test.c
+++ b/src/tests/proplist-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/queue-test.c b/src/tests/queue-test.c
index b357ab10..105f094a 100644
--- a/src/tests/queue-test.c
+++ b/src/tests/queue-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/remix-test.c b/src/tests/remix-test.c
index d2fa6943..4777c150 100644
--- a/src/tests/remix-test.c
+++ b/src/tests/remix-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/resampler-test.c b/src/tests/resampler-test.c
index 820a0c1e..1a20be2c 100644
--- a/src/tests/resampler-test.c
+++ b/src/tests/resampler-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/rtpoll-test.c b/src/tests/rtpoll-test.c
index af942104..953fd61d 100644
--- a/src/tests/rtpoll-test.c
+++ b/src/tests/rtpoll-test.c
@@ -1,5 +1,3 @@
-/* $Id: thread-test.c 1621 2007-08-10 22:00:22Z lennart $ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/rtstutter.c b/src/tests/rtstutter.c
index 39dfc5d3..91e85c36 100644
--- a/src/tests/rtstutter.c
+++ b/src/tests/rtstutter.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
@@ -75,7 +73,7 @@ static void* work(void *p) {
end.tv_sec += nsec / PA_NSEC_PER_SEC;
end.tv_nsec += nsec % PA_NSEC_PER_SEC;
- while (end.tv_nsec > PA_NSEC_PER_SEC) {
+ while ((pa_usec_t) end.tv_nsec > PA_NSEC_PER_SEC) {
end.tv_sec++;
end.tv_nsec -= PA_NSEC_PER_SEC;
}
diff --git a/src/tests/sig2str-test.c b/src/tests/sig2str-test.c
index 52cb9db4..d64a8902 100644
--- a/src/tests/sig2str-test.c
+++ b/src/tests/sig2str-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/smoother-test.c b/src/tests/smoother-test.c
index de037724..b78f3c91 100644
--- a/src/tests/smoother-test.c
+++ b/src/tests/smoother-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/stripnul.c b/src/tests/stripnul.c
index 2f87e877..0ab06776 100644
--- a/src/tests/stripnul.c
+++ b/src/tests/stripnul.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/sync-playback.c b/src/tests/sync-playback.c
index 63510eb6..7ab3a25c 100644
--- a/src/tests/sync-playback.c
+++ b/src/tests/sync-playback.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/thread-mainloop-test.c b/src/tests/thread-mainloop-test.c
index ac6d5049..7a62f85a 100644
--- a/src/tests/thread-mainloop-test.c
+++ b/src/tests/thread-mainloop-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/thread-test.c b/src/tests/thread-test.c
index 72dde6cb..f29b5e71 100644
--- a/src/tests/thread-test.c
+++ b/src/tests/thread-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
diff --git a/src/tests/utf8-test.c b/src/tests/utf8-test.c
index b9594dcc..f1708ad4 100644
--- a/src/tests/utf8-test.c
+++ b/src/tests/utf8-test.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
#include <stdio.h>
#include <assert.h>
diff --git a/src/tests/voltest.c b/src/tests/voltest.c
index 91752ad9..d2c0ff69 100644
--- a/src/tests/voltest.c
+++ b/src/tests/voltest.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
#include <stdio.h>
#include <pulse/volume.h>