projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 2.6.0p2
[debian/amanda]
/
device-src
/
tests
/
semaphore-test.c
diff --git
a/device-src/tests/semaphore-test.c
b/device-src/tests/semaphore-test.c
index cdfac17d66b4defac788fe1bae4758a131fca072..2e523c73ab9474bb0665bafb4397e20173567bb2 100644
(file)
--- a/
device-src/tests/semaphore-test.c
+++ b/
device-src/tests/semaphore-test.c
@@
-20,6
+20,7
@@
#include "semaphore.h"
#include "amanda.h"
#include "semaphore.h"
#include "amanda.h"
+#include "util.h"
/*
* test that decrement waits properly
/*
* test that decrement waits properly
@@
-49,12
+50,11
@@
static gboolean
test_decr_wait(void)
{
GThread *th;
test_decr_wait(void)
{
GThread *th;
- struct test_decr_wait_data data = {
- semaphore_new_with_value(10),
- FALSE
- };
+ struct test_decr_wait_data data = { NULL, FALSE };
int rv;
int rv;
+ data.sem = semaphore_new_with_value(10),
+
/* die after 10 seconds (default signal disposition is to fail) */
alarm(10);
/* die after 10 seconds (default signal disposition is to fail) */
alarm(10);
@@
-254,7
+254,7
@@
main(void)
gboolean pass = TRUE;
#if defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE)
gboolean pass = TRUE;
#if defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE)
- amanda_thread_init(
NULL
);
+ amanda_thread_init();
pass = test_decr_wait() && pass;
pass = test_wait_empty() && pass;
pass = test_decr_wait() && pass;
pass = test_wait_empty() && pass;