summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTiwei Bie <tiwei.btw@antgroup.com>2020-10-14 14:41:23 +0800
committerTiwei Bie <tiwei.btw@antgroup.com>2020-10-14 14:41:23 +0800
commitca731934fe660489337991f6c5979a7741527d9a (patch)
tree980f4d2134a3d5f83365901c48c9b0fcbaad4a86
parent631dd5330d438729a7a8f6e00b279386924de640 (diff)
Disable strace+debug when explicitly requested
Currently strace+debug is always enabled as the setting from the upper layer isn't passed to _syscall_test(). And it will negatively affect the performance tests. This patch fixes this issue. The "debug" argument of _syscall_test() is also made mandatory to prevent this happening again. //test/perf:getpid_benchmark_runsc_kvm ----------------------------------------------------- Benchmark Time CPU Iterations ----------------------------------------------------- Before: BM_Getpid 28119 ns 28157 ns 25926 After: BM_Getpid 947 ns 939 ns 777778 Fixes #4509 Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
-rw-r--r--test/runner/defs.bzl12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/runner/defs.bzl b/test/runner/defs.bzl
index 232fdd4d4..9b5994d59 100644
--- a/test/runner/defs.bzl
+++ b/test/runner/defs.bzl
@@ -57,13 +57,13 @@ def _syscall_test(
platform,
use_tmpfs,
tags,
+ debug,
network = "none",
file_access = "exclusive",
overlay = False,
add_uds_tree = False,
vfs2 = False,
- fuse = False,
- debug = True):
+ fuse = False):
# Prepend "runsc" to non-native platform names.
full_platform = platform if platform == "native" else "runsc_" + platform
@@ -179,6 +179,7 @@ def syscall_test(
use_tmpfs = use_tmpfs,
add_uds_tree = add_uds_tree,
tags = platforms[default_platform] + vfs2_tags,
+ debug = debug,
vfs2 = True,
fuse = fuse,
)
@@ -194,6 +195,7 @@ def syscall_test(
use_tmpfs = False,
add_uds_tree = add_uds_tree,
tags = list(tags),
+ debug = debug,
)
for (platform, platform_tags) in platforms.items():
@@ -205,6 +207,7 @@ def syscall_test(
use_tmpfs = use_tmpfs,
add_uds_tree = add_uds_tree,
tags = platform_tags + tags,
+ debug = debug,
)
if add_overlay:
@@ -216,6 +219,7 @@ def syscall_test(
use_tmpfs = use_tmpfs,
add_uds_tree = add_uds_tree,
tags = platforms[default_platform] + tags,
+ debug = debug,
overlay = True,
)
@@ -232,6 +236,7 @@ def syscall_test(
use_tmpfs = use_tmpfs,
add_uds_tree = add_uds_tree,
tags = platforms[default_platform] + overlay_vfs2_tags,
+ debug = debug,
overlay = True,
vfs2 = True,
)
@@ -246,6 +251,7 @@ def syscall_test(
network = "host",
add_uds_tree = add_uds_tree,
tags = platforms[default_platform] + tags,
+ debug = debug,
)
if not use_tmpfs:
@@ -258,6 +264,7 @@ def syscall_test(
use_tmpfs = use_tmpfs,
add_uds_tree = add_uds_tree,
tags = platforms[default_platform] + tags,
+ debug = debug,
file_access = "shared",
)
_syscall_test(
@@ -268,6 +275,7 @@ def syscall_test(
use_tmpfs = use_tmpfs,
add_uds_tree = add_uds_tree,
tags = platforms[default_platform] + vfs2_tags,
+ debug = debug,
file_access = "shared",
vfs2 = True,
)