Skip to content

io/iommu: Validate pci_addr input and update check_dmesg()#2945

Merged
narasimhan-v merged 3 commits intoavocado-framework-tests:masterfrom
dhsrivas:iommu
Mar 4, 2025
Merged

io/iommu: Validate pci_addr input and update check_dmesg()#2945
narasimhan-v merged 3 commits intoavocado-framework-tests:masterfrom
dhsrivas:iommu

Conversation

@dhsrivas
Copy link
Contributor

@dhsrivas dhsrivas commented Mar 4, 2025

This patch series

  1. [Patch 0/2] Add check to validate pci address (pci_addr) user input.
  2. [Patch 1/2 and 2/2] Update the process of checking and validating dmesg for each subtest. Current process clears the dmesg
    affecting subsequent tests that depends on dmesg.

Run

avocado-misc-tests# avocado run io/iommu/iommu_tests.py -p pci_devices="0000:01:00.0" -p dmesg_grep="iommu|AMD-Vi" -p count='1' --max-parallel-tasks=
1
JOB ID     : 132c8969e459f615389a975bced0ded359a49735
JOB LOG    : /root/tests/results/job-2025-03-04T08.09-132c896/job.log
 (1/6) io/iommu/iommu_tests.py:IommuTest.test_unbind_bind: STARTED
 (1/6) io/iommu/iommu_tests.py:IommuTest.test_unbind_bind: PASS (6.55 s)
 (2/6) io/iommu/iommu_tests.py:IommuTest.test_unbind_changedomain_bind: STARTED
 (2/6) io/iommu/iommu_tests.py:IommuTest.test_unbind_changedomain_bind: PASS (64.15 s)
 (3/6) io/iommu/iommu_tests.py:IommuTest.test_unbind_changedomain_ntimes_bind: STARTED
 (3/6) io/iommu/iommu_tests.py:IommuTest.test_unbind_changedomain_ntimes_bind: PASS (64.32 s)
 (4/6) io/iommu/iommu_tests.py:IommuTest.test_unbind_bind_rescan: STARTED
 (4/6) io/iommu/iommu_tests.py:IommuTest.test_unbind_bind_rescan: PASS (5.58 s)
 (5/6) io/iommu/iommu_tests.py:IommuTest.test_unbind_changedomain_bind_rescan: STARTED
 (5/6) io/iommu/iommu_tests.py:IommuTest.test_unbind_changedomain_bind_rescan: PASS (66.99 s)
 (6/6) io/iommu/iommu_tests.py:IommuTest.test_reset_rescan: STARTED
 (6/6) io/iommu/iommu_tests.py:IommuTest.test_reset_rescan: PASS (1.39 s)
RESULTS    : PASS 6 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /root/tests/results/job-2025-03-04T08.09-132c896/results.html
JOB TIME   : 216.69 s

@narasimhan-v narasimhan-v self-assigned this Mar 4, 2025
dhsrivas added 3 commits March 4, 2025 14:03
Currently test cancel with "Device passed is not bound to any driver" log
for invalid pci device input which is incorrect. Check if the pci device
input is valid and cancel test with proper log if invalid.

Also update comments with proper description for "pci_addr" variable used.

Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com>
While running iommu_tests.py test, dmesg is cleared for checking test
specific kernel logs. This affects other tests that depends on dmesg.

Update the process of capturing test specific 'warn,crit,alert,err' logs
without clearing dmesg.

Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com>
…c keywords

Currently test fails for any test specific 'warn,alert,crit,err' dmesg
logs. But user may be interested for logs specific to iommu kernel driver.

This patch adds support to pass specific keywords for filtering the dmesg
logs to conclude pass or fail for the test.

Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com>
@narasimhan-v narasimhan-v merged commit 7051184 into avocado-framework-tests:master Mar 4, 2025
6 checks passed
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