summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--kokoro/go_tests.cfg (renamed from kokoro/go_test.cfg)0
-rwxr-xr-xscripts/common_bazel.sh2
-rwxr-xr-xscripts/kvm_tests.sh7
-rw-r--r--test/root/cgroup_test.go18
-rw-r--r--test/syscalls/linux/proc_net.cc2
-rwxr-xr-xtools/go_branch.sh6
6 files changed, 16 insertions, 19 deletions
diff --git a/kokoro/go_test.cfg b/kokoro/go_tests.cfg
index 5eb51041a..5eb51041a 100644
--- a/kokoro/go_test.cfg
+++ b/kokoro/go_tests.cfg
diff --git a/scripts/common_bazel.sh b/scripts/common_bazel.sh
index 5340c7323..dc0e2041d 100755
--- a/scripts/common_bazel.sh
+++ b/scripts/common_bazel.sh
@@ -56,7 +56,7 @@ function test() {
(bazel test "${BAZEL_RBE_FLAGS[@]}" "${BAZEL_RBE_AUTH_FLAGS[@]}" "${BAZEL_FLAGS[@]}" "$@" && rc=0) || rc=$?
# Zip out everything into a convenient form.
- if [[ -v KOKORO_ARTIFACTS_DIR ]]; then
+ if [[ -v KOKORO_ARTIFACTS_DIR ]] && [[ -e bazel-testlogs ]]; then
find -L "bazel-testlogs" -name "test.xml" -o -name "test.log" -o -name "outputs.zip" |
tar --create --files-from - --transform 's/test\./sponge_log./' |
tar --extract --directory ${KOKORO_ARTIFACTS_DIR}
diff --git a/scripts/kvm_tests.sh b/scripts/kvm_tests.sh
index 5cb7aa007..b6d787f0f 100755
--- a/scripts/kvm_tests.sh
+++ b/scripts/kvm_tests.sh
@@ -20,11 +20,10 @@ source $(dirname $0)/common.sh
(lsmod | grep -E '^(kvm_intel|kvm_amd)') || sudo modprobe kvm
sudo chmod a+rw /dev/kvm
-# Run all KVM-tagged tests (locally).
-test --test_strategy=standalone --test_tag_filters=requires-kvm //...
-test --test_strategy=standalone //pkg/sentry/platform/kvm:kvm_test
+# Run all KVM platform tests (locally).
+run_as_root //pkg/sentry/platform/kvm:kvm_test
# Install the KVM runtime and run all integration tests.
run_as_root //runsc install --experimental=true -- --debug --strace --log-packets --platform=kvm
sudo systemctl restart docker
-test --test_strategy=standalone //test/image:image_test //test/e2e:integration_test
+test //test/image:image_test //test/e2e:integration_test
diff --git a/test/root/cgroup_test.go b/test/root/cgroup_test.go
index cc7e8583e..76f1e4f2a 100644
--- a/test/root/cgroup_test.go
+++ b/test/root/cgroup_test.go
@@ -62,6 +62,12 @@ func TestCgroup(t *testing.T) {
}
d := dockerutil.MakeDocker("cgroup-test")
+ // This is not a comprehensive list of attributes.
+ //
+ // Note that we are specifically missing cpusets, which fail if specified.
+ // In any case, it's unclear if cpusets can be reliably tested here: these
+ // are often run on a single core virtual machine, and there is only a single
+ // CPU available in our current set, and every container's set.
attrs := []struct {
arg string
ctrl string
@@ -88,18 +94,6 @@ func TestCgroup(t *testing.T) {
want: "3000",
},
{
- arg: "--cpuset-cpus=0",
- ctrl: "cpuset",
- file: "cpuset.cpus",
- want: "0",
- },
- {
- arg: "--cpuset-mems=0",
- ctrl: "cpuset",
- file: "cpuset.mems",
- want: "0",
- },
- {
arg: "--kernel-memory=100MB",
ctrl: "memory",
file: "memory.kmem.limit_in_bytes",
diff --git a/test/syscalls/linux/proc_net.cc b/test/syscalls/linux/proc_net.cc
index c097af196..efdaf202b 100644
--- a/test/syscalls/linux/proc_net.cc
+++ b/test/syscalls/linux/proc_net.cc
@@ -28,7 +28,7 @@ TEST(ProcNetIfInet6, Format) {
EXPECT_THAT(ifinet6,
::testing::MatchesRegex(
// Ex: "00000000000000000000000000000001 01 80 10 80 lo\n"
- "^([a-f\\d]{32}( [a-f\\d]{2}){4} +[a-z][a-z\\d]*\\n)+$"));
+ "^([a-f0-9]{32}( [a-f0-9]{2}){4} +[a-z][a-z0-9]*\n)+$"));
}
TEST(ProcSysNetIpv4Sack, Exists) {
diff --git a/tools/go_branch.sh b/tools/go_branch.sh
index d9e79401d..ddb9b6e7b 100755
--- a/tools/go_branch.sh
+++ b/tools/go_branch.sh
@@ -59,7 +59,11 @@ git checkout -b go "${go_branch}"
# Start working on a merge commit that combines the previous history with the
# current history. Note that we don't actually want any changes yet.
-git merge --allow-unrelated-histories --no-commit --strategy ours ${head}
+#
+# N.B. The git behavior changed at some point and the relevant flag was added
+# to allow for override, so try the only behavior first then pass the flag.
+git merge --no-commit --strategy ours ${head} || \
+ git merge --allow-unrelated-histories --no-commit --strategy ours ${head}
# Sync the entire gopath_dir and go.mod.
rsync --recursive --verbose --delete --exclude .git --exclude README.md -L "${gopath_dir}/" .