Skip to content

Commit

Permalink
Make cheribsd-mfs-root-kernel default ignore build-bench-kernels
Browse files Browse the repository at this point in the history
This was triggering an assertion in the test case that I just added.
  • Loading branch information
arichardson committed Aug 11, 2023
1 parent 2968e6b commit 51473fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion pycheribuild/projects/cross/cheribsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1830,7 +1830,6 @@ def default_kernel_config(self, platform: "Optional[ConfigPlatform]" = None, **f
platform = self.get_default_kernel_platform()
kernel_abi = filter_kwargs.pop("kernel_abi", self.get_default_kernel_abi())
filter_kwargs.setdefault("caprevoke", self.caprevoke_kernel)
filter_kwargs.setdefault("benchmark", self.build_bench_kernels)
filter_kwargs["mfsroot"] = True
config = CheriBSDConfigTable.get_default(self.crosscompile_target, platform, kernel_abi, **filter_kwargs)
return config.kernconf
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 @@ -921,6 +921,14 @@ def test_kernel_configs(target, config_options: "list[str]", expected_kernels: "
],
["CHERI-QEMU-MFS-ROOT"],
),
pytest.param("cheribsd-mfs-root-kernel-aarch64", [], ["GENERIC-MFS-ROOT"]),
# regression test for assert len(configs) != 0, "No matching default kernel configuration", the
# build-bench-kernels flag should not affect the default kernel config selection just the additional ones.
pytest.param(
"cheribsd-mfs-root-kernel-aarch64",
["--cheribsd/build-bench-kernels", "--cheribsd/default-kernel-abi=hybrid"],
["GENERIC-MFS-ROOT"],
),
],
)
def test_mfsroot_kernel_configs(target: str, config_options: "list[str]", expected_kernels: "list[str]"):
Expand Down

0 comments on commit 51473fb

Please sign in to comment.