Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow kernelConfig analyser to check kernel capability is either built in or loaded #1563

Closed
banjoh opened this issue Jun 14, 2024 · 1 comment · Fixed by #1572
Closed

Allow kernelConfig analyser to check kernel capability is either built in or loaded #1563

banjoh opened this issue Jun 14, 2024 · 1 comment · Fixed by #1572
Assignees
Labels
type::feature New feature or request

Comments

@banjoh
Copy link
Member

banjoh commented Jun 14, 2024

Describe the rationale for the suggested feature.

When we define an analyser to check for the availability of a kernel config, it would look something like this

- kernelConfigs:
    selectedConfigs:
      - CONFIG_CGROUP_FREEZER=y
      - CONFIG_NETFILTER_XTABLES=m
    outcomes:
      - pass:
          message: "required kernel configs are available"
      - fail:
          message: "missing kernel config(s): {{ .ConfigsNotFound }}"

Values in the selectedConfigs list are checked using an AND operation i.e they all need to exist or not. In some environments, a kernel configuration may have been loaded as a module (m) or built into the kernel (y) depending of the kernel version. We are not able to have a spec like below to allow a preflight to capture both cases.

    selectedConfigs:
      - CONFIG_CGROUP_FREEZER=y
      - CONFIG_CGROUP_FREEZER=m

This will limit users to just detecting a configuration is either loaded as a module or in-built into the kernel.

Describe the feature

Have the analyser accept a config with multiple values i.e CONFIG_X=my. This would mean that we would be able to define a spec like below which would check whether a kernel configuration exists irrelevant of whether it was loaded as a module or in-built into the kernel. The ability of checking one of the other (m or y) is still preserved with this approach.

- kernelConfigs:
    selectedConfigs:
      - CONFIG_CGROUP_FREEZER=my
      - CONFIG_NETFILTER_XTABLES=my
    outcomes:
      - pass:
          message: "required kernel configs are available"
      - fail:
          message: "missing kernel config(s): {{ .ConfigsNotFound }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature New feature or request
Projects
None yet
3 participants