aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCJentzsch <jentzsch.software@gmail.com>2015-03-01 05:04:43 +0800
committerCJentzsch <jentzsch.software@gmail.com>2015-03-01 05:04:43 +0800
commitbb88fdbd7bb9047c10f355599c305a157fc00a70 (patch)
treee4e347a8b9669aa43d1dc4d05cf668b668e9b5c5
parentbf9564bf85e3b94d6f3d8589fc5a57f92fbf1824 (diff)
downloaddexon-solidity-bb88fdbd7bb9047c10f355599c305a157fc00a70.tar.gz
dexon-solidity-bb88fdbd7bb9047c10f355599c305a157fc00a70.tar.zst
dexon-solidity-bb88fdbd7bb9047c10f355599c305a157fc00a70.zip
move extrem memory test to stMemoryStressTest.json
-rw-r--r--block.cpp5
-rw-r--r--stMemoryStressTestFiller.json69
-rw-r--r--stMemoryTestFiller.json68
-rw-r--r--state.cpp18
4 files changed, 92 insertions, 68 deletions
diff --git a/block.cpp b/block.cpp
index c8f79f05..fdf65aff 100644
--- a/block.cpp
+++ b/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/stMemoryStressTestFiller.json b/stMemoryStressTestFiller.json
new file mode 100644
index 00000000..420f7c3d
--- /dev/null
+++ b/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/stMemoryTestFiller.json b/stMemoryTestFiller.json
index b9b69680..e2b3b95a 100644
--- a/stMemoryTestFiller.json
+++ b/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/state.cpp b/state.cpp
index 8872d985..1581e405 100644
--- a/state.cpp
+++ b/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<chrono::milliseconds>(end - start));
+ cnote << "test duration: " << duration.count() << " milliseconds.\n";
+ }
+ }
+}
+
BOOST_AUTO_TEST_CASE(stSolidityTest)
{
dev::test::executeTests("stSolidityTest", "/StateTests", dev::test::doStateTests);