Skip to content

Change scope of grub2_bootloader_argument templated tests - #15026

Merged
Mab879 merged 1 commit into
ComplianceAsCode:masterfrom
jan-cerny:grub2_bootloader_argument_test
Aug 25, 2026
Merged

Change scope of grub2_bootloader_argument templated tests#15026
Mab879 merged 1 commit into
ComplianceAsCode:masterfrom
jan-cerny:grub2_bootloader_argument_test

Conversation

@jan-cerny

Copy link
Copy Markdown
Member

Some test scenarios test correct handling of values of bootloader arguments. But, not all arguments have values, some arguments are value-less, for example nousb. For the value-less arguments it doesn't make sense to test the correct handling of values. Some tests that currently attempt to do this are broken.

We will fix it by disabling the test scenarios.
We will use the well-known "trick" of setting the # platform header to Not Applicable if the bootloader argument isn't supposed to have any value. These are rules where the template isn't given the arg_value or arg_variable parameter.

Fixes failing templated test scenario wrong_value_entries.fail.sh in rule grub2_nousb_argument.

Review Hints:

run automatus or /per-rule for all rules using the template grub2_bootloader_argument

@jan-cerny jan-cerny added this to the 0.1.82 milestone Aug 20, 2026
@jan-cerny jan-cerny added the productization-issue Issue found in upstream stabilization process. label Aug 20, 2026
@Mab879 Mab879 self-assigned this Aug 21, 2026
@jan-cerny jan-cerny added the backported-into-stabilization PRs which were cherry-picked during stabilization process. label Aug 24, 2026

@Mab879 Mab879 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After review the build tests you adjust the Jinja templates to remove the extra white space.

#!/bin/bash


# platform = multi_platform_fedora,multi_platform_rhel

# packages = grub2,grubby
# variables = var_rng_core_default_quality=99999

source common.sh

{{% else %}}
# platform = Oracle Linux 8,Red Hat Enterprise Linux 8
{{% endif %}}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Some test scenarios test correct handling of *values* of bootloader
arguments. But, not all arguments have values, some arguments are
value-less, for example `nousb`. For the value-less arguments it
doesn't make sense to test the correct handling of values. Some
tests that currently attempt to do this are broken.

We will fix it by disabling the test scenarios.
We will use the well-known "trick" of setting the `# platform`
header to `Not Applicable` if the bootloader argument isn't supposed
to have any value. These are rules where the template isn't given
the `arg_value` or `arg_variable` parameter.

Fixes failing templated test scenario `wrong_value_entries.fail.sh`
in rule `grub2_nousb_argument`.
@jan-cerny
jan-cerny force-pushed the grub2_bootloader_argument_test branch from 32ed08d to 4868264 Compare August 25, 2026 06:23
@jan-cerny

Copy link
Copy Markdown
Member Author

I have removed the empty line

@openshift-ci

openshift-ci Bot commented Aug 25, 2026

Copy link
Copy Markdown

@jan-cerny: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-openshift-node-compliance 32ed08d link false /test e2e-aws-openshift-node-compliance
ci/prow/e2e-aws-openshift-platform-compliance 4868264 link true /test e2e-aws-openshift-platform-compliance

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@Mab879
Mab879 merged commit 6c675a6 into ComplianceAsCode:master Aug 25, 2026
70 of 74 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported-into-stabilization PRs which were cherry-picked during stabilization process. productization-issue Issue found in upstream stabilization process.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants