summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2020-08-20 16:16:46 -0700
committerAndrei Vagin <avagin@gmail.com>2020-09-09 17:53:10 -0700
commit4c758df8075628e10a58c0117a17dc5c41d57be9 (patch)
tree59b4b2fffa53a2e338746eae7990d46eab196cb3
parentb17c7094f706ce92eba44e72e2cede8814b29607 (diff)
Enable strace+debug in syscall tests
This is done to ease troubleshooting when tests fail. runsc logs are not stored when tests passe, so this will only affect failing tests and should not increase log storage too badly. PiperOrigin-RevId: 327717551
-rw-r--r--test/perf/BUILD22
-rw-r--r--test/runner/defs.bzl6
-rw-r--r--test/syscalls/BUILD2
3 files changed, 29 insertions, 1 deletions
diff --git a/test/perf/BUILD b/test/perf/BUILD
index 471d8c2ab..b763be50e 100644
--- a/test/perf/BUILD
+++ b/test/perf/BUILD
@@ -3,33 +3,40 @@ load("//test/runner:defs.bzl", "syscall_test")
package(licenses = ["notice"])
syscall_test(
+ debug = False,
test = "//test/perf/linux:clock_getres_benchmark",
)
syscall_test(
+ debug = False,
test = "//test/perf/linux:clock_gettime_benchmark",
)
syscall_test(
+ debug = False,
test = "//test/perf/linux:death_benchmark",
)
syscall_test(
+ debug = False,
test = "//test/perf/linux:epoll_benchmark",
)
syscall_test(
size = "large",
+ debug = False,
test = "//test/perf/linux:fork_benchmark",
)
syscall_test(
size = "large",
+ debug = False,
test = "//test/perf/linux:futex_benchmark",
)
syscall_test(
size = "enormous",
+ debug = False,
shard_count = 10,
tags = ["nogotsan"],
test = "//test/perf/linux:getdents_benchmark",
@@ -37,81 +44,96 @@ syscall_test(
syscall_test(
size = "large",
+ debug = False,
test = "//test/perf/linux:getpid_benchmark",
)
syscall_test(
size = "enormous",
+ debug = False,
tags = ["nogotsan"],
test = "//test/perf/linux:gettid_benchmark",
)
syscall_test(
size = "large",
+ debug = False,
test = "//test/perf/linux:mapping_benchmark",
)
syscall_test(
size = "large",
add_overlay = True,
+ debug = False,
test = "//test/perf/linux:open_benchmark",
)
syscall_test(
+ debug = False,
test = "//test/perf/linux:pipe_benchmark",
)
syscall_test(
size = "large",
add_overlay = True,
+ debug = False,
test = "//test/perf/linux:randread_benchmark",
)
syscall_test(
size = "large",
add_overlay = True,
+ debug = False,
test = "//test/perf/linux:read_benchmark",
)
syscall_test(
size = "large",
+ debug = False,
test = "//test/perf/linux:sched_yield_benchmark",
)
syscall_test(
size = "large",
+ debug = False,
test = "//test/perf/linux:send_recv_benchmark",
)
syscall_test(
size = "large",
add_overlay = True,
+ debug = False,
test = "//test/perf/linux:seqwrite_benchmark",
)
syscall_test(
size = "enormous",
+ debug = False,
test = "//test/perf/linux:signal_benchmark",
)
syscall_test(
+ debug = False,
test = "//test/perf/linux:sleep_benchmark",
)
syscall_test(
size = "large",
add_overlay = True,
+ debug = False,
test = "//test/perf/linux:stat_benchmark",
)
syscall_test(
size = "enormous",
add_overlay = True,
+ debug = False,
test = "//test/perf/linux:unlink_benchmark",
)
syscall_test(
size = "large",
add_overlay = True,
+ debug = False,
test = "//test/perf/linux:write_benchmark",
)
diff --git a/test/runner/defs.bzl b/test/runner/defs.bzl
index 2d64934b0..032ebd04e 100644
--- a/test/runner/defs.bzl
+++ b/test/runner/defs.bzl
@@ -62,7 +62,8 @@ def _syscall_test(
overlay = False,
add_uds_tree = False,
vfs2 = False,
- fuse = False):
+ fuse = False,
+ debug = True):
# Prepend "runsc" to non-native platform names.
full_platform = platform if platform == "native" else "runsc_" + platform
@@ -111,6 +112,8 @@ def _syscall_test(
"--add-uds-tree=" + str(add_uds_tree),
"--vfs2=" + str(vfs2),
"--fuse=" + str(fuse),
+ "--strace=" + str(debug),
+ "--debug=" + str(debug),
]
# Call the rule above.
@@ -134,6 +137,7 @@ def syscall_test(
add_hostinet = False,
vfs2 = True,
fuse = False,
+ debug = True,
tags = None):
"""syscall_test is a macro that will create targets for all platforms.
diff --git a/test/syscalls/BUILD b/test/syscalls/BUILD
index d11412c55..9897946ed 100644
--- a/test/syscalls/BUILD
+++ b/test/syscalls/BUILD
@@ -64,6 +64,8 @@ syscall_test(
syscall_test(
size = "large",
+ # Produce too many logs in the debug mode.
+ debug = False,
shard_count = 50,
# Takes too long for TSAN. Since this is kind of a stress test that doesn't
# involve much concurrency, TSAN's usefulness here is limited anyway.