Skip to content

Commit

Permalink
Merge branch 'master' into bleeding
Browse files Browse the repository at this point in the history
  • Loading branch information
Snaipe committed Nov 5, 2018
2 parents f36ffd9 + a64b860 commit 982e569
Show file tree
Hide file tree
Showing 21 changed files with 102 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.3.2
current_version = 2.3.3
commit = False
parse = ^
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+) # minimum 'N.N.N'
Expand Down
2 changes: 1 addition & 1 deletion .cmake/Modules/Properties.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the LICENSE file distributed with Criterion.

set (PROJECT_VERSION "2.3.2")
set (PROJECT_VERSION "2.3.3")
set (PROJECT_SOVERSION 3)
set (PROJECT_SONAME 3.1.0)

Expand Down
2 changes: 1 addition & 1 deletion .cmake/copy-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ add_to_sources() {
add_to_sources https://github.com/Snaipe/libcsptr dependencies/libcsptr 0d52904
add_to_sources https://github.com/Snaipe/dyncall dependencies/dyncall 51e79a8
add_to_sources https://github.com/nanomsg/nanomsg dependencies/nanomsg 7e12a20
add_to_sources https://github.com/diacritic/BoxFort dependencies/boxfort 7ed0cf2
add_to_sources https://github.com/diacritic/BoxFort dependencies/boxfort 926bd4c
)
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ cr_add_subproject (nanomsg
)

cr_add_subproject (boxfort PATH dependencies/boxfort
GIT "https://github.com/diacritic/BoxFort.git#481cad1"
GIT "https://github.com/diacritic/BoxFort.git#926bd4c"
PATH dependencies/boxfort
OPTS
-DBXF_TESTS=OFF
Expand Down
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2018-11-05 Franklin "Snaipe" Mathieu <franklinmathieu@gmail.com>

* criterion: version 2.3.3
* Fix: Clang 5.0.x was producing test executables that caused Criterion to
fork-bomb the host system. The issue has been fixed, and Criterion
now pro-actively aborts itself if it detects a fork-bomb loop to avoid
similar issues in the future.

The full git changelog may be accessed with `git log v2.3.2..v2.3.3`.

2017-04-08 Franklin "Snaipe" Mathieu <franklinmathieu@gmail.com>

* criterion: version 2.3.2
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2.3.2_b{build}-{branch}
version: 2.3.3_b{build}-{branch}

os: Visual Studio 2015

Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def generate_doxygen_xml(app):
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = '2.3.2'
release = '2.3.3'
# The short X.Y version.
version = re.search(r'\d+\.\d+', release).group(0)

Expand Down
13 changes: 13 additions & 0 deletions src/core/runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ void disable_unmatching(struct criterion_test_set *set)

CR_API struct criterion_test_set *criterion_initialize(void)
{
/* make sure we don't re-enter from a test worker. See #247. */
if (getenv("BXFI_MAP")) {
cr_panic("Re-entering criterion from a test worker. This is a "
"catastrophic bug, please report it on the issue tracker.\n"
"Bailing out to avoid fork-bombing the system.");
}

init_i18n();

#ifndef ENABLE_VALGRIND_ERRORS
Expand Down Expand Up @@ -364,6 +371,12 @@ static int criterion_run_all_tests_impl(struct criterion_test_set *set)

CR_API int criterion_run_all_tests(struct criterion_test_set *set)
{
/* make sure we don't re-enter from a test worker. See #247. */
if (getenv("BXFI_MAP")) {
cr_panic("Re-entering criterion from a test worker. This is a "
"catastrophic bug, please report it on the issue tracker.\n"
"Bailing out to avoid fork-bombing the system.");
}
#ifndef ENABLE_VALGRIND_ERRORS
VALGRIND_DISABLE_ERROR_REPORTING;
#endif
Expand Down
12 changes: 6 additions & 6 deletions test/cram/core.t
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Checking the version

$ simple.c.bin --version
Tests compiled with Criterion v2.3.2
Tests compiled with Criterion v2.3.3

$ simple.cc.bin --version
Tests compiled with Criterion v2.3.2
Tests compiled with Criterion v2.3.3

Running the simplest test

Expand All @@ -27,7 +27,7 @@ Running the simplest test
Running with verbose output

$ simple.c.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 2 tests from misc:
[RUN ] misc::failing
[----] simple.c:4: Assertion Failed
Expand All @@ -40,7 +40,7 @@ Running with verbose output
[====] Synthesis: Tested: 2 | Passing: 1 | Failing: 1 | Crashing: 0

$ simple.cc.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 2 tests from misc:
[RUN ] misc::failing
[----] simple.cc:4: Assertion Failed
Expand Down Expand Up @@ -79,7 +79,7 @@ Testing the fixtures
Testing descriptions

$ description.c.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 2 tests from misc:
[RUN ] misc::failing
[----] Just a failing test
Expand All @@ -93,7 +93,7 @@ Testing descriptions
[====] Synthesis: Tested: 1 | Passing: 0 | Failing: 1 | Crashing: 0

$ description.cc.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 2 tests from misc:
[RUN ] misc::failing
[----] Just a failing test
Expand Down
10 changes: 5 additions & 5 deletions test/cram/crashes.t
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Simple crashes & signal testing
Simple crashes & signal testing (verbose)

$ signal.c.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 3 tests from simple:
[RUN ] simple::caught
[PASS] simple::caught
Expand All @@ -27,7 +27,7 @@ Simple crashes & signal testing (verbose)
[====] Synthesis: Tested: 3 | Passing: 1 | Failing: 2 | Crashing: 1

$ signal.cc.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 3 tests from simple:
[RUN ] simple::caught
[PASS] simple::caught
Expand All @@ -53,7 +53,7 @@ Crashes outside of the test
Crashes outside of the test (verbose)

$ other-crashes.c.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 2 tests from misc:
[RUN ] misc::setup_crash
[----] Warning! The test `misc::setup_crash` crashed during its setup or teardown.
Expand All @@ -63,7 +63,7 @@ Crashes outside of the test (verbose)
[====] Synthesis: Tested: 2 | Passing: 1 | Failing: 1 | Crashing: 1

$ other-crashes.cc.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 2 tests from misc:
[RUN ] misc::setup_crash
[----] Warning! The test `misc::setup_crash` crashed during its setup or teardown.
Expand All @@ -90,7 +90,7 @@ C++ Exceptions should be handled
C++ Exceptions should be handled (verbose)

$ exception.cc.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 6 tests from exception:
[RUN ] exception::raise_any
[----] exception::raise_any: Caught some unexpected exception during the test execution.
Expand Down
4 changes: 2 additions & 2 deletions test/cram/exit.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Testing tests that call exit()

$ exit.c.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 3 tests from exit:
[RUN ] exit::expected_exit
[PASS] exit::expected_exit
Expand All @@ -18,7 +18,7 @@ Testing tests that call exit()
[====] Synthesis: Tested: 5 | Passing: 3 | Failing: 2 | Crashing: 1

$ exit.cc.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 3 tests from exit:
[RUN ] exit::expected_exit
[PASS] exit::expected_exit
Expand Down
4 changes: 2 additions & 2 deletions test/cram/fail-fast.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Testing --fail-fast

$ simple.c.bin --fail-fast --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 2 tests from misc:
[RUN ] misc::failing
[----] simple.c:4: Assertion Failed
Expand All @@ -15,7 +15,7 @@ Testing --fail-fast
Testing CRITERION_FAIL_FAST

$ CRITERION_FAIL_FAST=1 simple.c.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 2 tests from misc:
[RUN ] misc::failing
[----] simple.c:4: Assertion Failed
Expand Down
6 changes: 3 additions & 3 deletions test/cram/help.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Display the help message

$ simple.c.bin --help
Tests compiled with Criterion v2.3.2
Tests compiled with Criterion v2.3.3

usage: .*simple\.c\.bin(\.exe)? OPTIONS (re)
options:
Expand Down Expand Up @@ -29,7 +29,7 @@ Display the help message
-OP:F or --output=PROVIDER=FILE: write test report to FILE using the specified provider
$ simple.cc.bin --help
Tests compiled with Criterion v2.3.2
Tests compiled with Criterion v2.3.3
usage: .*simple\.cc\.bin(\.exe)? OPTIONS (re)
options:
Expand Down Expand Up @@ -60,7 +60,7 @@ Display usage on invalid CLI flags

$ simple.c.bin --an-invalid-option
.*simple\.c\.bin(\.exe)?: (unknown|unrecognized) option [`'"]?-- ?an-invalid-option['"]? (re)
Tests compiled with Criterion v2.3.2
Tests compiled with Criterion v2.3.3
usage: .*simple\.c\.bin(\.exe)? OPTIONS (re)
options:
Expand Down
18 changes: 9 additions & 9 deletions test/cram/json.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Testing multiple samples with --json

$ simple.c.bin --json
{
"id": "Criterion v2.3.2",
"id": "Criterion v2.3.3",
"passed": 1,
"failed": 1,
"errored": 0,
Expand Down Expand Up @@ -35,7 +35,7 @@ Testing multiple samples with --json

$ signal.c.bin --json
{
"id": "Criterion v2.3.2",
"id": "Criterion v2.3.3",
"passed": 1,
"failed": 2,
"errored": 1,
Expand Down Expand Up @@ -74,7 +74,7 @@ Testing multiple samples with --json

$ asserts.c.bin --json
{
"id": "Criterion v2.3.2",
"id": "Criterion v2.3.3",
"passed": 6,
"failed": 2,
"errored": 0,
Expand Down Expand Up @@ -142,7 +142,7 @@ Testing multiple samples with --json

$ more-suites.c.bin --json
{
"id": "Criterion v2.3.2",
"id": "Criterion v2.3.3",
"passed": 2,
"failed": 0,
"errored": 0,
Expand Down Expand Up @@ -196,7 +196,7 @@ Testing multiple samples with --json

$ long-messages.c.bin --json
{
"id": "Criterion v2.3.2",
"id": "Criterion v2.3.3",
"passed": 0,
"failed": 1,
"errored": 0,
Expand Down Expand Up @@ -227,7 +227,7 @@ Testing multiple samples with --json

$ description.c.bin --json
{
"id": "Criterion v2.3.2",
"id": "Criterion v2.3.3",
"passed": 0,
"failed": 1,
"errored": 0,
Expand Down Expand Up @@ -263,7 +263,7 @@ Testing --output=json

$ simple.c.bin --output=json:-
{
"id": "Criterion v2.3.2",
"id": "Criterion v2.3.3",
"passed": 1,
"failed": 1,
"errored": 0,
Expand Down Expand Up @@ -298,7 +298,7 @@ Testing CRITERION_OUTPUTS

$ CRITERION_OUTPUTS=json:- simple.c.bin
{
"id": "Criterion v2.3.2",
"id": "Criterion v2.3.3",
"passed": 1,
"failed": 1,
"errored": 0,
Expand Down Expand Up @@ -331,7 +331,7 @@ Testing CRITERION_OUTPUTS

$ skip.c.bin --json
{
"id": "Criterion v2.3.2",
"id": "Criterion v2.3.3",
"passed": 0,
"failed": 0,
"errored": 0,
Expand Down
4 changes: 2 additions & 2 deletions test/cram/log.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Testing log messages

$ log.c.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 2 tests from logging:
[RUN ] logging::format
[----] Log messages are printf-formatted strings.
Expand All @@ -14,7 +14,7 @@ Testing log messages
[====] Synthesis: Tested: 2 | Passing: 2 | Failing: 0 | Crashing: 0

$ log.cc.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 1 test from logging:
[RUN ] logging::stream
[----] This is an informational message. They are not displayed by default.
Expand Down
4 changes: 2 additions & 2 deletions test/cram/parameterized.t
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Using parameterized tests
Using parameterized tests (verbose)

$ parameterized.c.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 4 tests from params:
[RUN ] params::cleanup
[----] parameterized.c:79: Assertion Failed
Expand Down Expand Up @@ -190,7 +190,7 @@ Using parameterized tests (verbose)
[====] Synthesis: Tested: 11 | Passing: 0 | Failing: 11 | Crashing: 0

$ parameterized.cc.bin --verbose
[----] Criterion v2.3.2
[----] Criterion v2.3.3
[====] Running 4 tests from params:
[RUN ] params::cleanup
[----] parameterized.cc:72: Assertion Failed
Expand Down
Loading

0 comments on commit 982e569

Please sign in to comment.