mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-11 22:43:47 +00:00
new: dev: pos-398 remove unused bor tests derived from geth
This commit is contained in:
parent
de1330aae6
commit
f0d85e3703
1 changed files with 39 additions and 46 deletions
|
|
@ -124,57 +124,50 @@ func TestState(t *testing.T) {
|
||||||
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/ConstantinopleFix/0`, "bug in test")
|
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/ConstantinopleFix/0`, "bug in test")
|
||||||
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/ConstantinopleFix/3`, "bug in test")
|
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/ConstantinopleFix/3`, "bug in test")
|
||||||
|
|
||||||
// For Istanbul, older tests were moved into LegacyTests
|
st.walk(t, stateTestDir, func(t *testing.T, name string, test *StateTest) {
|
||||||
for _, dir := range []string{
|
for _, subtest := range test.Subtests() {
|
||||||
stateTestDir,
|
subtest := subtest
|
||||||
legacyStateTestDir,
|
key := fmt.Sprintf("%s/%d", subtest.Fork, subtest.Index)
|
||||||
benchmarksDir,
|
|
||||||
} {
|
|
||||||
st.walk(t, dir, func(t *testing.T, name string, test *StateTest) {
|
|
||||||
for _, subtest := range test.Subtests() {
|
|
||||||
subtest := subtest
|
|
||||||
key := fmt.Sprintf("%s/%d", subtest.Fork, subtest.Index)
|
|
||||||
|
|
||||||
t.Run(key+"/trie", func(t *testing.T) {
|
t.Run(key+"/trie", func(t *testing.T) {
|
||||||
withTrace(t, test.gasLimit(subtest), func(vmconfig vm.Config) error {
|
withTrace(t, test.gasLimit(subtest), func(vmconfig vm.Config) error {
|
||||||
_, _, err := test.Run(subtest, vmconfig, false)
|
_, _, err := test.Run(subtest, vmconfig, false)
|
||||||
if err != nil && len(test.json.Post[subtest.Fork][subtest.Index].ExpectException) > 0 {
|
if err != nil && len(test.json.Post[subtest.Fork][subtest.Index].ExpectException) > 0 {
|
||||||
// Ignore expected errors (TODO MariusVanDerWijden check error string)
|
// Ignore expected errors (TODO MariusVanDerWijden check error string)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
err = st.checkFailure(t, err)
|
err = st.checkFailure(t, err)
|
||||||
if err != nil && !errors.Is(err, UnsupportedForkError{Name: "Merge"}) {
|
if err != nil && !errors.Is(err, UnsupportedForkError{Name: "Merge"}) {
|
||||||
t.Errorf("in 'state_test.go', test '%s' failed with error: '%v'", name, err)
|
t.Errorf("in 'state_test.go', test '%s' failed with error: '%v'", name, err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
})
|
||||||
|
})
|
||||||
|
t.Run(key+"/snap", func(t *testing.T) {
|
||||||
|
withTrace(t, test.gasLimit(subtest), func(vmconfig vm.Config) error {
|
||||||
|
snaps, statedb, err := test.Run(subtest, vmconfig, true)
|
||||||
|
if snaps != nil && statedb != nil {
|
||||||
|
if _, err := snaps.Journal(statedb.IntermediateRoot(false)); err != nil &&
|
||||||
|
!errors.Is(err, UnsupportedForkError{Name: "Merge"}) {
|
||||||
|
t.Errorf("in 'rlp_test.go', test '%s' failed with error: '%v'", name, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if err != nil && len(test.json.Post[subtest.Fork][subtest.Index].ExpectException) > 0 {
|
||||||
|
// Ignore expected errors (TODO MariusVanDerWijden check error string)
|
||||||
return nil
|
return nil
|
||||||
})
|
}
|
||||||
|
err = st.checkFailure(t, err)
|
||||||
|
if err != nil && !errors.Is(err, UnsupportedForkError{Name: "Merge"}) {
|
||||||
|
t.Errorf("in 'state_test.go', test '%s' failed with error: '%v'", name, err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
})
|
})
|
||||||
t.Run(key+"/snap", func(t *testing.T) {
|
})
|
||||||
withTrace(t, test.gasLimit(subtest), func(vmconfig vm.Config) error {
|
}
|
||||||
snaps, statedb, err := test.Run(subtest, vmconfig, true)
|
})
|
||||||
if snaps != nil && statedb != nil {
|
|
||||||
if _, err := snaps.Journal(statedb.IntermediateRoot(false)); err != nil &&
|
|
||||||
!errors.Is(err, UnsupportedForkError{Name: "Merge"}) {
|
|
||||||
t.Errorf("in 'rlp_test.go', test '%s' failed with error: '%v'", name, err)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if err != nil && len(test.json.Post[subtest.Fork][subtest.Index].ExpectException) > 0 {
|
|
||||||
// Ignore expected errors (TODO MariusVanDerWijden check error string)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
err = st.checkFailure(t, err)
|
|
||||||
if err != nil && !errors.Is(err, UnsupportedForkError{Name: "Merge"}) {
|
|
||||||
t.Errorf("in 'state_test.go', test '%s' failed with error: '%v'", name, err)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transactions with gasLimit above this value will not get a VM trace on failure.
|
// Transactions with gasLimit above this value will not get a VM trace on failure.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue