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
8d3faf69
Commit
8d3faf69
authored
Jun 18, 2015
by
Taylor Gerring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build error fixes
parent
baea8e87
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
test-global-coverage.sh
build/test-global-coverage.sh
+1
-1
state_test_util.go
tests/state_test_util.go
+4
-5
vm_test_util.go
tests/vm_test_util.go
+1
-1
No files found.
build/test-global-coverage.sh
View file @
8d3faf69
...
@@ -16,7 +16,7 @@ for pkg in $(go list ./...); do
...
@@ -16,7 +16,7 @@ for pkg in $(go list ./...); do
# drop the namespace prefix.
# drop the namespace prefix.
dir
=
${
pkg
##github.com/ethereum/go-ethereum/
}
dir
=
${
pkg
##github.com/ethereum/go-ethereum/
}
if
[[
$dir
!=
"tests
/vm
"
]]
;
then
if
[[
$dir
!=
"tests"
]]
;
then
go
test
-covermode
=
count
-coverprofile
=
$dir
/profile.tmp
$pkg
go
test
-covermode
=
count
-coverprofile
=
$dir
/profile.tmp
$pkg
fi
fi
if
[[
-f
$dir
/profile.tmp
]]
;
then
if
[[
-f
$dir
/profile.tmp
]]
;
then
...
...
tests/state_test_util.go
View file @
8d3faf69
...
@@ -121,17 +121,16 @@ func runStateTest(test VmTest) error {
...
@@ -121,17 +121,16 @@ func runStateTest(test VmTest) error {
}
}
for
addr
,
value
:=
range
account
.
Storage
{
for
addr
,
value
:=
range
account
.
Storage
{
v
:=
obj
.
GetState
(
common
.
HexToHash
(
addr
))
.
Bytes
()
v
:=
obj
.
GetState
(
common
.
HexToHash
(
addr
))
vexp
:=
common
.
FromHex
(
value
)
vexp
:=
common
.
HexToHash
(
value
)
if
bytes
.
Compare
(
v
,
vexp
)
!=
0
{
if
v
!=
vexp
{
return
fmt
.
Errorf
(
"(%x: %s) storage failed. Expected %x, got %x (%v %v)
\n
"
,
obj
.
Address
()
.
Bytes
()[
0
:
4
],
addr
,
vexp
,
v
,
common
.
BigD
(
vexp
),
common
.
BigD
(
v
))
return
fmt
.
Errorf
(
"(%x: %s) storage failed. Expected %x, got %x (%v %v)
\n
"
,
obj
.
Address
()
.
Bytes
()[
0
:
4
],
addr
,
vexp
,
v
,
vexp
.
Big
(),
v
.
Big
(
))
}
}
}
}
}
}
statedb
.
Sync
()
statedb
.
Sync
()
//if !bytes.Equal(common.Hex2Bytes(test.PostStateRoot), statedb.Root()) {
if
common
.
HexToHash
(
test
.
PostStateRoot
)
!=
statedb
.
Root
()
{
if
common
.
HexToHash
(
test
.
PostStateRoot
)
!=
statedb
.
Root
()
{
return
fmt
.
Errorf
(
"Post state root error. Expected %s, got %x"
,
test
.
PostStateRoot
,
statedb
.
Root
())
return
fmt
.
Errorf
(
"Post state root error. Expected %s, got %x"
,
test
.
PostStateRoot
,
statedb
.
Root
())
}
}
...
...
tests/vm_test_util.go
View file @
8d3faf69
...
@@ -102,7 +102,7 @@ func runVmTest(test VmTest) error {
...
@@ -102,7 +102,7 @@ func runVmTest(test VmTest) error {
ret
,
logs
,
gas
,
err
=
RunVm
(
statedb
,
env
,
test
.
Exec
)
ret
,
logs
,
gas
,
err
=
RunVm
(
statedb
,
env
,
test
.
Exec
)
// Compare expectedand actual return
// Compare expected
and actual return
rexp
:=
common
.
FromHex
(
test
.
Out
)
rexp
:=
common
.
FromHex
(
test
.
Out
)
if
bytes
.
Compare
(
rexp
,
ret
)
!=
0
{
if
bytes
.
Compare
(
rexp
,
ret
)
!=
0
{
return
fmt
.
Errorf
(
"return failed. Expected %x, got %x
\n
"
,
rexp
,
ret
)
return
fmt
.
Errorf
(
"return failed. Expected %x, got %x
\n
"
,
rexp
,
ret
)
...
...
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