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

Fix tests/probes/sysctl_all #2050

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

evgenyz
Copy link
Contributor

@evgenyz evgenyz commented Nov 7, 2023

The test will now automatically adapt to the list of readable variables and won't break every time a new root-readable variable is introduced in kernel.

Fixes: #2049

The test will now automatically adapt to the list of readable
variables and won't break every time a new root-readable variable
is introduced in kernel.
@evgenyz evgenyz requested a review from jan-cerny November 7, 2023 19:40
@jan-cerny jan-cerny self-assigned this Nov 8, 2023
# sysctl has duplicities in output
# hide permission errors like: "sysctl: permission denied on key 'fs.protected_hardlinks'"
# kernel parameters might use "/" and "." separators interchangeably - normalizing
sysctl -a --deprecated 2> /dev/null | tr "/" "." | cut -d "=" -f 1 | tr -d " " | sort -u > "$sysctlNames"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The key is the removal of N argument. If we try and query for the values as well we'll get the list consistent with what the probe could get access to.

@jan-cerny jan-cerny modified the milestones: 1.2.18, 1.3.10 Nov 8, 2023
Copy link
Member

@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

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

I can see the test probes/sysctl/test_sysctl_probe_all.sh passing in the testing farm rawhide test run. Thanks for your change.

@jan-cerny jan-cerny merged commit 727256c into OpenSCAP:maint-1.3 Nov 8, 2023
19 checks passed
@evgenyz evgenyz deleted the fix-sysctl-test-final branch November 9, 2023 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sysctl element kernel.sched_energy_aware cause test fail on Rawhide
2 participants