Skip to content

Adding support for lockdown feature#3135

Open
PavamanSubramaniyam wants to merge 1 commit intoavocado-framework-tests:masterfrom
PavamanSubramaniyam:dlpar_with_lockdown
Open

Adding support for lockdown feature#3135
PavamanSubramaniyam wants to merge 1 commit intoavocado-framework-tests:masterfrom
PavamanSubramaniyam:dlpar_with_lockdown

Conversation

@PavamanSubramaniyam
Copy link
Copy Markdown
Contributor

Executing dlpar tests with the lockdown mode enabled

Executing dlpar tests with the lockdown mode enabled

Signed-off-by: Pavaman Subramaniyam <pavsubra@linux.vnet.ibm.com>
@PavamanSubramaniyam
Copy link
Copy Markdown
Contributor Author

avocado run --max-parallel-tasks=1 dlpar.py -m dlpar.py.data/dlpar.yaml
JOB ID : 2b8d34009daa90b7f3e57ab62f3d99f02094596f
JOB LOG : /root/avocado-fvt-wrapper/results/job-2026-03-24T14.52-2b8d340/job.log
(1/4) dlpar.py:DlparPci.test_dlpar;run-lpar_2-9ee9: STARTED
(1/4) dlpar.py:DlparPci.test_dlpar;run-lpar_2-9ee9: PASS (136.61 s)
(2/4) dlpar.py:DlparPci.test_drmgr_pci;run-lpar_2-9ee9: STARTED
(2/4) dlpar.py:DlparPci.test_drmgr_pci;run-lpar_2-9ee9: PASS (206.34 s)
(3/4) dlpar.py:DlparPci.test_drmgr_phb;run-lpar_2-9ee9: STARTED
(3/4) dlpar.py:DlparPci.test_drmgr_phb;run-lpar_2-9ee9: PASS (134.14 s)
(4/4) dlpar.py:DlparPci.test_dlpar_with_lockdown;run-lpar_2-9ee9: STARTED
(4/4) dlpar.py:DlparPci.test_dlpar_with_lockdown;run-lpar_2-9ee9: PASS (383.45 s)
RESULTS : PASS 4 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML : /root/avocado-fvt-wrapper/results/job-2026-03-24T14.52-2b8d340/results.html
JOB TIME : 884.47 s

I have updated the full results logs to the corresponding Jira.

@abdhaleegit abdhaleegit self-assigned this Apr 15, 2026
@abdhaleegit abdhaleegit self-requested a review April 15, 2026 06:18
Comment thread io/pci/dlpar.py
Comment thread io/pci/dlpar.py
@abdhaleegit abdhaleegit self-requested a review April 17, 2026 08:38
Copy link
Copy Markdown
Collaborator

@abdhaleegit abdhaleegit left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread io/pci/dlpar.py
self.pci_device = self.params.get("pci_devices", default=None).split(' ')
self.num_of_dlpar = int(self.params.get("num_of_dlpar", default='1'))
self.lockdown_mode = self.params.get("lockdown_mode", default="integrity")
self.original_lockdown_state = None
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This variable is defined but never used.

Comment thread io/pci/dlpar.py
# Save original state
original_state = self.get_lockdown_state()

if not self.set_lockdown_mode(self.lockdown_mode):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since we change the lockdown mode, we should also revert it back to original mode in teardown(). I guess self.original_lockdown_state was defined for this purpose. In CR environment this lockdown mode change can cause issues for tests executed after this test

Comment thread io/pci/dlpar.py
self.log.error(f"Failed to set lockdown to {mode}, current: {new_state}")
return False
except Exception as e:
self.log.error(f"Error setting lockdown mode: {mode}")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This print generic error message but does not capture the exception. Please add
self.log.error(f"Error setting lockdown mode to {mode}: {e}")

Comment thread io/pci/dlpar.py
self.test_drmgr_pci()
self.test_drmgr_phb()

# Verify lockdown state didn't change
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this verification really required? Why would dlpar operation change security model?
If you think this is possible then we would need verification after each test (dlpar, drmgr_pci, drmgr_phb)

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.

3 participants