Ken Steele
8f1d75039a
Enforce function coding standard
...
Functions should be defined as:
int foo(void)
{
}
Rather than:
int food(void) {
}
All functions where changed by a script to match this standard.
11 years ago
Eric Leblond
e176be6fcc
Use unlikely for error treatment.
...
When handling error case on SCMallog, SCCalloc or SCStrdup
we are in an unlikely case. This patch adds the unlikely()
expression to indicate this to gcc.
This patch has been obtained via coccinelle. The transformation
is the following:
@istested@
identifier x;
statement S1;
identifier func =~ "(SCMalloc|SCStrdup|SCCalloc)";
@@
x = func(...)
... when != x
- if (x == NULL) S1
+ if (unlikely(x == NULL)) S1
13 years ago
Nikolay Denev
139768dd58
Do not use underscored config vars internally.
14 years ago
Victor Julien
1df3304655
Clean up for unittests code: only compile unittest api code when unittests are enabled. Fix unittest code that wasn't wrapped in the proper UNITTESTS ifdefs.
14 years ago
Anoop Saldanha
229f7281ea
list runmodes. Allow specification of runmode id from cof file. Also allow for command line override
15 years ago
Gerardo Iglesias Galvan
9f4fae5b1a
Fix inconsistent use of dynamic memory allocation
15 years ago
William Metcalf
ce01927515
Import of GPLv2 Header 050410
15 years ago
Pablo Rincon
25a3a5c6d8
Adding mem wrapper to debug runtime alloc()/free() functions. Fixing some memory leaks.
16 years ago
Victor Julien
ecf86f9c23
Rename to Suricata.
16 years ago
Gerardo Iglesias Galvan
b254719ffc
Add fatal failures on unittest and siginit failure (using Conf API)
16 years ago
Victor Julien
5c3bbb8d61
Time handling: improve time handling in unittests
...
- make sure before each unittest is run the time is reset
- add functions to set the time to current time and increment the time
- convert alert-unified* Rotate tests to use them
- convert time based counters to use them
- use GetTime instead of gettimeofday for creating the unified* filenames
16 years ago
William Metcalf
4175206417
unittest regex changes and fixes
16 years ago
Breno Silva
8f8de0e56f
Unit test 60c fix
16 years ago
Jason Ish
097a77e9fd
Bug 6
...
Add a new command line option, --list-unittests to list all registered unit tests then exit. If -U is supplied, the regex will be respected.
16 years ago
Breno Silva
c43319c337
Regular expression for UnitTests
...
Signed-off-by: Brian Rectanus <brectanu@gmail.com>
16 years ago
Victor Julien
0d0ffb9963
Reorganize header inclusions.
16 years ago
Victor Julien
85abc3ef62
Complete removal of global de_ctx. UtRuntests now returns the number of failed tests or 0 on none. Program exits with code 1 on failed tests, code 0 otherwise. Removal of broken http uri test.
16 years ago
Brian Rectanus
fa5939ca91
64 bit cleanup part2
16 years ago
Victor Julien
689bbfdc45
Rename all structure definitions in the "typedef struct _SomeStruct" format to "typedef struct SomeStruct_" to make the Doxygen output more useful.
...
Remove the Trie multi pattern matcher code. It wasn't used anymore.
16 years ago
Victor Julien
8397413942
Comment updates.
16 years ago
Victor Julien
a798f84bf5
Add simple test report to unittesting.
16 years ago
Victor Julien
bab4b62376
Initial add of the files.
16 years ago