Skip to content

Commit

Permalink
[bazel] Fix or mark broken tests
Browse files Browse the repository at this point in the history
* Ensure every verilator test gets tagged with "cpu:4"
This was getting overwritten by tests that passed in their own tags and
they were likely to timeout/cause timeouts
* Mark triaged tests as broken
* Increase timeout on tests that time out during batch testing.

Signed-off-by: Drew Macrae <[email protected]>
  • Loading branch information
Drew Macrae authored and drewmacrae committed Dec 22, 2022
1 parent 8ef02ef commit 42ab42b
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 7 deletions.
4 changes: 2 additions & 2 deletions rules/opentitan_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def verilator_params(
local = _BASE_PARAMS["local"],
otp = _BASE_PARAMS["otp"],
rom = _BASE_PARAMS["rom"],
tags = _BASE_PARAMS["tags"] + ["cpu:4"],
tags = _BASE_PARAMS["tags"],
timeout = _BASE_PARAMS["timeout"],
test_runner = _BASE_PARAMS["test_runner"],
test_cmds = _BASE_PARAMS["test_cmds"] + [
Expand Down Expand Up @@ -152,7 +152,7 @@ def verilator_params(
"@//hw:verilator",
"@//hw:fusesoc_ignore",
]
required_tags = ["verilator"]
required_tags = ["verilator", "cpu:4"]
kwargs.update(
args = default_args + args,
data = required_data + data,
Expand Down
1 change: 1 addition & 0 deletions sw/device/lib/crypto/drivers/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ opentitan_functest(
srcs = ["entropy_test.c"],
verilator = verilator_params(
timeout = "long",
tags = ["broken"], # TODO #16672 test broken by icache
),
deps = [
":entropy",
Expand Down
44 changes: 41 additions & 3 deletions sw/device/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ opentitan_functest(
opentitan_functest(
name = "alert_handler_ping_timeout_test",
srcs = ["alert_handler_ping_timeout_test.c"],
cw310 = cw310_params(
timeout = "moderate",
),
verilator = verilator_params(
timeout = "long",
),
deps = [
"//hw/top_earlgrey:alert_handler_regs",
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
Expand Down Expand Up @@ -171,13 +177,22 @@ opentitan_functest(
opentitan_functest(
name = "alert_handler_reverse_ping_in_deep_sleep_test",
srcs = ["alert_handler_reverse_ping_in_deep_sleep_test.c"],
cw310 = cw310_params(
timeout = "moderate",
tags = ["broken"], # FIXME #16822 Test hangs on isolated runs
),
targets = [
# The test requires to run for > 0.2s, thus not recommended for
# Verilator as this will slow down CI too much. It should still
# be run as part of the DV nightly regression.
"verilator",
"cw310_test_rom",
"dv",
],
verilator = verilator_params(
timeout = "eternal",
tags = ["broken"], # FIXME #16822 Test hangs on isolated runs
),
deps = [
"//hw/top_earlgrey:alert_handler_regs",
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
Expand Down Expand Up @@ -449,6 +464,9 @@ opentitan_functest(
opentitan_functest(
name = "chip_power_idle_load",
srcs = ["chip_power_idle_load.c"],
verilator = verilator_params(
tags = ["broken"], # FIXME #16374 test doesn't make progress after enabling PWM
),
deps = [
"//sw/device/lib/base:mmio",
"//sw/device/lib/dif:alert_handler",
Expand Down Expand Up @@ -562,6 +580,9 @@ opentitan_functest(
opentitan_functest(
name = "clkmgr_off_peri_test",
srcs = ["clkmgr_off_peri_test.c"],
verilator = verilator_params(
timeout = "eternal",
),
deps = [
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
"//sw/device/lib/base:abs_mmio",
Expand Down Expand Up @@ -634,8 +655,7 @@ opentitan_functest(
name = "clkmgr_reset_frequency_test",
srcs = ["clkmgr_reset_frequency_test.c"],
verilator = verilator_params(
# FIXME #13611
tags = ["broken"],
timeout = "long",
),
deps = [
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
Expand Down Expand Up @@ -888,6 +908,9 @@ opentitan_functest(
opentitan_functest(
name = "entropy_src_edn_reqs_test",
srcs = ["entropy_src_edn_reqs_test.c"],
verilator = verilator_params(
timeout = "long",
),
deps = [
":otbn_randomness_impl",
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
Expand Down Expand Up @@ -1142,6 +1165,9 @@ opentitan_functest(
opentitan_functest(
name = "keymgr_key_derivation_test",
srcs = ["keymgr_key_derivation_test.c"],
verilator = verilator_params(
timeout = "long",
),
deps = [
"//hw/ip/keymgr/data:keymgr_regs",
"//hw/ip/kmac/data:kmac_regs",
Expand Down Expand Up @@ -1187,6 +1213,9 @@ opentitan_functest(
opentitan_functest(
name = "keymgr_sideload_kmac_test",
srcs = ["keymgr_sideload_kmac_test.c"],
verilator = verilator_params(
timeout = "long",
),
deps = [
"//hw/ip/keymgr/data:keymgr_regs",
"//hw/ip/kmac/data:kmac_regs",
Expand Down Expand Up @@ -1350,6 +1379,9 @@ opentitan_functest(
opentitan_functest(
name = "otbn_irq_test",
srcs = ["otbn_irq_test.c"],
verilator = verilator_params(
timeout = "long",
),
deps = [
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
"//sw/device/lib/dif:otbn",
Expand All @@ -1372,7 +1404,7 @@ opentitan_functest(
tags = ["broken"],
),
verilator = verilator_params(
tags = ["broken"],
timeout = "long",
),
deps = [
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
Expand Down Expand Up @@ -1403,6 +1435,9 @@ cc_library(
opentitan_functest(
name = "otbn_randomness_test",
srcs = ["otbn_randomness_test.c"],
verilator = verilator_params(
timeout = "long",
),
deps = [
":otbn_randomness_impl",
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
Expand Down Expand Up @@ -1878,6 +1913,9 @@ opentitan_functest(
opentitan_functest(
name = "rstmgr_alert_info_test",
srcs = ["rstmgr_alert_info_test.c"],
cw310 = cw310_params(
tags = ["broken"], # FIXME #16576 fails in non-CI environments
),
targets = [
"cw310_test_rom",
"verilator",
Expand Down
4 changes: 3 additions & 1 deletion sw/device/tests/crypto/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,16 @@ opentitan_functest(
srcs = ["rsa_3072_verify_functest.c"],
cw310 = cw310_params(
timeout = "long",
tags = ["broken"], # FIXME #16805 hangs at vector 170
),
targets = [
"cw310_test_rom",
"verilator",
"dv",
],
verilator = verilator_params(
timeout = "long",
timeout = "eternal",
tags = ["broken"], # FIXME #16805 hangs at vector 165 after ~3h
),
deps = [
":rsa_3072_verify_testvectors_wycheproof_header",
Expand Down
2 changes: 1 addition & 1 deletion third_party/coremark/top_earlgrey/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ opentitan_functest(
"-DMAIN_HAS_NOARGC=1",
],
verilator = verilator_params(
timeout = "long",
timeout = "eternal",
),
deps = [
":core_portme",
Expand Down

0 comments on commit 42ab42b

Please sign in to comment.