Tweak aarch64 support.

A few images were broken with respect to aarch64. We should now
be able to run push-all-images with ARCH=aarch64 as part of the
regular continuous integration builds, and add aarch64 smoke tests
(via user emulation for now) to the regular test suite (future).

PiperOrigin-RevId: 346685462
This commit is contained in:
Adin Scannell
2020-12-09 18:51:17 -08:00
committed by gVisor bot
parent 92ca72ecb7
commit 65a2242db4
9 changed files with 43 additions and 25 deletions
+8 -8
View File
@@ -9,7 +9,8 @@ _templates:
steps:
# Run basic smoke tests before preceding to other tests.
- label: ":fire: Smoke tests"
- <<: *common
label: ":fire: Smoke tests"
command: make smoke-tests
- wait
@@ -77,25 +78,24 @@ steps:
label: ":hammer: Packetimpact tests"
command: make packetimpact-tests
# Start heavy runtime tests.
- wait
# Runtime tests.
- <<: *common
label: ":php: PHP runtime tests"
command: make php7.3.6-runtime-tests
command: make php7.3.6-runtime-tests_vfs2
parallelism: 10
- <<: *common
label: ":java: Java runtime tests"
command: make java11-runtime-tests
command: make java11-runtime-tests_vfs2
parallelism: 40
- <<: *common
label: ":golang: Go runtime tests"
command: make go1.12-runtime-tests
command: make go1.12-runtime-tests_vfs2
parallelism: 10
- <<: *common
label: ":node: NodeJS runtime tests"
command: make nodejs12.4.0-runtime-tests
command: make nodejs12.4.0-runtime-tests_vfs2
parallelism: 10
- <<: *common
label: ":python: Python runtime tests"
command: make python3.7.3-runtime-tests
command: make python3.7.3-runtime-tests_vfs2
parallelism: 10
@@ -12,6 +12,7 @@ RUN set -x \
unzip \
python3 \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://github.com/bazelbuild/bazel/releases/download/0.27.0/bazel-0.27.0-installer-linux-x86_64.sh
RUN chmod +x bazel-0.27.0-installer-linux-x86_64.sh
RUN ./bazel-0.27.0-installer-linux-x86_64.sh
+7 -6
View File
@@ -1,12 +1,13 @@
FROM ubuntu:18.04
FROM golang:1.15 as build
RUN go get github.com/rakyll/hey
WORKDIR /go/src/github.com/rakyll/hey
RUN go mod download
RUN CGO_ENABLED=0 go build -o /hey hey.go
FROM ubuntu:18.04
RUN set -x \
&& apt-get update \
&& apt-get install -y \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://storage.googleapis.com/hey-release/hey_linux_amd64 \
&& chmod 777 hey_linux_amd64 \
&& cp hey_linux_amd64 /bin/hey \
&& rm hey_linux_amd64
COPY --from=build /hey /bin/hey
@@ -14,6 +14,7 @@ RUN set -x \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://github.com/bazelbuild/bazel/releases/download/3.4.1/bazel-3.4.1-installer-linux-x86_64.sh
RUN chmod +x bazel-3.4.1-installer-linux-x86_64.sh
RUN ./bazel-3.4.1-installer-linux-x86_64.sh
+5 -1
View File
@@ -1,16 +1,20 @@
FROM fedora:31
# Install bazel.
RUN dnf install -y dnf-plugins-core && dnf copr enable -y vbatts/bazel
RUN dnf install -y git gcc make golang gcc-c++ glibc-devel python3 which python3-pip python3-devel libffi-devel openssl-devel pkg-config glibc-static libstdc++-static patch diffutils
RUN pip install --no-cache-dir pycparser
RUN dnf install -y bazel3
# Install gcloud.
# Install gcloud. Note that while this is "x86_64", it doesn't actually matter.
RUN curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-289.0.0-linux-x86_64.tar.gz | \
tar zxf - google-cloud-sdk && \
google-cloud-sdk/install.sh && \
ln -s /google-cloud-sdk/bin/gcloud /usr/bin/gcloud
# Install Docker client for the website build.
RUN dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
RUN dnf install -y docker-ce-cli
WORKDIR /workspace
ENTRYPOINT ["/usr/bin/bazel"]
+3
View File
@@ -22,6 +22,7 @@ import (
"io/ioutil"
"os"
"os/signal"
"runtime"
"syscall"
"time"
@@ -207,6 +208,8 @@ func Main(version string) {
log.Infof("***************************")
log.Infof("Args: %s", os.Args)
log.Infof("Version %s", version)
log.Infof("GOOS: %s", runtime.GOOS)
log.Infof("GOARCH: %s", runtime.GOARCH)
log.Infof("PID: %d", os.Getpid())
log.Infof("UID: %d, GID: %d", os.Getuid(), os.Getgid())
log.Infof("Configuration:")
+7 -3
View File
@@ -44,8 +44,8 @@ BUILD_ROOTS := bazel-bin/ bazel-out/
# Bazel container configuration (see below).
USER := $(shell whoami)
HASH := $(shell readlink -m $(CURDIR) | md5sum | cut -c1-8)
BUILDER_NAME := gvisor-builder-$(HASH)
DOCKER_NAME := gvisor-bazel-$(HASH)
BUILDER_NAME := gvisor-builder-$(HASH)-$(ARCH)
DOCKER_NAME := gvisor-bazel-$(HASH)-$(ARCH)
DOCKER_PRIVILEGED := --privileged
BAZEL_CACHE := $(shell readlink -m ~/.cache/bazel/)
GCLOUD_CONFIG := $(shell readlink -m ~/.config/gcloud/)
@@ -164,7 +164,7 @@ bazel-image: load-default ## Ensures that the local builder exists.
@docker commit $(BUILDER_NAME) gvisor.dev/images/builder
.PHONY: bazel-image
ifeq (,$(findstring $(DOCKER_NAME),$(shell docker ps 2>/dev/null)))
ifneq (true,$(shell $(wrapper echo true)))
bazel-server: bazel-image ## Ensures that the server exists.
@$(call header,DOCKER RUN)
@docker rm -f $(DOCKER_NAME) 2>/dev/null || true
@@ -208,6 +208,10 @@ run = $(call header,RUN $(1) $(2)) && $(call build_paths,$(1),{} $(2))
sudo = $(call header,SUDO $(1) $(2)) && $(call build_paths,$(1),sudo -E {} $(2))
test = $(call header,TEST $(1)) && $(call wrapper,$(BAZEL) test $(TEST_OPTIONS) $(1))
clean: ## Cleans the bazel cache.
@$(call clean)
.PHONY: clean
testlogs: ## Returns the most recent set of test logs.
@if test -f .build_events.json; then \
cat .build_events.json | jq -r \
+11 -7
View File
@@ -99,8 +99,8 @@ loaded1_$(1)=.PHONY: load-$$(1)
endef
$(foreach image, $(EXISTING_IMAGES), $(eval $(call existing_image_rule,$(image))))
define tag_expand_rule =
$(eval $(loaded0_$(call local_image,$(1))_$(call tag,$(1))))
$(eval $(loaded1_$(call local_image,$(1))_$(call tag,$(1))))
$(eval $(loaded0_$(call remote_image,$(1))_$(call tag,$(1))))
$(eval $(loaded1_$(call remote_image,$(1))_$(call tag,$(1))))
endef
$(foreach image, $(ALL_IMAGES), $(eval $(call tag_expand_rule,$(image))))
@@ -108,16 +108,19 @@ $(foreach image, $(ALL_IMAGES), $(eval $(call tag_expand_rule,$(image))))
# ensure that caching works as expected, as well as the "latest" tag that is
# used by the tests.
local_tag = \
docker tag $(call remote_image,$(1)):$(call tag,$(1)) $(call local_image,$(1)):$(call tag,$(1)) && \
docker tag $(call remote_image,$(1)):$(call tag,$(1)) $(call local_image,$(1))
docker tag $(call remote_image,$(1)):$(call tag,$(1)) $(call local_image,$(1)):$(call tag,$(1))
latest_tag = \
docker tag $(call local_image,$(1)):$(call tag,$(1)) $(call local_image,$(1))
tag-%: ## Tag a local image.
@$(call local_tag,$*)
@$(call header,TAG $*)
@$(call local_tag,$*) && $(call latest_tag,$*)
# pull forces the image to be pulled.
pull = \
$(call header,PULL $(1)) && \
docker pull $(DOCKER_PLATFORM_ARGS) $(call remote_image,$(1)):$(call tag,$(1)) && \
$(call local_tag,$(1))
$(call local_tag,$(1)) && \
$(call latest_tag,$(1))
pull-%: register-cross ## Force a repull of the image.
@$(call pull,$*)
@@ -134,7 +137,8 @@ rebuild = \
-t "$(call remote_image,$(1)):$(call tag,$(1))" \
$$T && \
rm -rf $$T) && \
$(call local_tag,$(1))
$(call local_tag,$(1)) && \
$(call latest_tag,$(1))
rebuild-%: register-cross ## Force rebuild an image locally.
@$(call rebuild,$*)