未验证 提交 79ca6c7a 编写于 作者: F Felix Lange 提交者: GitHub

tests: update slow test lists, skip on windows/386 (#17758)

上级 4d8c7248
...@@ -32,9 +32,13 @@ func TestBlockchain(t *testing.T) { ...@@ -32,9 +32,13 @@ func TestBlockchain(t *testing.T) {
bt.skipLoad(`^bcTotalDifficultyTest/(lotsOfLeafs|lotsOfBranches|sideChainWithMoreTransactions)`) bt.skipLoad(`^bcTotalDifficultyTest/(lotsOfLeafs|lotsOfBranches|sideChainWithMoreTransactions)`)
// This test is broken // This test is broken
bt.fails(`blockhashNonConstArg_Constantinople`, "Broken test") bt.fails(`blockhashNonConstArg_Constantinople`, "Broken test")
// Slow tests
// Still failing tests bt.slow(`^bcExploitTest/DelegateCallSpam.json`)
// bt.skipLoad(`^bcWalletTest.*_Byzantium$`) bt.slow(`^bcExploitTest/ShanghaiLove.json`)
bt.slow(`^bcExploitTest/SuicideIssue.json`)
bt.slow(`^bcForkStressTest/`)
bt.slow(`^bcGasPricerTest/RPC_API_Test.json`)
bt.slow(`^bcWalletTest/`)
bt.walk(t, blockTestDir, func(t *testing.T, name string, test *BlockTest) { bt.walk(t, blockTestDir, func(t *testing.T, name string, test *BlockTest) {
if err := bt.checkFailure(t, name, test.Run()); err != nil { if err := bt.checkFailure(t, name, test.Run()); err != nil {
......
...@@ -25,6 +25,7 @@ import ( ...@@ -25,6 +25,7 @@ import (
"path/filepath" "path/filepath"
"reflect" "reflect"
"regexp" "regexp"
"runtime"
"sort" "sort"
"strings" "strings"
"testing" "testing"
...@@ -90,7 +91,7 @@ type testMatcher struct { ...@@ -90,7 +91,7 @@ type testMatcher struct {
configpat []testConfig configpat []testConfig
failpat []testFailure failpat []testFailure
skiploadpat []*regexp.Regexp skiploadpat []*regexp.Regexp
skipshortpat []*regexp.Regexp slowpat []*regexp.Regexp
whitelistpat *regexp.Regexp whitelistpat *regexp.Regexp
} }
...@@ -105,8 +106,8 @@ type testFailure struct { ...@@ -105,8 +106,8 @@ type testFailure struct {
} }
// skipShortMode skips tests matching when the -short flag is used. // skipShortMode skips tests matching when the -short flag is used.
func (tm *testMatcher) skipShortMode(pattern string) { func (tm *testMatcher) slow(pattern string) {
tm.skipshortpat = append(tm.skipshortpat, regexp.MustCompile(pattern)) tm.slowpat = append(tm.slowpat, regexp.MustCompile(pattern))
} }
// skipLoad skips JSON loading of tests matching the pattern. // skipLoad skips JSON loading of tests matching the pattern.
...@@ -133,11 +134,15 @@ func (tm *testMatcher) config(pattern string, cfg params.ChainConfig) { ...@@ -133,11 +134,15 @@ func (tm *testMatcher) config(pattern string, cfg params.ChainConfig) {
// findSkip matches name against test skip patterns. // findSkip matches name against test skip patterns.
func (tm *testMatcher) findSkip(name string) (reason string, skipload bool) { func (tm *testMatcher) findSkip(name string) (reason string, skipload bool) {
if testing.Short() { isWin32 := runtime.GOARCH == "386" && runtime.GOOS == "windows"
for _, re := range tm.skipshortpat { for _, re := range tm.slowpat {
if re.MatchString(name) { if re.MatchString(name) {
if testing.Short() {
return "skipped in -short mode", false return "skipped in -short mode", false
} }
if isWin32 {
return "skipped on 32bit windows", false
}
} }
} }
for _, re := range tm.skiploadpat { for _, re := range tm.skiploadpat {
......
...@@ -30,7 +30,15 @@ func TestState(t *testing.T) { ...@@ -30,7 +30,15 @@ func TestState(t *testing.T) {
st := new(testMatcher) st := new(testMatcher)
// Long tests: // Long tests:
st.skipShortMode(`^stQuadraticComplexityTest/`) st.slow(`^stAttackTest/ContractCreationSpam`)
st.slow(`^stBadOpcode/badOpcodes`)
st.slow(`^stPreCompiledContracts/modexp`)
st.slow(`^stQuadraticComplexityTest/`)
st.slow(`^stStaticCall/static_Call50000`)
st.slow(`^stStaticCall/static_Return50000`)
st.slow(`^stStaticCall/static_Call1MB`)
st.slow(`^stSystemOperationsTest/CallRecursiveBomb`)
st.slow(`^stTransactionTest/Opcodes_TransactionInit`)
// Broken tests: // Broken tests:
st.skipLoad(`^stTransactionTest/OverflowGasRequire\.json`) // gasLimit > 256 bits st.skipLoad(`^stTransactionTest/OverflowGasRequire\.json`) // gasLimit > 256 bits
st.skipLoad(`^stTransactionTest/zeroSigTransa[^/]*\.json`) // EIP-86 is not supported yet st.skipLoad(`^stTransactionTest/zeroSigTransa[^/]*\.json`) // EIP-86 is not supported yet
......
...@@ -25,13 +25,9 @@ import ( ...@@ -25,13 +25,9 @@ import (
func TestVM(t *testing.T) { func TestVM(t *testing.T) {
t.Parallel() t.Parallel()
vmt := new(testMatcher) vmt := new(testMatcher)
vmt.slow("^vmPerformance")
vmt.fails("^vmSystemOperationsTest.json/createNameRegistrator$", "fails without parallel execution") vmt.fails("^vmSystemOperationsTest.json/createNameRegistrator$", "fails without parallel execution")
vmt.skipLoad(`^vmInputLimits(Light)?.json`) // log format broken
vmt.skipShortMode("^vmPerformanceTest.json")
vmt.skipShortMode("^vmInputLimits(Light)?.json")
vmt.walk(t, vmTestDir, func(t *testing.T, name string, test *VMTest) { vmt.walk(t, vmTestDir, func(t *testing.T, name string, test *VMTest) {
withTrace(t, test.json.Exec.GasLimit, func(vmconfig vm.Config) error { withTrace(t, test.json.Exec.GasLimit, func(vmconfig vm.Config) error {
return vmt.checkFailure(t, name, test.Run(vmconfig)) return vmt.checkFailure(t, name, test.Run(vmconfig))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册