Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
79ca6c7a
Unverified
Commit
79ca6c7a
authored
Sep 28, 2018
by
Felix Lange
Committed by
GitHub
Sep 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: update slow test lists, skip on windows/386 (#17758)
parent
4d8c7248
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
15 deletions
+28
-15
block_test.go
tests/block_test.go
+7
-3
init_test.go
tests/init_test.go
+11
-6
state_test.go
tests/state_test.go
+9
-1
vm_test.go
tests/vm_test.go
+1
-5
No files found.
tests/block_test.go
View file @
79ca6c7a
...
@@ -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
{
...
...
tests/init_test.go
View file @
79ca6c7a
...
@@ -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
s
kipshortpat
[]
*
regexp
.
Regexp
s
lowpat
[]
*
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
)
s
kipShortMode
(
pattern
string
)
{
func
(
tm
*
testMatcher
)
s
low
(
pattern
string
)
{
tm
.
s
kipshortpat
=
append
(
tm
.
skipshort
pat
,
regexp
.
MustCompile
(
pattern
))
tm
.
s
lowpat
=
append
(
tm
.
slow
pat
,
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
{
...
...
tests/state_test.go
View file @
79ca6c7a
...
@@ -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
...
...
tests/vm_test.go
View file @
79ca6c7a
...
@@ -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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment