Commit graph

438 commits

Author SHA1 Message Date
Snaipe
56c5fea2fc debug: Fixed debugger value passed to boxfort 2016-09-16 17:28:09 +02:00
Snaipe
66556c8cdb debug: Added support for --debug=idle. Fixes #154. 2016-09-16 17:15:47 +02:00
Snaipe
0507dfcf50 licence: Added missing license header on io/output.c 2016-09-14 11:50:15 +02:00
Snaipe
301d143ea4 elf,section: Fixed section code interpreting all empty names as the current executable
This was causing crashes with eglibc which visits the loaded vdso with
an empty dlpi_name.
2016-09-14 01:23:08 +02:00
Snaipe
c48ffae4de mach-o,section: Fixed compilation errors 2016-09-14 00:47:29 +02:00
Snaipe
1c11db55ae section: Added deep section inspection.
This allows loaded dynamic libraries to further provide default hooks,
suites, or even tests.

Fixes #160.
2016-09-13 23:35:57 +02:00
Kevin Locke
ba2c09e192 section: Close FD in open_module_self on error
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>
2016-09-12 21:03:30 -06:00
Kevin Locke
7581417dfa section: Call close_module for open_module_self
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>
2016-09-12 20:53:08 -06:00
Snaipe
696e648efe i18n: Fixed remaining positional arguments in non-localized strings 2016-09-10 13:03:27 +02:00
Snaipe
ca965d3db9 section,elf: Fixed missing ElfW definition on FreeBSD. Fixes #156 2016-09-10 08:47:24 +02:00
ailu
1e28ad1277 fix: set criterion_options.debug to CR_DBG_NATIVE
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
2016-09-06 22:01:03 +02:00
Snaipe
c5bfe03733 section: Resolve /proc/self/exe for compatibility with introspection tools like valgrind 2016-09-06 20:03:36 +02:00
Snaipe
d83dbb60cf Revert "cmake: Build libcriterion.so as an executable PIE"
This reverts commit 8959dfa83f.
2016-09-06 18:23:04 +02:00
Snaipe
8959dfa83f cmake: Build libcriterion.so as an executable PIE 2016-09-06 18:02:38 +02:00
Snaipe
d2a4124b87 style: Added and enforce uncrustify config 2016-09-05 21:32:57 +02:00
Snaipe
ec7cbe2a18 style: disable indent for delicate places 2016-09-05 20:45:46 +02:00
Snaipe
f72ffff3ca style: ignore style for coroutine macros 2016-09-05 15:12:25 +02:00
Snaipe
033bac0c5e style: disable indent for delicate places 2016-09-05 14:36:00 +02:00
Snaipe
bd4760582f timeout: Fixed --timeout always overriding 2016-09-05 10:20:23 +02:00
ailu
91250fed74 Fixed output of skipped tests 2016-09-05 10:04:10 +02:00
Snaipe
205b9a4444 cmake: Cleaned up definitions and default flags a bit 2016-09-04 22:21:20 +02:00
Snaipe
4e1a877c66 cli: Added --timeout flag 2016-09-04 21:06:25 +02:00
Snaipe
e7ab23d67a style: removed extra semicolons 2016-09-04 20:50:58 +02:00
Snaipe
da7df99bff cli: Fixed unused variable error 2016-09-04 11:25:41 +02:00
Snaipe
24f0d34eda cli: Fixed leak with dbg parameter parsing 2016-09-04 11:10:40 +02:00
Snaipe
0a0574cb59 cli: Fixed handling of bad arguments 2016-09-04 11:08:39 +02:00
Snaipe
f0cfc6d18d cli: Fixed parsing for --debug-transport 2016-09-04 11:08:10 +02:00
Snaipe
7aa0b1c5ce runtime: Fixed timestamps not being reported. Fixes #116 2016-09-04 10:38:05 +02:00
ailu
7143118b5c api: added cr_skip_test()
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.
2016-09-03 23:06:35 +02:00
Snaipe
a3df2ab9a4 section: introspect sections without linker extensions. Fixes #91 2016-09-03 21:55:32 +02:00
Snaipe
32fea80b7d api: Don't use free directly with cr_asprintf. Fixes #87 2016-09-03 08:33:34 -07:00
Snaipe
a4ad3084a9 options: Deprecate no-early-exit 2016-09-03 16:05:53 +02:00
Snaipe
37da81191a msvc,valgrind: Don't include valgrind.h on any other compiler than __GNUC__ 2016-09-03 15:29:26 +02:00
Snaipe
df5ed94654 help: Added usage for --debug and --debug-transport 2016-09-03 15:14:06 +02:00
Snaipe
4606ceb415 cli: renamed --pattern to --filter 2016-09-03 15:14:06 +02:00
Snaipe
aa9b2aa915 cli: Added --debug. Fixes #85. 2016-09-03 15:14:06 +02:00
Snaipe
14f7f60ce7 memcheck: Fixed client & runner leaks 2016-09-03 15:12:28 +02:00
Snaipe
e0a38e1ab9 runner: Do not serialize null function pointers 2016-09-03 15:12:28 +02:00
Snaipe
22ea04f778 runner: Fixed test context not being properly serialized 2016-09-03 15:12:28 +02:00
Snaipe
dc5248d49c boxfort: Initial integration 2016-09-03 15:12:28 +02:00
Snaipe
0690da5ec6 jobs,windows: Temporarily disable multiple jobs as a workaround for #118 2016-09-03 14:48:01 +02:00
Snaipe
525f2e0ce0 api: Fixed APIs exports. Fixes #145. 2016-08-31 16:56:47 +02:00
Snaipe
805005a5e8 kill: Fixed kill not being available on some builds 2016-08-26 13:54:17 +02:00
Snaipe
595b4601a7 mockfile: Test for features rather than platform 2016-08-26 13:25:05 +02:00
Snaipe
4f5b85d08c compat: Fixed header inclusion for musl compatibility 2016-08-26 09:50:20 +02:00
a1lu
5ff8ef9a5c improve #139: added --crash for cr_expect (#144) 2016-08-23 13:48:53 +02:00
a1lu
25d444b1b9 cli: Added --crash cli option (#126) (#139)
If a assert fails and --crash is given, the debugger will trapped in
this assert using debugbreak.h from the new debugbreak submodule.
2016-08-22 10:17:55 +02:00
László Várady
0c715b46c6 pkgconfig: fix the installation path of criterion.pc (#140)
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>
2016-08-09 17:31:19 +02:00
Snaipe
9fbd28bf69 core: .exit_code = 0 now enforces the test exit status to be 0.
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.
2016-07-28 18:11:45 +02:00
Snaipe
da60498f38 i18n: removed unnecessary N_ on non-nls string 2016-07-24 17:12:21 +02:00