Skip to content

Commit

Permalink
cheribsd: Add missing CHERI(-PURECAP)-CAPREVOKE-QEMU-MFS-ROOT kernels
Browse files Browse the repository at this point in the history
Otherwise cheribsd-mfs-root-kernel-riscv64-{hybrid,purecap} hit an
assertion failure when --cheribsd/caprevoke-kernel is passed.
  • Loading branch information
jrtc27 committed Aug 16, 2023
1 parent 4033ebe commit deb5634
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pycheribuild/projects/cross/cheribsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ def make_all(self) -> "list[CheriBSDConfig]":
configs.append(self.make_config({ConfigPlatform.QEMU}, kernel_abi, caprevoke=True, default=True))
configs.append(
self.make_config({ConfigPlatform.QEMU}, kernel_abi, caprevoke=True, benchmark=True, default=True))
configs.append(
self.make_config({ConfigPlatform.QEMU}, kernel_abi, caprevoke=True, mfsroot=True, default=True))
configs.append(
self.make_config({ConfigPlatform.QEMU}, kernel_abi, caprevoke=True, benchmark=True, mfsroot=True,
default=True))
Expand Down
8 changes: 8 additions & 0 deletions tests/test_argument_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,14 @@ def test_kernel_configs(target, config_options: "list[str]", expected_kernels: "
["--cheribsd/build-bench-kernels", "--cheribsd/default-kernel-abi=hybrid"],
["GENERIC-MFS-ROOT"],
),
# Another regression test for assert len(configs) != 0, "No matching default kernel configuration"; we were
# missing CHERI(-PURECAP)-CAPREVOKE-QEMU-MFS-ROOT
pytest.param(
"cheribsd-mfs-root-kernel-riscv64-purecap",
["--cheribsd/caprevoke-kernel"],
["CHERI-CAPREVOKE-QEMU-MFS-ROOT", "CHERI-QEMU-MFS-ROOT", "CHERI-PURECAP-CAPREVOKE-QEMU-MFS-ROOT",
"CHERI-PURECAP-QEMU-MFS-ROOT"],
),
],
)
def test_mfsroot_kernel_configs(target: str, config_options: "list[str]", expected_kernels: "list[str]"):
Expand Down

0 comments on commit deb5634

Please sign in to comment.