wazuh / wazuh-qa

Wazuh - Quality Assurance
GNU General Public License v2.0
65 stars 32 forks source link

Add integration test to check Valgrind memory report on FIM #713

Closed jesusjimsa closed 1 year ago

jesusjimsa commented 4 years ago

Description

The test must execute Valgrind on the ossec-syscheckd executable to check that there are no memory leaks or segmentation faults. When running Valgrind, all the possible operations must be performed but the test doesn't have to check that these operations are performed correctly, only the memory is being tested. The goal is to test as much code as possible.

This test is part of tier 2.

Valgrind output example

For the test to pass, Valgrind output should look like this:

==26625== LEAK SUMMARY:
==26625==    definitely lost: 0 bytes in 0 blocks
==26625==    indirectly lost: 0 bytes in 0 blocks
==26625==      possibly lost: 0 bytes in 0 blocks
==26625==    still reachable: 11,089 bytes in 41 blocks
==26625==         suppressed: 0 bytes in 0 blocks
==26625== Reachable blocks (those to which a pointer was found) are not shown.
==26625== To see them, rerun with: --leak-check=full --show-leak-kinds=all

Platforms

jesusjimsa commented 4 years ago

Cases to test

All cases must be tested in scheduled, realtime and whodata except when otherwise stated. Again, no correctness is being tested, only memory.

Examples of configuration

jesusjimsa commented 4 years ago

Synchronization must also be performed in, at least, one case and database partition. For database partition, the test needs to create enough files.