mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix minor Kokoro issues.
A recent Kokoro change pointed to go_tests.cfg (in line with the other configurations), which unfortunately broke the presubmits. This change also enabled the KVM tests, which were still using a remote execution strategy. This fixes both of these issues and allows presubmits to pass. One additional test was caught with this case, which seems to have been broken. It's unclear why this was not being caught. PiperOrigin-RevId: 268166291
This commit is contained in:
committed by
gVisor bot
parent
9dfcd8b09f
commit
849c57314f
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -87,18 +93,6 @@ func TestCgroup(t *testing.T) {
|
||||
file: "cpu.cfs_quota_us",
|
||||
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",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
+5
-1
@@ -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}/" .
|
||||
|
||||
Reference in New Issue
Block a user