aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-02-16 14:26:58 +0100
committerRiccardo Spagni <ric@spagni.net>2018-02-16 14:26:58 +0100
commitf4a6bc79d9a751480597aa007a1c6d315604f856 (patch)
tree6cd77005a74333cef7d9b0d62e311177417c2d0a /tests
parentMerge pull request #3252 (diff)
parentkeccak: fix mdlen bounds sanity checking (diff)
downloadmonero-f4a6bc79d9a751480597aa007a1c6d315604f856.tar.xz
Merge pull request #3226
e4646379 keccak: fix mdlen bounds sanity checking (moneromooo-monero) 2e3e90ac pass large parameters by const ref, not value (moneromooo-monero) 61defd89 blockchain: sanity check number of precomputed hash of hash blocks (moneromooo-monero) 9af6b2d1 ringct: fix infinite loop in unused h2b function (moneromooo-monero) 8cea8d0c simplewallet: double check a new multisig wallet is multisig (moneromooo-monero) 9b98a6ac threadpool: catch exceptions in dtor, to avoid terminate (moneromooo-monero) 24803ed9 blockchain_export: fix buffer overflow in exporter (moneromooo-monero) f3f7da62 perf_timer: rewrite to make it clear there is no division by zero (moneromooo-monero) c6ea3df0 performance_tests: remove add_arg call stray extra param (moneromooo-monero) fa6b4566 fuzz_tests: fix an uninitialized var in setup (moneromooo-monero) 03887f11 keccak: fix sanity check bounds test (moneromooo-monero) ad11db91 blockchain_db: initialize m_open in base class ctor (moneromooo-monero) bece67f9 miner: restore std::cout precision after modification (moneromooo-monero) 1aabd14c db_lmdb: check hard fork info drop succeeded (moneromooo-monero)
Diffstat (limited to 'tests')
-rw-r--r--tests/core_tests/block_validation.cpp2
-rw-r--r--tests/fuzz/levin.cpp5
-rw-r--r--tests/performance_tests/main.cpp2
3 files changed, 5 insertions, 4 deletions
diff --git a/tests/core_tests/block_validation.cpp b/tests/core_tests/block_validation.cpp
index b9818d2c5..598cd4098 100644
--- a/tests/core_tests/block_validation.cpp
+++ b/tests/core_tests/block_validation.cpp
@@ -38,7 +38,7 @@ namespace
{
bool lift_up_difficulty(std::vector<test_event_entry>& events, std::vector<uint64_t>& timestamps,
std::vector<difficulty_type>& cummulative_difficulties, test_generator& generator,
- size_t new_block_count, const block blk_last, const account_base& miner_account)
+ size_t new_block_count, const block &blk_last, const account_base& miner_account)
{
difficulty_type commulative_diffic = cummulative_difficulties.empty() ? 0 : cummulative_difficulties.back();
block blk_prev = blk_last;
diff --git a/tests/fuzz/levin.cpp b/tests/fuzz/levin.cpp
index 2c3971470..6a164dda9 100644
--- a/tests/fuzz/levin.cpp
+++ b/tests/fuzz/levin.cpp
@@ -299,7 +299,7 @@ int LevinFuzzer::run(const std::string &filename)
{
std::string s;
-//
+#if 0
epee::levin::bucket_head2 req_head;
req_head.m_signature = LEVIN_SIGNATURE;
req_head.m_cb = 0;
@@ -307,10 +307,11 @@ int LevinFuzzer::run(const std::string &filename)
req_head.m_command = 2000;
req_head.m_flags = LEVIN_PACKET_REQUEST;
req_head.m_protocol_version = LEVIN_PROTOCOL_VER_1;
+ req_head.m_return_code = 0;
FILE *f=fopen("/tmp/out.levin", "w");
fwrite(&req_head,sizeof(req_head),1, f);
fclose(f);
-//
+#endif
if (!epee::file_io_utils::load_file_to_string(filename, s))
{
std::cout << "Error: failed to load file " << filename << std::endl;
diff --git a/tests/performance_tests/main.cpp b/tests/performance_tests/main.cpp
index efa405160..902bd89c0 100644
--- a/tests/performance_tests/main.cpp
+++ b/tests/performance_tests/main.cpp
@@ -85,7 +85,7 @@ int main(int argc, char** argv)
po::options_description desc_options("Command line options");
const command_line::arg_descriptor<std::string> arg_filter = { "filter", "Regular expression filter for which tests to run" };
- command_line::add_arg(desc_options, arg_filter, "");
+ command_line::add_arg(desc_options, arg_filter);
po::variables_map vm;
bool r = command_line::handle_error_helper(desc_options, [&]()