intel / ledmon

Enclosure LED Utilities
GNU General Public License v2.0
73 stars 47 forks source link

Minimal nvme-multipath support #191

Closed mtkaczyk closed 9 months ago

mtkaczyk commented 9 months ago

nvme support with tests.

Slot tests has been divided into parametrized method by the controller to achieve more detailed results. Now it shows the controller under test. It simplifies analysis.

Example output:

# pytest tests/ledctl/slot_test.py
=================================================================================== test session starts ====================================================================================
platform linux -- Python 3.11.2, pytest-7.4.3, pluggy-1.3.0
rootdir: /root/ledmon-mtkaczyk
configfile: pytest.ini
collecting ...
----------------------------------------------------------------------------------- live log collection ------------------------------------------------------------------------------------
INFO     conftest:conftest.py:18 [CONFIG] --ledctl-binary: src/ledctl/ledctl
INFO     conftest:conftest.py:18 [CONFIG] --slot-filters: none
INFO     conftest:conftest.py:18 [CONFIG] --controller-filters: none
collected 11 items

tests/ledctl/slot_test.py::test_ibpi[ledctl_binary0-slot_filters0-controller_filters0-SCSI] SKIPPED (No slot with device found)                                                      [  9%]
tests/ledctl/slot_test.py::test_ibpi[ledctl_binary0-slot_filters0-controller_filters0-VMD] FAILED                                                                                    [ 18%]
tests/ledctl/slot_test.py::test_ibpi[ledctl_binary0-slot_filters0-controller_filters0-NPEM] PASSED                                                                                   [ 27%]
tests/ledctl/slot_test.py::test_set_slot_by_slot[ledctl_binary0-slot_filters0-controller_filters0-SCSI] SKIPPED (No slot found)                                                      [ 36%]
tests/ledctl/slot_test.py::test_set_slot_by_slot[ledctl_binary0-slot_filters0-controller_filters0-VMD] PASSED                                                                        [ 45%]
tests/ledctl/slot_test.py::test_set_slot_by_slot[ledctl_binary0-slot_filters0-controller_filters0-NPEM] PASSED                                                                       [ 54%]
tests/ledctl/slot_test.py::test_set_slot_by_device[ledctl_binary0-slot_filters0-controller_filters0-SCSI] SKIPPED (No slot with device found)                                        [ 63%]
tests/ledctl/slot_test.py::test_set_slot_by_device[ledctl_binary0-slot_filters0-controller_filters0-VMD] PASSED                                                                      [ 72%]
tests/ledctl/slot_test.py::test_set_slot_by_device[ledctl_binary0-slot_filters0-controller_filters0-NPEM] PASSED                                                                     [ 81%]
tests/ledctl/slot_test.py::test_nvme_multipath_drives[ledctl_binary0-slot_filters0-controller_filters0-VMD] PASSED                                                                   [ 90%]
tests/ledctl/slot_test.py::test_nvme_multipath_drives[ledctl_binary0-slot_filters0-controller_filters0-NPEM] SKIPPED (Multipath drives are not connected to tested controller)       [100%]

Failed scenario is connected with: #189 - on the platform used NPEM is best choose but VMD is checked. Deprecates: #167 Closes: #150