mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
Add Antithesis intrumentation (#5042)
* Copy Antithesis SDK version 0.4.0 to directory external/ * Add build option `voidstar` to enable instrumentation with Antithesis SDK * Define instrumentation macros ASSERT and UNREACHABLE in terms of regular C assert * Replace asserts with named ASSERT or UNREACHABLE * Add UNREACHABLE to LogicError * Document instrumentation macros in CONTRIBUTING.md
This commit is contained in:
committed by
Ed Hennis
parent
f64cf9187a
commit
d7e949193f
@@ -20,8 +20,8 @@
|
||||
#include <xrpl/basics/Log.h>
|
||||
#include <xrpl/basics/chrono.h>
|
||||
#include <xrpl/basics/contract.h>
|
||||
#include <xrpl/beast/utility/instrumentation.h>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <cassert>
|
||||
#include <fstream>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
@@ -224,7 +224,7 @@ Logs::fromSeverity(beast::severities::Severity level)
|
||||
return lsERROR;
|
||||
|
||||
default:
|
||||
assert(false);
|
||||
UNREACHABLE("ripple::Logs::fromSeverity : invalid severity");
|
||||
[[fallthrough]];
|
||||
case kFatal:
|
||||
break;
|
||||
@@ -250,7 +250,7 @@ Logs::toSeverity(LogSeverity level)
|
||||
case lsERROR:
|
||||
return kError;
|
||||
default:
|
||||
assert(false);
|
||||
UNREACHABLE("ripple::Logs::toSeverity : invalid severity");
|
||||
[[fallthrough]];
|
||||
case lsFATAL:
|
||||
break;
|
||||
@@ -277,7 +277,7 @@ Logs::toString(LogSeverity s)
|
||||
case lsFATAL:
|
||||
return "Fatal";
|
||||
default:
|
||||
assert(false);
|
||||
UNREACHABLE("ripple::Logs::toString : invalid severity");
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
@@ -341,7 +341,7 @@ Logs::format(
|
||||
output += "ERR ";
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
UNREACHABLE("ripple::Logs::format : invalid severity");
|
||||
[[fallthrough]];
|
||||
case kFatal:
|
||||
output += "FTL ";
|
||||
|
||||
Reference in New Issue
Block a user