Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unittest os regex #139

Merged
merged 5 commits into from
Mar 13, 2014
Merged

Unittest os regex #139

merged 5 commits into from
Mar 13, 2014

Conversation

jrossi
Copy link
Member

@jrossi jrossi commented Mar 12, 2014

Basic import of os_regex/example/tests into check unit test setup start by @cgzones. This will test OS_Match2 and OS_Regex

@jrossi jrossi added this to the ossec-hids-2.8 milestone Mar 12, 2014
@jrossi
Copy link
Member Author

jrossi commented Mar 12, 2014

This is weird i am get different on my laptop:

./test_os_zlib
Running suite(s): os_zlib
100%: Checks: 9, Failures: 0, Errors: 0
./test_os_regex
Running suite(s): os_regex
100%: Checks: 4, Failures: 0, Errors: 0

@cgzones
Copy link
Contributor

cgzones commented Mar 13, 2014

hi, you forgot to null-terminate the test arrays (thanks to valgrind and -g -O0)

{"^\\S+ [(\\d+:\\d+:\\d+)] \\.+ (\\d+.\\d+.\\d+.\\d+)\\p*\\d* -> (\\d+.\\d+.\\d+.\\d+)\\p*", "snort: [1:590:12] RPC portmap ypserv request UDP [Classification: Decode of an RPC Query] [Priority: 2]: {UDP} 10.4.11.94:669 -> 10.4.3.20:111", ""},
{"^\\S+ [(\\d+:\\d+:\\d+)] \\.+ (\\d+.\\d+.\\d+.\\d+)\\p*\\d* -> (\\d+.\\d+.\\d+.\\d+)\\p*", "snort: [1:590:12] RPC portmap ypserv request UDP [Classification: Decode of an RPC Query] [Priority: 2]: {UDP} 10.4.11.94:670 -> 10.4.3.20:111", ""},
{"^\\S+ [(\\d+:\\d+:\\d+)] \\.+ (\\d+.\\d+.\\d+.\\d+)\\p*\\d* -> (\\d+.\\d+.\\d+.\\d+)\\p*", "snort: [1:1421:11] SNMP AgentX/tcp request [Classification: Attempted Information Leak] [Priority: 2]: {TCP} 10.4.12.26:37020 -> 10.4.10.231:705", ""}
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here

@jrossi
Copy link
Member Author

jrossi commented Mar 13, 2014

Thank you much - Should have seen that ;) thanks again

@jrossi
Copy link
Member Author

jrossi commented Mar 13, 2014

@ossec tests work now. Thanks again @cgzones

ddpbsd added a commit that referenced this pull request Mar 13, 2014
@ddpbsd ddpbsd merged commit 27a2504 into ossec:master Mar 13, 2014
@jrossi jrossi deleted the unittest-os_regex branch October 20, 2014 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants