aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Lange <fjl@users.noreply.github.com>2018-09-29 04:23:47 +0800
committerGitHub <noreply@github.com>2018-09-29 04:23:47 +0800
commit79ca6c7a657f5f6660fb136707edb07951bb3309 (patch)
treebfea93213f5cc1ddba7e00534698ae9bda53664d
parent4d8c7248bda39e43b7d58ba894c26c4562a13c3f (diff)
downloaddexon-79ca6c7a657f5f6660fb136707edb07951bb3309.tar.gz
dexon-79ca6c7a657f5f6660fb136707edb07951bb3309.tar.zst
dexon-79ca6c7a657f5f6660fb136707edb07951bb3309.zip
tests: update slow test lists, skip on windows/386 (#17758)
-rw-r--r--tests/block_test.go10
-rw-r--r--tests/init_test.go17
-rw-r--r--tests/state_test.go10
-rw-r--r--tests/vm_test.go6
4 files changed, 28 insertions, 15 deletions
diff --git a/tests/block_test.go b/tests/block_test.go
index c91119929..8315728a6 100644
--- a/tests/block_test.go
+++ b/tests/block_test.go
@@ -32,9 +32,13 @@ func TestBlockchain(t *testing.T) {
bt.skipLoad(`^bcTotalDifficultyTest/(lotsOfLeafs|lotsOfBranches|sideChainWithMoreTransactions)`)
// This test is broken
bt.fails(`blockhashNonConstArg_Constantinople`, "Broken test")
-
- // Still failing tests
- // bt.skipLoad(`^bcWalletTest.*_Byzantium$`)
+ // Slow tests
+ bt.slow(`^bcExploitTest/DelegateCallSpam.json`)
+ 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) {
if err := bt.checkFailure(t, name, test.Run()); err != nil {
diff --git a/tests/init_test.go b/tests/init_test.go
index 90a74448a..053cbd6fc 100644
--- a/tests/init_test.go
+++ b/tests/init_test.go
@@ -25,6 +25,7 @@ import (
"path/filepath"
"reflect"
"regexp"
+ "runtime"
"sort"
"strings"
"testing"
@@ -90,7 +91,7 @@ type testMatcher struct {
configpat []testConfig
failpat []testFailure
skiploadpat []*regexp.Regexp
- skipshortpat []*regexp.Regexp
+ slowpat []*regexp.Regexp
whitelistpat *regexp.Regexp
}
@@ -105,8 +106,8 @@ type testFailure struct {
}
// skipShortMode skips tests matching when the -short flag is used.
-func (tm *testMatcher) skipShortMode(pattern string) {
- tm.skipshortpat = append(tm.skipshortpat, regexp.MustCompile(pattern))
+func (tm *testMatcher) slow(pattern string) {
+ tm.slowpat = append(tm.slowpat, regexp.MustCompile(pattern))
}
// skipLoad skips JSON loading of tests matching the pattern.
@@ -133,11 +134,15 @@ func (tm *testMatcher) config(pattern string, cfg params.ChainConfig) {
// findSkip matches name against test skip patterns.
func (tm *testMatcher) findSkip(name string) (reason string, skipload bool) {
- if testing.Short() {
- for _, re := range tm.skipshortpat {
- if re.MatchString(name) {
+ isWin32 := runtime.GOARCH == "386" && runtime.GOOS == "windows"
+ for _, re := range tm.slowpat {
+ if re.MatchString(name) {
+ if testing.Short() {
return "skipped in -short mode", false
}
+ if isWin32 {
+ return "skipped on 32bit windows", false
+ }
}
}
for _, re := range tm.skiploadpat {
diff --git a/tests/state_test.go b/tests/state_test.go
index 91c9a9f44..c52e9abb8 100644
--- a/tests/state_test.go
+++ b/tests/state_test.go
@@ -30,7 +30,15 @@ func TestState(t *testing.T) {
st := new(testMatcher)
// 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:
st.skipLoad(`^stTransactionTest/OverflowGasRequire\.json`) // gasLimit > 256 bits
st.skipLoad(`^stTransactionTest/zeroSigTransa[^/]*\.json`) // EIP-86 is not supported yet
diff --git a/tests/vm_test.go b/tests/vm_test.go
index c9f5e225e..441483dff 100644
--- a/tests/vm_test.go
+++ b/tests/vm_test.go
@@ -25,13 +25,9 @@ import (
func TestVM(t *testing.T) {
t.Parallel()
vmt := new(testMatcher)
+ vmt.slow("^vmPerformance")
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) {
withTrace(t, test.json.Exec.GasLimit, func(vmconfig vm.Config) error {
return vmt.checkFailure(t, name, test.Run(vmconfig))