fix build with old versions of check

git-svn: trunk@4863
remotes/push_mirror/0.95
Török Edvin 16 years ago
parent f97a9ad7fe
commit 7bb82e6cec
  1. 4
      ChangeLog
  2. 7
      unit_tests/check_clamd.c

@ -1,3 +1,7 @@
Wed Feb 25 22:01:53 EET 2009 (edwin)
------------------------------------
* unit_tests/check_clamd.c: fix build with old versions of check
Wed Feb 25 18:17:03 CET 2009 (acab)
-----------------------------------
* clamd, clamav-milter: unify default max stream sizes

@ -22,7 +22,6 @@
#if HAVE_CONFIG_H
#include "clamav-config.h"
#endif
#include "shared/fdpassing.h"
#include <arpa/inet.h>
#include <netinet/in.h>
@ -233,6 +232,7 @@ static void test_command(const char *cmd, size_t len, const char *extra, const c
free(recvdata);
}
#ifdef CHECK_HAVE_LOOPS
START_TEST (test_basic_commands)
{
struct basic_test *test = &basic_tests[_i];
@ -289,6 +289,7 @@ START_TEST (test_compat_commands)
}
}
END_TEST
#endif
#define EXPECT_INSTREAM "stream: ClamAV-Test-File.UNOFFICIAL FOUND\n"
@ -456,6 +457,7 @@ static struct cmds {
{"zFILDES", '\0', CLEANFILE, CLEANFDREPLY}
};
#ifdef CHECK_HAVE_LOOPS
START_TEST (test_fildes)
{
char nreply[BUFSIZ], nsend[BUFSIZ];
@ -502,6 +504,7 @@ START_TEST (test_fildes)
}
}
END_TEST
#endif
START_TEST (test_fildes_many)
{
@ -701,9 +704,11 @@ static Suite *test_clamd_suite(void)
tc_commands = tcase_create("clamd commands");
suite_add_tcase(s, tc_commands);
tcase_add_unchecked_fixture(tc_commands, commands_setup, commands_teardown);
#ifdef CHECK_HAVE_LOOPS
tcase_add_loop_test(tc_commands, test_basic_commands, 0, sizeof(basic_tests)/sizeof(basic_tests[0]));
tcase_add_loop_test(tc_commands, test_compat_commands, 0, sizeof(basic_tests)/sizeof(basic_tests[0]));
tcase_add_loop_test(tc_commands, test_fildes, 0, 4*sizeof(fildes_cmds)/sizeof(fildes_cmds[0]));
#endif
tcase_add_test(tc_commands, test_stats);
tcase_add_test(tc_commands, test_instream);
tcase_add_test(tc_commands, test_stream);

Loading…
Cancel
Save