Skip to content

test: automation for 5 selinux testcases#460

Open
shreyataware wants to merge 2 commits into
qualcomm-linux:mainfrom
shreyataware:security-automations
Open

test: automation for 5 selinux testcases#460
shreyataware wants to merge 2 commits into
qualcomm-linux:mainfrom
shreyataware:security-automations

Conversation

@shreyataware
Copy link
Copy Markdown

  1. Check Getenforce
  2. Toggle between Enforcing & Permissive using setenforce cmd
  3. Check sestatus
  4. Collect AVC Denials
  5. Capture systemctl failed services

Copy link
Copy Markdown
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

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

Thanks for adding SELinux validation coverage. The scope is useful and fits under Kernel/Security: getenforce, sestatus, setenforce toggling, AVC denial collection, and failed-service comparison.

please address a few architecture-level concerns below along with fixing the failed workflows.

  1. For tests that call setenforce, capture the original SELinux mode before changing it and restore it on every exit path using trap cleanup. The DUT must not be left in a different SELinux mode after the test.

  2. Please ensure all scripts reuse existing Runner/utils helpers for logging, dependency checks, result handling, and common setup instead of duplicating logic across the five new run.sh files.

  3. Please define clear PASS/FAIL/SKIP semantics for unsupported environments, especially when getenforce, setenforce, sestatus, audit logs, or systemctl are not available.

  4. For SystemctlFailedPerVsEnf, please log the failed-service snapshot before and after each SELinux mode transition, and restore the original mode at the end.

  5. Please share runtime evidence from target/LAVA execution for all five suites.

  6. Please add Readme files for each test

Commit-wise, this can remain one PR because all tests are SELinux/security related, but I recommend splitting into logical commits:

  • SELinux status checks
  • SELinux mode transition test
  • SELinux diagnostics / AVC / failed-service comparison

Current commit message is understandable but generic. Suggested message:
test(security): add SELinux validation suites

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.

2 participants