def test_unsupported_lsi_scsi(current_actor_context):
    devices = [{
        'slot': '02:01.0',
        'dev_cls': 'SCSI storage controller',
        'vendor': 'LSI Logic / Symbios Logic',
        'name': '53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI',
        'subsystem_name': 'SCSI Controller',
        'subsystem_vendor': 'LSI Logix / Symbios Logic'
    }, {
        'slot': '03:00.0',
        'dev_cls': 'Serial Attached SCSI Controller',
        'vendor': 'VMWare',
        'name': 'PVSCSI SCSI Controller',
        'subsystem_name': 'SCSI Controller',
        'subsystem_vendor': 'VMWare'
    }, {
        'slot': '13:00.0',
        'dev_cls': 'Serial Attached SCSI Controller',
        'vendor': 'LSI Logic / Symbios Logic',
        'name': 'SAS1068 PCI-X Fusion-MPT SAS',
        'subsystem_name': 'SCSI Controller',
        'subsystem_vendor': 'VMWare'
    }]

    error_summary = 'LSI Logic SCSI Controller is not supported'

    current_actor_context.feed(
        PCIDevices(devices=map(lambda x: PCIDevice(**x), devices)))
    current_actor_context.run()
    assert current_actor_context.consume(Inhibitor)
def test_drivers(devices, expected, current_actor_context):
    """
    Tests CheckKernelDrivers actor by feeding it mocked PCI devices with their
    respective drivers, if they have one.  Actor should produce a report iff any
    mocked devices from devices_removed are fed to the actor, since their
    drivers are removed in RHEL8 (as per 'files/removed_drivers.txt').
    """
    current_actor_context.feed(PCIDevices(devices=devices))
    current_actor_context.run()
    if expected:
        assert not current_actor_context.consume(Report)
    else:
        assert current_actor_context.consume(Report)
def test_no_unsupported_devices(current_actor_context):
    devices = [{
        'slot': '03:00.0',
        'dev_cls': 'Serial Attached SCSI Controller',
        'vendor': 'VMWare',
        'name': 'PVSCSI SCSI Controller',
        'subsystem_name': 'SCSI Controller',
        'subsystem_vendor': 'VMWare'
    }]

    current_actor_context.feed(
        PCIDevices(devices=map(lambda x: PCIDevice(**x), devices)))
    current_actor_context.run()
    assert not current_actor_context.consume(Inhibitor)
pci_devices = PCIDevices(devices=[
    PCIDevice(
        slot="00:00.0",
        driver="",
        dev_cls="Host bridge",
        vendor="Intel Corporation",
        name="440FX - 82441FX PMC [Natoma]",
        subsystem_vendor="Red Hat, Inc.",
        subsystem_name="Qemu virtual machine",
        pci_id="",
        rev="02",
    ),
    PCIDevice(
        slot="00:01.0",
        dev_cls="ISA bridge",
        vendor="Intel Corporation",
        name="82371SB PIIX3 ISA [Natoma/Triton II]",
        subsystem_vendor="Red Hat, Inc.",
        pci_id="15b560:0739",
        subsystem_name="Qemu virtual machine",
    ),
    PCIDevice(
        slot="00:01.1",
        dev_cls="IDE interface",
        vendor="Intel Corporation",
        name="82371SB PIIX3 IDE [Natoma/Triton II]",
        subsystem_vendor="Red Hat, Inc.",
        subsystem_name="Qemu virtual machine",
        pci_id="15b560:0739",
        progif="80",
    ),
])
Ejemplo n.º 5
0
def produce_pci_devices(producer, devices):
    """ Produce a Leapp message with all PCI devices """
    producer(PCIDevices(devices=devices))
Ejemplo n.º 6
0
def produce_pci_devices(producer, devices):
    ''' Produce a Leapp message with all PCI devices '''
    producer(PCIDevices(devices=devices))
def test_no_devices(current_actor_context):
    current_actor_context.feed(PCIDevices(devices=[]))
    current_actor_context.run()
    assert not current_actor_context.consume(Inhibitor)