Skip to content

Commit

Permalink
tests: update, enable legacy tests, remove vm tests (ethereum#23350)
Browse files Browse the repository at this point in the history
* tests: update, enable legacy tests, remove vm tests

* tests: minor fixes
  • Loading branch information
holiman authored Aug 17, 2021
1 parent 0a68558 commit fb4007b
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 301 deletions.
90 changes: 0 additions & 90 deletions tests/gen_vmexec.go

This file was deleted.

9 changes: 4 additions & 5 deletions tests/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ import (
)

var (
baseDir = filepath.Join(".", "testdata")
blockTestDir = filepath.Join(baseDir, "BlockchainTests")
stateTestDir = filepath.Join(baseDir, "GeneralStateTests")
//legacyStateTestDir = filepath.Join(baseDir, "LegacyTests", "Constantinople", "GeneralStateTests")
baseDir = filepath.Join(".", "testdata")
blockTestDir = filepath.Join(baseDir, "BlockchainTests")
stateTestDir = filepath.Join(baseDir, "GeneralStateTests")
legacyStateTestDir = filepath.Join(baseDir, "LegacyTests", "Constantinople", "GeneralStateTests")
transactionTestDir = filepath.Join(baseDir, "TransactionTests")
vmTestDir = filepath.Join(baseDir, "VMTests")
rlpTestDir = filepath.Join(baseDir, "RLPTests")
difficultyTestDir = filepath.Join(baseDir, "BasicTests")
)
Expand Down
7 changes: 2 additions & 5 deletions tests/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ func TestState(t *testing.T) {

// Uses 1GB RAM per tested fork
st.skipLoad(`^stStaticCall/static_Call1MB`)
// Un-skip this when https://github.com/ethereum/tests/issues/908 is closed
st.skipLoad(`^stQuadraticComplexityTest/QuadraticComplexitySolidity_CallDataCopy`)

// Broken tests:
// Expected failures:
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/Byzantium/0`, "bug in test")
Expand All @@ -59,9 +58,7 @@ func TestState(t *testing.T) {
// For Istanbul, older tests were moved into LegacyTests
for _, dir := range []string{
stateTestDir,
// legacy state tests are disabled, due to them not being
// regenerated for the no-sender-eoa change.
//legacyStateTestDir,
legacyStateTestDir,
} {
st.walk(t, dir, func(t *testing.T, name string, test *StateTest) {
for _, subtest := range test.Subtests() {
Expand Down
4 changes: 4 additions & 0 deletions tests/state_test_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,3 +358,7 @@ func rlpHash(x interface{}) (h common.Hash) {
hw.Sum(h[:0])
return h
}

func vmTestBlockHash(n uint64) common.Hash {
return common.BytesToHash(crypto.Keccak256([]byte(big.NewInt(int64(n)).String())))
}
2 changes: 1 addition & 1 deletion tests/testdata
Submodule testdata updated 163 files
39 changes: 0 additions & 39 deletions tests/vm_test.go

This file was deleted.

161 changes: 0 additions & 161 deletions tests/vm_test_util.go

This file was deleted.

0 comments on commit fb4007b

Please sign in to comment.