Skip to content

Commit fb4007b

Browse files
authored
tests: update, enable legacy tests, remove vm tests (ethereum#23350)
* tests: update, enable legacy tests, remove vm tests * tests: minor fixes
1 parent 0a68558 commit fb4007b

7 files changed

+11
-301
lines changed

tests/gen_vmexec.go

-90
This file was deleted.

tests/init_test.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@ import (
3434
)
3535

3636
var (
37-
baseDir = filepath.Join(".", "testdata")
38-
blockTestDir = filepath.Join(baseDir, "BlockchainTests")
39-
stateTestDir = filepath.Join(baseDir, "GeneralStateTests")
40-
//legacyStateTestDir = filepath.Join(baseDir, "LegacyTests", "Constantinople", "GeneralStateTests")
37+
baseDir = filepath.Join(".", "testdata")
38+
blockTestDir = filepath.Join(baseDir, "BlockchainTests")
39+
stateTestDir = filepath.Join(baseDir, "GeneralStateTests")
40+
legacyStateTestDir = filepath.Join(baseDir, "LegacyTests", "Constantinople", "GeneralStateTests")
4141
transactionTestDir = filepath.Join(baseDir, "TransactionTests")
42-
vmTestDir = filepath.Join(baseDir, "VMTests")
4342
rlpTestDir = filepath.Join(baseDir, "RLPTests")
4443
difficultyTestDir = filepath.Join(baseDir, "BasicTests")
4544
)

tests/state_test.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ func TestState(t *testing.T) {
4545

4646
// Uses 1GB RAM per tested fork
4747
st.skipLoad(`^stStaticCall/static_Call1MB`)
48-
// Un-skip this when https://github.com/ethereum/tests/issues/908 is closed
49-
st.skipLoad(`^stQuadraticComplexityTest/QuadraticComplexitySolidity_CallDataCopy`)
48+
5049
// Broken tests:
5150
// Expected failures:
5251
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/Byzantium/0`, "bug in test")
@@ -59,9 +58,7 @@ func TestState(t *testing.T) {
5958
// For Istanbul, older tests were moved into LegacyTests
6059
for _, dir := range []string{
6160
stateTestDir,
62-
// legacy state tests are disabled, due to them not being
63-
// regenerated for the no-sender-eoa change.
64-
//legacyStateTestDir,
61+
legacyStateTestDir,
6562
} {
6663
st.walk(t, dir, func(t *testing.T, name string, test *StateTest) {
6764
for _, subtest := range test.Subtests() {

tests/state_test_util.go

+4
Original file line numberDiff line numberDiff line change
@@ -358,3 +358,7 @@ func rlpHash(x interface{}) (h common.Hash) {
358358
hw.Sum(h[:0])
359359
return h
360360
}
361+
362+
func vmTestBlockHash(n uint64) common.Hash {
363+
return common.BytesToHash(crypto.Keccak256([]byte(big.NewInt(int64(n)).String())))
364+
}

tests/testdata

Submodule testdata updated 163 files

tests/vm_test.go

-39
This file was deleted.

tests/vm_test_util.go

-161
This file was deleted.

0 commit comments

Comments
 (0)