If open_module_map encounters an error, open_module_self would return 0
while leaving the file descriptor open. Since close_module does not
validate the state of the mod_handle, callers can't know whether to call
close_module when this occurs.
Resolve this by closing the file descriptor before returning so that
mod_handle is never partially open.
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
Commit a3df2ab abstracted the section handling into several functions.
For ELF, the newly created open_module_self opens a file descriptor to
the executable file which should be closed from close_module. The
close_module call is missing in report.c and runner.c, causing EMFILE
errors during test runs when the available file descriptors are
exhausted. This commit fixes the issue.
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
criterion_options.debug was not set if no argument was given. According
to the docs the native debugger should used, so this member has to be
set to CR_DBG_NATIVE
Added cr_skip_test to skip a test during runtime. Also merged the old
disable system with the new one. All skipped tests are printed by
normal_log_post_suite(), so there is no need for a logger function for
runtime skipepd tests.
Fixes#131.
If ${CMAKE_INSTALL_PREFIX} is mentioned explicitly in the install() command,
the generated cmake_install.cmake file will contain a hard-coded value.
This can cause installation errors during debian package generation, since
the 'cmake -DCMAKE_INSTALL_PREFIX=../debian/tmp/usr -P cmake_install.cmake'
command is used in debian/rules (this command overrides CMAKE_INSTALL_PREFIX).
Signed-off-by: László Várady <laszlo.varady@balabit.com>
Before this change, an exit_code of 0 would allow a test to pass for any
exit status, because checking for 0 meant that the value was optional
and people did not care.
However, the semantics of exit() tells that 0 shall be synonymous of
success, and allowing a nonzero status to pass the test is unexpected.
This fixes issue #137.