From b566859acc6af3426e8efdacc5ec352fa17bc648 Mon Sep 17 00:00:00 2001 From: Wei Fu Date: Tue, 21 Apr 2020 00:15:03 +0800 Subject: [PATCH 1/2] .zuul: update go version to 1.13.10 Signed-off-by: Wei Fu --- .zuul/playbooks/containerd-build/run.yaml | 32 ++++++++++++----------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.zuul/playbooks/containerd-build/run.yaml b/.zuul/playbooks/containerd-build/run.yaml index 7651c7753..041cc914a 100644 --- a/.zuul/playbooks/containerd-build/run.yaml +++ b/.zuul/playbooks/containerd-build/run.yaml @@ -1,21 +1,23 @@ - hosts: all become: yes roles: - - role: config-golang - arch: arm64 + - role: config-golang + go_version: '1.13.10' + arch: arm64 tasks: - - name: Build containerd - shell: - cmd: | - set -xe - set -o pipefail - apt-get update - apt-get install -y btrfs-tools libseccomp-dev git pkg-config + - name: Build containerd + shell: + cmd: | + set -xe + set -o pipefail + apt-get update + apt-get install -y btrfs-tools libseccomp-dev git pkg-config - make | tee $LOGS_PATH/make.txt - make test | tee $LOGS_PATH/make_test.txt + go version + make | tee $LOGS_PATH/make.txt + make test | tee $LOGS_PATH/make_test.txt - cp -r ./bin $RESULTS_PATH - chdir: '{{ zuul.project.src_dir }}' - executable: /bin/bash - environment: '{{ global_env }}' + cp -r ./bin $RESULTS_PATH + chdir: '{{ zuul.project.src_dir }}' + executable: /bin/bash + environment: '{{ global_env }}' From 9687ba6315d2a4f37224101790a8d74e4963907a Mon Sep 17 00:00:00 2001 From: Wei Fu Date: Wed, 22 Apr 2020 23:15:47 +0800 Subject: [PATCH 2/2] test: TestRuntimeWithEmptyMaxEnvProcs should cleanup TestRuntimeWithEmptyMaxEnvProcs should restore the GoMaxProcs after test so that the temporary change of GoMaxProcs will not impact other case, like TestRuntimeWithNonEmptyMaxEnvProcs. Signed-off-by: Wei Fu --- runtime/v2/shim/shim_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/runtime/v2/shim/shim_test.go b/runtime/v2/shim/shim_test.go index 23a962a82..2ba6fbcd9 100644 --- a/runtime/v2/shim/shim_test.go +++ b/runtime/v2/shim/shim_test.go @@ -24,11 +24,14 @@ import ( ) func TestRuntimeWithEmptyMaxEnvProcs(t *testing.T) { + var oldGoMaxProcs = runtime.GOMAXPROCS(0) + defer runtime.GOMAXPROCS(oldGoMaxProcs) os.Setenv("GOMAXPROCS", "") setRuntime() - var oldGoMaxProcs = runtime.GOMAXPROCS(0) - if oldGoMaxProcs != 2 { + + var currentGoMaxProcs = runtime.GOMAXPROCS(0) + if currentGoMaxProcs != 2 { t.Fatal("the max number of procs should be 2") } }