summaryrefslogtreecommitdiff
path: root/src/mongo/unittest/death_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* SERVER-77193 Centralize the macro definition of __has_feature into one placeMark Benvenuto2023-05-171-3/+1
|
* SERVER-72197 Run clang-format 12.0.1 on the codebaseclang-format 12.0.12023-02-111-4/+12
| | | | Signed-off-by: Ryan Egesdahl <ryan.egesdahl@mongodb.com>
* SERVER-72935 switch c stdlib headers to cpp compat stdlib headersDaniel Moody2023-01-201-1/+1
|
* SERVER-70705 fix argv0 for DEATH_TEST exec callBilly Donahue2022-10-311-0/+48
|
* SERVER-70815 unittest unify string formatting, support enumsBilly Donahue2022-10-261-1/+3
|
* SERVER-9434 Audit and Normalize Process Exit CodesMatt Kneiser2022-07-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Put all references to ExitCode enumerators under an enum class to namespace all the enumerators and avoid polluting the mongo namespace with possible naming collisions. - Added magic-number exit codes to exit_code.h like 50 & 51 (LauncherMiddleError & LauncherError respectively). - Reserved a range of exit codes to account for FreeBSD's usage of 64-78. - Renamed all enums with removal of EXIT_ which could conflict or get confused with built-in macros. - camelCased all ExitCode enum values. - Added the generic - ExitCode::fail - for returning 1 as failure. - Added explicit dependency on the exit_code.h header for all files using ExitCode's. - Removed all references to implementation-defined exit codes like EXIT_FAILURE and EXIT_SUCCESS. - Narrowed return values of the shell's undocumented quit() argument to portable values within 0-255, 0/ExitCode::clean otherwise. - Deprecated 8 unused ExitCode's - java - oomMalloc - oomRealloc - fs - clockSkew - windowsServiceStop - possibleCorruption - test - Wrapped the 2 Windows-only ExitCode's in #ifdef's - ntServiceError - windowsServiceStop
* SERVER-67162 Integrate new PCRE2 wrapperJennifer Peshansky2022-06-271-2/+2
|
* SERVER-38689 TempDirs inside DEATH_TESTs don't get cleaned upVojislav Stojkovic2022-06-171-3/+9
|
* SERVER-66203 move MONGO_LOGV2_DEFAULT_COMPONENT defs below includesBilly Donahue2022-05-061-1/+3
|
* SERVER-41353 replace errnoWithDescription with an API based on std::error_codeBilly Donahue2022-04-281-4/+5
|
* SERVER-61860 exec in most DEATH_TESTsBilly Donahue2022-03-201-118/+226
|
* Revert "SERVER-61860 exec in most DEATH_TESTs"auto-revert-processor2022-03-171-229/+118
| | | | This reverts commit b372b25622b9ec4dd7ae5b8e3424218b8eaa774a.
* SERVER-61860 exec in most DEATH_TESTsBilly Donahue2022-03-161-118/+229
|
* SERVER-59782 migrate makeGuard calls to ScopeGuardBilly Donahue2021-09-081-3/+3
|
* SERVER-54412 DEATH_TEST must tolerate EINTR from getlineBilly Donahue2021-02-111-2/+8
|
* SERVER-53069 Disable death tests on address and memory sanitizer variantsBen Caimano2020-11-241-1/+4
|
* SERVER-50426 Add a delimiter indicating the end of a death test runLydia Stepanek2020-08-211-0/+4
| | | | (cherry picked from commit bd82bb0ad816d68ff8b5a89647a3394b6acdac9d)
* SERVER-48887 C++ death tests should fail on TSAN exit codeMark Benvenuto2020-07-031-1/+26
|
* SERVER-48661 Death test cannot parse tsan outputMark Benvenuto2020-06-161-2/+8
|
* SERVER-46568 removing the unittestOutput domainGabriel Russell2020-04-141-38/+81
|
* SERVER-46801 Convert unittest library to structured logs.Billy Donahue2020-04-021-2/+1
| | | | Add logv2::LogComponent::kTest
* SERVER-47040 LOGV2_FATAL also fassertsHenrik Edin2020-03-241-1/+1
| | | | Added LOGV2_FATAL_NOTRACE and LOGV2_CONTINUE to have different behavior.
* SERVER-47070 fixing recursion in util_testGabriel Russell2020-03-241-4/+6
| | | | | | | | | | | | o death_test.cpp was allowing throwing "children" to escape their context to become test running "parents" and run more "children" thus recursion o assert_util_test.cpp was testing that uassert and massert die, but uassert and massert don't die o fix RollbackFailsOnUnknownOplogEntryCommandType which was throwing instead of dying in a death test
* SERVER-45567 removing util/log.h where I canGabriel Russell2020-02-281-14/+21
|
* SERVER-46219 Unit Tests should log with jsonMark Benvenuto2020-02-251-3/+6
|
* SERVER-43367 unittest framework refactor/fixesBilly Donahue2019-10-021-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Segregate old-style dbtests into their own Suite initialization system: OldStyleSuiteSpecification. This is where the funky deprecated features can live on without interfering with the Suite API. It also gives us a searchable base class to identify them in the future. OldStyleSuite has `setupTests()` and an `add<T>()` that Suite does not have. Suite API can shrink when it doesn't have to support these dbtest adaptor features. Suite only needs non-template `add(name, callback)`. - Add OldStyleSuiteInitializer to some dbtests that were missing it! These didn't use SuiteInstance to register themselves and were incorrect. They would self register, resulting in _allSuites() holding a std::shared_ptr to a static-duration Suite object! - Change `getSuite()` to return `Suite&` instead of `Suite*`. - No more "self-registering" in Suite constructor. Registration must be done as a separate post-construction step. This removes some unusual lifetime management code and is easier to document. Suite::getSuite(name) is the only way to make a Suite, and it does the make_shared and registration calls with a pseudo-private ConstructorEnable idiom. - Suite->run() returns std::unique_ptr<Result> instead of raw `Result*`. It's virtual to support OldStyleSuite behavior. - Suite._ran does nothing. Removed. - Result.cur does nothing. Removed. - Switch to pass-by-value and std::move for most ctor args. - Add explicit on 1-arg ctors. - Get rid of TestHolder. It's just a 2-field struct. - use fmt instead of snprintf - TEST and TEST_F macros: generate TEST_TYPE once. - TEST and TEST_F macros: inline the _agent variable. - Mark _doRun as `override`. - Terminology: replace CASE_NAME with SUITE_NAME. - rename DeathTestImpl -> DeathTestBase - move getDeathTestPattern into the test as a static member function - refactor out some repetition from the comparator decl macros - use if-constexpr and diamond relops to clean up the ComparisonAssertion class. - dbtests: conditionally skip some add<T> calls - further dedup (DEATH_)TEST(_F) macros
* SERVER-41162 Correct logging of death tests.ADAM David Alan Martin2019-06-261-4/+4
|
* SERVER-41162 Show logs for death tests.ADAM David Alan Martin2019-06-201-0/+4
| | | | | | | | Death tests run in a child process. That process communicates its stdout and stderr to its parent via a pipe. The results are searched for a death-test string. We now output the child's output to the parent's stream, after collecting it for a later search.
* SERVER-39338 Remove `stdx/functional.h`ADAM David Alan Martin2019-06-101-1/+1
|
* SERVER-39560 - remove leading blank line on all C++ filesBilly Donahue2019-02-131-1/+0
| | | | | | Remove leading comments that are just stating the filename. Move any file-level comments below the copyright banner. Remove leading blank lines.
* SERVER-37651 Update header files with new licenseRamon Fernandez2018-10-221-8/+10
|
* SERVER-35600 Add support for targeting watchosAndrew Morrow2018-06-141-2/+2
|
* SERVER-35284 Construct unit test fixtures only in the child process in C++ ↵Andy Schwerin2018-05-301-2/+4
| | | | death tests.
* SERVER-28960 Fix lint.Max Hirschhorn2017-05-251-1/+1
|
* SERVER-28960 Avoid creating core dumps during DEATH_TESTs.Max Hirschhorn2017-05-251-0/+8
|
* SERVER-28004 Add build system support for iOS-related Darwin variantsAndrew Morrow2017-02-151-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a SCons invocation like the following to attach to the correct SDK and targeting options. // macOS native build: > python buildscripts/scons.py CCFLAGS="-isysroot `xcrun --sdk macosx --show-sdk-path` -mmacosx-version-min=10.10" LINKFLAGS="-Wl,-syslibroot,`xcrun --sdk macosx --show-sdk-path` -mmacosx-version-min=10.10" CC=`xcrun -f --sdk macosx clang` CXX=`xcrun -f --sdk macosx clang++`all // iOS Cross: > python buildscripts/scons.py CCFLAGS="-arch arm64 -isysroot `xcrun --sdk iphoneos --show-sdk-path` -miphoneos-version-min=10.2" LINKFLAGS="-arch arm64 -Wl,-syslibroot,`xcrun --sdk iphoneos --show-sdk-path` -miphoneos-version-min=10.2" CC=`xcrun -f --sdk iphoneos clang` CXX=`xcrun -f --sdk iphoneos clang++` TARGET_OS=iOS TARGET_ARCH=aarch64 all // iOS Simulator Cross: > python buildscripts/scons.py CCFLAGS="-isysroot `xcrun --sdk iphonesimulator --show-sdk-path` -miphoneos-version-min=10.2" LINKFLAGS="-Wl,-syslibroot,`xcrun --sdk iphonesimulator --show-sdk-path` -miphoneos-version-min=10.2" CC=`xcrun -f --sdk iphonesimulator clang` CXX=`xcrun -f --sdk iphonesimulator clang++` TARGET_OS=iOS-sim all // tvOS Cross: > python buildscripts/scons.py CCFLAGS="-arch arm64 -isysroot `xcrun --sdk appletvos --show-sdk-path` -mtvos-version-min=10.1" LINKFLAGS="-arch arm64 -Wl,-syslibroot,`xcrun --sdk appletvos --show-sdk-path` -mtvos-version-min=10.1" CC=`xcrun -f --sdk appletvos clang` CXX=`xcrun -f --sdk appletvos clang++` TARGET_OS=tvOS TARGET_ARCH=aarch64 all // tvOS Simulator Cross: > python buildscripts/scons.py CCFLAGS="-isysroot `xcrun --sdk appletvsimulator --show-sdk-path` -mtvos-version-min=10.1" LINKFLAGS="-Wl,-syslibroot,`xcrun --sdk appletvsimulator --show-sdk-path` -mtvos-version-min=10.1" CC=`xcrun -f --sdk appletvsimulator clang` CXX=`xcrun -f --sdk appletvsimulator clang++` TARGET_OS=tvOS-sim To run the resulting binaries under the simulator, boot a particular target machine with 'xcrun simctl': > xcrun simctl boot 'Apple TV 1080p' Find the ID of the instance that was booted: > xcrun simctl list | grep 'Apple TV 1080p' And then spawn the intended binary inside the simulator with that ID: > xcrun simctl spawn CEEC6346-6D21-4092-A091-E5A3862A357F build/opt/mongo/mongod --dbpath=tmp
* SERVER-18579: Clang-Format - reformat code, no comment reflowMark Benvenuto2015-06-201-14/+13
|
* SERVER-19005 Support DEATH_TEST and DEATH_TEST_FAndy Schwerin2015-06-171-0/+122