Browse code

image: skip the import test on AArch64

The commit '0a13f827a10d3bf61744d9b3f7165c5885a39c5d' introduces an
import test for CVE-2017-14992, it uses a 8GB image to make sure we
don't revert CVE-2017-14992, but unfortunately this test can't finish
in 5-min on AArch64, as a fact, in most cases we have to crate a very
big image to make the test effective on AArch64, but this will result
in a test panic, so now we skip it order to avoid termination of others
tests followed.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>

Dennis Chen authored on 2017/11/22 19:42:58
Showing 1 changed files
... ...
@@ -5,6 +5,7 @@ import (
5 5
 	"bytes"
6 6
 	"context"
7 7
 	"io"
8
+	"runtime"
8 9
 	"testing"
9 10
 
10 11
 	"github.com/docker/docker/api/types"
... ...
@@ -14,12 +15,17 @@ import (
14 14
 
15 15
 // Ensure we don't regress on CVE-2017-14992.
16 16
 func TestImportExtremelyLargeImageWorks(t *testing.T) {
17
+	if runtime.GOARCH == "arm64" {
18
+		t.Skip("effective test will be time out")
19
+	}
20
+
17 21
 	client := request.NewAPIClient(t)
18 22
 
19 23
 	// Construct an empty tar archive with about 8GB of junk padding at the
20 24
 	// end. This should not cause any crashes (the padding should be mostly
21 25
 	// ignored).
22 26
 	var tarBuffer bytes.Buffer
27
+
23 28
 	tw := tar.NewWriter(&tarBuffer)
24 29
 	if err := tw.Close(); err != nil {
25 30
 		t.Fatal(err)