summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2019-03-01 14:37:18 -0800
committerShentubot <shentubot@google.com>2019-03-01 14:38:10 -0800
commit96226f9a473c0c55e0b632f9fbe883b078a234ea (patch)
treeb0f0afe2857be2d5973b679c52d0c8ca198d573d
parent9177bcd0ba7f68bd5e28123c95fe0d69f822703e (diff)
Mark socket_ipv4_udp_unbound_loopback flaky
To do so, we must add the ability to add tags to the syscall tests. PiperOrigin-RevId: 236380371 Change-Id: I76d15feb2700f20115b27aab362a88cebe8c7a6a
-rw-r--r--test/syscalls/BUILD6
-rw-r--r--test/syscalls/build_defs.bzl62
2 files changed, 60 insertions, 8 deletions
diff --git a/test/syscalls/BUILD b/test/syscalls/BUILD
index 1be7a9bd4..39f1de0c9 100644
--- a/test/syscalls/BUILD
+++ b/test/syscalls/BUILD
@@ -363,7 +363,11 @@ syscall_test(
test = "//test/syscalls/linux:socket_ip_udp_loopback_test",
)
-syscall_test(test = "//test/syscalls/linux:socket_ipv4_udp_unbound_loopback_test")
+syscall_test(
+ # FIXME
+ tags = ["flaky"],
+ test = "//test/syscalls/linux:socket_ipv4_udp_unbound_loopback_test",
+)
syscall_test(test = "//test/syscalls/linux:socket_netdevice_test")
diff --git a/test/syscalls/build_defs.bzl b/test/syscalls/build_defs.bzl
index b9f8c6503..88777f55b 100644
--- a/test/syscalls/build_defs.bzl
+++ b/test/syscalls/build_defs.bzl
@@ -2,14 +2,59 @@
# syscall_test is a macro that will create targets to run the given test target
# on the host (native) and runsc.
-def syscall_test(test, shard_count = 1, size = "small", use_tmpfs = False):
- _syscall_test(test, shard_count, size, "native", False)
- _syscall_test(test, shard_count, size, "kvm", use_tmpfs)
- _syscall_test(test, shard_count, size, "ptrace", use_tmpfs)
+def syscall_test(
+ test,
+ shard_count = 1,
+ size = "small",
+ use_tmpfs = False,
+ tags = None):
+ _syscall_test(
+ test = test,
+ shard_count = shard_count,
+ size = size,
+ platform = "native",
+ use_tmpfs = False,
+ tags = tags,
+ )
+
+ _syscall_test(
+ test = test,
+ shard_count = shard_count,
+ size = size,
+ platform = "kvm",
+ use_tmpfs = use_tmpfs,
+ tags = tags,
+ )
+
+ _syscall_test(
+ test = test,
+ shard_count = shard_count,
+ size = size,
+ platform = "ptrace",
+ use_tmpfs = use_tmpfs,
+ tags = tags,
+ )
+
if not use_tmpfs:
- _syscall_test(test, shard_count, size, "ptrace", use_tmpfs, "shared")
+ # Also test shared gofer access.
+ _syscall_test(
+ test = test,
+ shard_count = shard_count,
+ size = size,
+ platform = "ptrace",
+ use_tmpfs = use_tmpfs,
+ tags = tags,
+ file_access = "shared",
+ )
-def _syscall_test(test, shard_count, size, platform, use_tmpfs, file_access = "exclusive"):
+def _syscall_test(
+ test,
+ shard_count,
+ size,
+ platform,
+ use_tmpfs,
+ tags,
+ file_access = "exclusive"):
test_name = test.split(":")[1]
# Prepend "runsc" to non-native platform names.
@@ -19,9 +64,12 @@ def _syscall_test(test, shard_count, size, platform, use_tmpfs, file_access = "e
if file_access == "shared":
name += "_shared"
+ if tags == None:
+ tags = []
+
# Add the full_platform and file access in a tag to make it easier to run
# all the tests on a specific flavor. Use --test_tag_filters=ptrace,file_shared.
- tags = [full_platform, "file_" + file_access]
+ tags += [full_platform, "file_" + file_access]
# Add tag to prevent the tests from running in a Bazel sandbox.
# TODO: Make the tests run without this tag.