diff --git a/test/block.cpp b/test/block.cpp index c8f79f052..fdf65affa 100644 --- a/test/block.cpp +++ b/test/block.cpp @@ -506,6 +506,11 @@ BOOST_AUTO_TEST_CASE(blInvalidHeaderTest) dev::test::executeTests("blInvalidHeaderTest", "/BlockTests", dev::test::doBlockTests); } +BOOST_AUTO_TEST_CASE(blForkBlocks) +{ + dev::test::executeTests("blForkBlocks", "/BlockTests", dev::test::doBlockTests); +} + BOOST_AUTO_TEST_CASE(userDefinedFileBl) { dev::test::userDefinedTest("--bltest", dev::test::doBlockTests); diff --git a/test/stMemoryStressTestFiller.json b/test/stMemoryStressTestFiller.json new file mode 100644 index 000000000..420f7c3db --- /dev/null +++ b/test/stMemoryStressTestFiller.json @@ -0,0 +1,69 @@ +{ + "mload32bitBound": { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "17592320524892", + "currentDifficulty" : "256", + "currentTimestamp" : "1", + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "nonce" : "0", + "code" : "{ [[ 1 ]] (MLOAD 4294967296) } ", + "storage": {} + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "175923205248920", + "nonce" : "0", + "code" : "", + "storage": {} + } + }, + "transaction" : { + "nonce" : "0", + "gasPrice" : "1", + "gasLimit" : "17592320524892", + "to" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "value" : "10", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "data" : "" + } + }, + + "mload32bitBound2": { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "37791080412587", + "currentDifficulty" : "256", + "currentTimestamp" : "1", + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "nonce" : "0", + "code" : "{ [[ 1 ]] (MLOAD 6294967296) } ", + "storage": {} + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "377910804219850", + "nonce" : "0", + "code" : "", + "storage": {} + } + }, + "transaction" : { + "nonce" : "0", + "gasPrice" : "1", + "gasLimit" : "37791080412587", + "to" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "value" : "10", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "data" : "" + } + } +} diff --git a/test/stMemoryTestFiller.json b/test/stMemoryTestFiller.json index b9b696804..e2b3b95a0 100644 --- a/test/stMemoryTestFiller.json +++ b/test/stMemoryTestFiller.json @@ -67,74 +67,6 @@ } }, - "mload32bitBound": { - "env" : { - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", - "currentNumber" : "0", - "currentGasLimit" : "17592320524892", - "currentDifficulty" : "256", - "currentTimestamp" : "1", - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "nonce" : "0", - "code" : "{ [[ 1 ]] (MLOAD 4294967296) } ", - "storage": {} - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "175923205248920", - "nonce" : "0", - "code" : "", - "storage": {} - } - }, - "transaction" : { - "nonce" : "0", - "gasPrice" : "1", - "gasLimit" : "17592320524892", - "to" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "value" : "10", - "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", - "data" : "" - } - }, - - "mload32bitBound2": { - "env" : { - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", - "currentNumber" : "0", - "currentGasLimit" : "37791080412587", - "currentDifficulty" : "256", - "currentTimestamp" : "1", - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "nonce" : "0", - "code" : "{ [[ 1 ]] (MLOAD 6294967296) } ", - "storage": {} - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "377910804219850", - "nonce" : "0", - "code" : "", - "storage": {} - } - }, - "transaction" : { - "nonce" : "0", - "gasPrice" : "1", - "gasLimit" : "37791080412587", - "to" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "value" : "10", - "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", - "data" : "" - } - }, - "mem32kb": { "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", diff --git a/test/state.cpp b/test/state.cpp index 8872d985f..1581e4055 100644 --- a/test/state.cpp +++ b/test/state.cpp @@ -177,6 +177,24 @@ BOOST_AUTO_TEST_CASE(stQuadraticComplexityTest) } } +BOOST_AUTO_TEST_CASE(stMemoryStressTest) +{ + for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i) + { + string arg = boost::unit_test::framework::master_test_suite().argv[i]; + if (arg == "--memory" || arg == "--all") + { + auto start = chrono::steady_clock::now(); + + dev::test::executeTests("stMemoryStressTest", "/StateTests", dev::test::doStateTests); + + auto end = chrono::steady_clock::now(); + auto duration(chrono::duration_cast(end - start)); + cnote << "test duration: " << duration.count() << " milliseconds.\n"; + } + } +} + BOOST_AUTO_TEST_CASE(stSolidityTest) { dev::test::executeTests("stSolidityTest", "/StateTests", dev::test::doStateTests);