Commit de2259d2 authored by Guillaume Ballet's avatar Guillaume Ballet Committed by Péter Szilágyi

travis: enable test suite on ARM64 (#20219)

* travis: Enable ARM support

* Include fixes from 20039

* Add a trace to debug the invalid lookup issue

* Try increasing the timeout to see if the arm test passes

* Investigate the resolver issue

* Increase arm64 timeout for clique test

* increase timeout in tests for arm64

* Only test the failing tests

* Review feedback: don't export epsilon

* Remove investigation tricks+include fjl's feeback

* Revert the retry ahead of using the mock resolver

* Fix rebase errors
parent adf007da
...@@ -34,6 +34,16 @@ jobs: ...@@ -34,6 +34,16 @@ jobs:
# These are the latest Go versions. # These are the latest Go versions.
- stage: build - stage: build
os: linux os: linux
arch: amd64
dist: xenial
go: 1.13.x
script:
- go run build/ci.go install
- go run build/ci.go test -coverage $TEST_PACKAGES
- stage: build
os: linux
arch: arm64
dist: xenial dist: xenial
go: 1.13.x go: 1.13.x
script: script:
......
...@@ -49,7 +49,7 @@ func TestTestMode(t *testing.T) { ...@@ -49,7 +49,7 @@ func TestTestMode(t *testing.T) {
if err := ethash.VerifySeal(nil, header); err != nil { if err := ethash.VerifySeal(nil, header); err != nil {
t.Fatalf("unexpected verification error: %v", err) t.Fatalf("unexpected verification error: %v", err)
} }
case <-time.NewTimer(time.Second).C: case <-time.NewTimer(2 * time.Second).C:
t.Error("sealing result timeout") t.Error("sealing result timeout")
} }
} }
......
...@@ -608,7 +608,7 @@ func testBroadcastBlock(t *testing.T, totalPeers, broadcastExpected int) { ...@@ -608,7 +608,7 @@ func testBroadcastBlock(t *testing.T, totalPeers, broadcastExpected int) {
} }
}(peer) }(peer)
} }
timeout := time.After(300 * time.Millisecond) timeout := time.After(time.Second)
var receivedCount int var receivedCount int
outer: outer:
for { for {
......
package metrics
const epsilon = 0.0000000000000001
const epsilonPercentile = .00000000001
This diff is collapsed.
package metrics package metrics
import ( import (
"math"
"math/rand" "math/rand"
"runtime" "runtime"
"testing" "testing"
...@@ -326,7 +327,7 @@ func testUniformSampleStatistics(t *testing.T, s Sample) { ...@@ -326,7 +327,7 @@ func testUniformSampleStatistics(t *testing.T, s Sample) {
if 7380.5 != ps[1] { if 7380.5 != ps[1] {
t.Errorf("75th percentile: 7380.5 != %v\n", ps[1]) t.Errorf("75th percentile: 7380.5 != %v\n", ps[1])
} }
if 9986.429999999998 != ps[2] { if math.Abs(9986.429999999998-ps[2]) > epsilonPercentile {
t.Errorf("99th percentile: 9986.429999999998 != %v\n", ps[2]) t.Errorf("99th percentile: 9986.429999999998 != %v\n", ps[2])
} }
} }
......
...@@ -340,7 +340,9 @@ func testEmptyWork(t *testing.T, chainConfig *params.ChainConfig, engine consens ...@@ -340,7 +340,9 @@ func testEmptyWork(t *testing.T, chainConfig *params.ChainConfig, engine consens
} }
} }
w.fullTaskHook = func() { w.fullTaskHook = func() {
time.Sleep(100 * time.Millisecond) // Aarch64 unit tests are running in a VM on travis, they must
// be given more time to execute.
time.Sleep(time.Second)
} }
// Ensure worker has finished initialization // Ensure worker has finished initialization
...@@ -355,7 +357,7 @@ func testEmptyWork(t *testing.T, chainConfig *params.ChainConfig, engine consens ...@@ -355,7 +357,7 @@ func testEmptyWork(t *testing.T, chainConfig *params.ChainConfig, engine consens
for i := 0; i < 2; i += 1 { for i := 0; i < 2; i += 1 {
select { select {
case <-taskCh: case <-taskCh:
case <-time.NewTimer(2 * time.Second).C: case <-time.NewTimer(4 * time.Second).C:
t.Error("new task timeout") t.Error("new task timeout")
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment