mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
test: add syscall_test() perf argument
PiperOrigin-RevId: 732194076
This commit is contained in:
+26
-78
@@ -7,69 +7,51 @@ package(
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:clock_getres_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:clock_gettime_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:death_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:epoll_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:poll_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:select_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:fork_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
timeout = "long",
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:futex_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
shard_count = more_shards,
|
||||
tags = ["nogotsan"],
|
||||
test = "//test/perf/linux:getdents_benchmark",
|
||||
@@ -77,136 +59,104 @@ syscall_test(
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:getpid_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
tags = ["nogotsan"],
|
||||
test = "//test/perf/linux:gettid_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:mapping_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
add_overlay = True,
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:open_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
add_overlay = True,
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:open_read_close_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
add_overlay = True,
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:dup_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:pipe_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
add_overlay = True,
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:randread_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
add_overlay = True,
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:read_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:sched_yield_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:send_recv_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
add_overlay = True,
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:seqwrite_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:signal_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:sleep_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
add_overlay = True,
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:stat_benchmark",
|
||||
)
|
||||
|
||||
syscall_test(
|
||||
size = "large",
|
||||
add_overlay = True,
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
tags = ["nogotsan"],
|
||||
test = "//test/perf/linux:unlink_benchmark",
|
||||
)
|
||||
@@ -214,8 +164,6 @@ syscall_test(
|
||||
syscall_test(
|
||||
size = "large",
|
||||
add_overlay = True,
|
||||
debug = False,
|
||||
# Takes too long to run with S/R.
|
||||
save = False,
|
||||
perf = True,
|
||||
test = "//test/perf/linux:write_benchmark",
|
||||
)
|
||||
|
||||
+15
-2
@@ -374,13 +374,14 @@ def syscall_test(
|
||||
iouring = False,
|
||||
allow_native = True,
|
||||
leak_check = True,
|
||||
debug = True,
|
||||
debug = None,
|
||||
container = None,
|
||||
tags = None,
|
||||
save = True,
|
||||
save = None,
|
||||
size = "medium",
|
||||
overlay = False,
|
||||
netstack_sr = False,
|
||||
perf = False,
|
||||
**kwargs):
|
||||
"""syscall_test is a macro that will create targets for all platforms.
|
||||
|
||||
@@ -403,11 +404,23 @@ def syscall_test(
|
||||
leak_check: enables leak check.
|
||||
save: enables save/restore and save/resume test variants.
|
||||
size: test size.
|
||||
overlay: add overlayfs test variants.
|
||||
netstack_sr: if save is true, add netstack save/restore test variants.
|
||||
perf: test is a benchmark.
|
||||
**kwargs: additional test arguments.
|
||||
"""
|
||||
if not tags:
|
||||
tags = []
|
||||
|
||||
# Debug logs and save/save_resume test variants are disabled by default for
|
||||
# benchmarks and enabled by default otherwise.
|
||||
if debug == None:
|
||||
debug = not perf
|
||||
if save == None:
|
||||
save = not perf
|
||||
if perf:
|
||||
tags.append("perf")
|
||||
|
||||
if allow_native:
|
||||
_syscall_test(
|
||||
test = test,
|
||||
|
||||
Reference in New Issue
Block a user