Skip to content

Commit 79ca6c7

Browse files
authored
tests: update slow test lists, skip on windows/386 (#17758)
1 parent 4d8c724 commit 79ca6c7

4 files changed

Lines changed: 28 additions & 15 deletions

File tree

‎tests/block_test.go‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ func TestBlockchain(t *testing.T) {
3232
bt.skipLoad(`^bcTotalDifficultyTest/(lotsOfLeafs|lotsOfBranches|sideChainWithMoreTransactions)`)
3333
// This test is broken
3434
bt.fails(`blockhashNonConstArg_Constantinople`, "Broken test")
35-
36-
// Still failing tests
37-
// bt.skipLoad(`^bcWalletTest.*_Byzantium$`)
35+
// Slow tests
36+
bt.slow(`^bcExploitTest/DelegateCallSpam.json`)
37+
bt.slow(`^bcExploitTest/ShanghaiLove.json`)
38+
bt.slow(`^bcExploitTest/SuicideIssue.json`)
39+
bt.slow(`^bcForkStressTest/`)
40+
bt.slow(`^bcGasPricerTest/RPC_API_Test.json`)
41+
bt.slow(`^bcWalletTest/`)
3842

3943
bt.walk(t, blockTestDir, func(t *testing.T, name string, test *BlockTest) {
4044
if err := bt.checkFailure(t, name, test.Run()); err != nil {

‎tests/init_test.go‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"path/filepath"
2626
"reflect"
2727
"regexp"
28+
"runtime"
2829
"sort"
2930
"strings"
3031
"testing"
@@ -90,7 +91,7 @@ type testMatcher struct {
9091
configpat []testConfig
9192
failpat []testFailure
9293
skiploadpat []*regexp.Regexp
93-
skipshortpat []*regexp.Regexp
94+
slowpat []*regexp.Regexp
9495
whitelistpat *regexp.Regexp
9596
}
9697

@@ -105,8 +106,8 @@ type testFailure struct {
105106
}
106107

107108
// skipShortMode skips tests matching when the -short flag is used.
108-
func (tm *testMatcher) skipShortMode(pattern string) {
109-
tm.skipshortpat = append(tm.skipshortpat, regexp.MustCompile(pattern))
109+
func (tm *testMatcher) slow(pattern string) {
110+
tm.slowpat = append(tm.slowpat, regexp.MustCompile(pattern))
110111
}
111112

112113
// skipLoad skips JSON loading of tests matching the pattern.
@@ -133,11 +134,15 @@ func (tm *testMatcher) config(pattern string, cfg params.ChainConfig) {
133134

134135
// findSkip matches name against test skip patterns.
135136
func (tm *testMatcher) findSkip(name string) (reason string, skipload bool) {
136-
if testing.Short() {
137-
for _, re := range tm.skipshortpat {
138-
if re.MatchString(name) {
137+
isWin32 := runtime.GOARCH == "386" && runtime.GOOS == "windows"
138+
for _, re := range tm.slowpat {
139+
if re.MatchString(name) {
140+
if testing.Short() {
139141
return "skipped in -short mode", false
140142
}
143+
if isWin32 {
144+
return "skipped on 32bit windows", false
145+
}
141146
}
142147
}
143148
for _, re := range tm.skiploadpat {

‎tests/state_test.go‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,15 @@ func TestState(t *testing.T) {
3030

3131
st := new(testMatcher)
3232
// Long tests:
33-
st.skipShortMode(`^stQuadraticComplexityTest/`)
33+
st.slow(`^stAttackTest/ContractCreationSpam`)
34+
st.slow(`^stBadOpcode/badOpcodes`)
35+
st.slow(`^stPreCompiledContracts/modexp`)
36+
st.slow(`^stQuadraticComplexityTest/`)
37+
st.slow(`^stStaticCall/static_Call50000`)
38+
st.slow(`^stStaticCall/static_Return50000`)
39+
st.slow(`^stStaticCall/static_Call1MB`)
40+
st.slow(`^stSystemOperationsTest/CallRecursiveBomb`)
41+
st.slow(`^stTransactionTest/Opcodes_TransactionInit`)
3442
// Broken tests:
3543
st.skipLoad(`^stTransactionTest/OverflowGasRequire\.json`) // gasLimit > 256 bits
3644
st.skipLoad(`^stTransactionTest/zeroSigTransa[^/]*\.json`) // EIP-86 is not supported yet

‎tests/vm_test.go‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,9 @@ import (
2525
func TestVM(t *testing.T) {
2626
t.Parallel()
2727
vmt := new(testMatcher)
28+
vmt.slow("^vmPerformance")
2829
vmt.fails("^vmSystemOperationsTest.json/createNameRegistrator$", "fails without parallel execution")
2930

30-
vmt.skipLoad(`^vmInputLimits(Light)?.json`) // log format broken
31-
32-
vmt.skipShortMode("^vmPerformanceTest.json")
33-
vmt.skipShortMode("^vmInputLimits(Light)?.json")
34-
3531
vmt.walk(t, vmTestDir, func(t *testing.T, name string, test *VMTest) {
3632
withTrace(t, test.json.Exec.GasLimit, func(vmconfig vm.Config) error {
3733
return vmt.checkFailure(t, name, test.Run(vmconfig))

0 commit comments

Comments
 (0)