git-svn: trunk@4902
Török Edvin authored on 2009/03/06 18:09:06... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Fri Mar 6 11:09:01 EET 2009 (edwin) |
|
2 |
+------------------------------------ |
|
3 |
+ * unit_tests/check_regex.c: fix make check. Buildbot didn't detect |
|
4 |
+ compile failure in make check. |
|
5 |
+ |
|
1 | 6 |
Thu Mar 5 20:10:00 CET 2009 (tk) |
2 | 7 |
--------------------------------- |
3 | 8 |
* libclamav: count .pdb entries as signatures |
... | ... |
@@ -284,6 +284,8 @@ static void psetup_impl(int load2) |
284 | 284 |
{ |
285 | 285 |
FILE *f; |
286 | 286 |
int rc; |
287 |
+ unsigned signo=0; |
|
288 |
+ |
|
287 | 289 |
engine = cl_engine_new(); |
288 | 290 |
fail_unless(!!engine , "cl_engine_new"); |
289 | 291 |
|
... | ... |
@@ -296,17 +298,22 @@ static void psetup_impl(int load2) |
296 | 296 |
f = fdopen(open_testfile("input/daily.pdb"),"r"); |
297 | 297 |
fail_unless(!!f, "fopen daily.pdb"); |
298 | 298 |
|
299 |
- rc = load_regex_matcher(engine->domainlist_matcher, f, 0, 0, NULL); |
|
299 |
+ rc = load_regex_matcher(engine->domainlist_matcher, f, &signo, 0, 0, NULL); |
|
300 | 300 |
fail_unless(rc == 0, "load_regex_matcher"); |
301 | 301 |
fclose(f); |
302 | 302 |
|
303 |
+ fail_unless_fmt(signo == 201, "Incorrect number of signatures: %u, expected %u", signo, 201); |
|
304 |
+ |
|
303 | 305 |
if(load2) { |
304 | 306 |
f = fdopen(open_testfile("input/daily.pdb2"),"r"); |
305 | 307 |
fail_unless(!!f, "fopen daily.pdb2"); |
306 | 308 |
|
307 |
- rc = load_regex_matcher(engine->domainlist_matcher, f, 0, 0, NULL); |
|
309 |
+ signo = 0; |
|
310 |
+ rc = load_regex_matcher(engine->domainlist_matcher, f, &signo, 0, 0, NULL); |
|
308 | 311 |
fail_unless(rc == 0, "load_regex_matcher"); |
309 | 312 |
fclose(f); |
313 |
+ |
|
314 |
+ fail_unless_fmt(signo == 2, "Incorrect number of signatures: %u, expected %u", signo, 2); |
|
310 | 315 |
} |
311 | 316 |
loaded_2 = load2; |
312 | 317 |
|
... | ... |
@@ -314,10 +321,13 @@ static void psetup_impl(int load2) |
314 | 314 |
fail_unless(rc == 0,"init_whitelist"); |
315 | 315 |
|
316 | 316 |
f = fdopen(open_testfile("input/daily.wdb"),"r"); |
317 |
- rc = load_regex_matcher(engine->whitelist_matcher, f, 0, 1, NULL); |
|
317 |
+ signo = 0; |
|
318 |
+ rc = load_regex_matcher(engine->whitelist_matcher, f, &signo, 0, 1, NULL); |
|
318 | 319 |
fail_unless(rc == 0,"load_regex_matcher"); |
319 | 320 |
fclose(f); |
320 | 321 |
|
322 |
+ fail_unless_fmt(signo == 31, "Incorrect number of signatures: %u, expected %u", signo, 31); |
|
323 |
+ |
|
321 | 324 |
rc = cli_build_regex_list(engine->whitelist_matcher); |
322 | 325 |
fail_unless(rc == 0,"cli_build_regex_list"); |
323 | 326 |
|