... | ... |
@@ -31,6 +31,7 @@ |
31 | 31 |
#include <check.h> |
32 | 32 |
#include <fcntl.h> |
33 | 33 |
#include <ctype.h> |
34 |
+#include <errno.h> |
|
34 | 35 |
#include "../libclamav/clamav.h" |
35 | 36 |
#include "../libclamav/others.h" |
36 | 37 |
#include "../libclamav/dconf.h" |
... | ... |
@@ -207,11 +208,12 @@ static char *tmpdir = NULL; |
207 | 207 |
|
208 | 208 |
static void jstest_setup(void) |
209 | 209 |
{ |
210 |
+ cl_init(CL_INIT_DEFAULT); |
|
210 | 211 |
state = cli_js_init(); |
211 | 212 |
fail_unless(!!state, "js init"); |
212 | 213 |
tmpdir = cli_gentemp(NULL); |
213 | 214 |
fail_unless(!!tmpdir,"js tmp dir"); |
214 |
- fail_unless(mkdir(tmpdir, 0700) == 0, "tempdir mkdir"); |
|
215 |
+ fail_unless_fmt(mkdir(tmpdir, 0700) == 0, "tempdir mkdir of %s failed: %s", tmpdir, strerror(errno)); |
|
215 | 216 |
} |
216 | 217 |
|
217 | 218 |
static void jstest_teardown(void) |