Part of lp.hardwaredb.scripts.tests.test_hwdb_submission_processing View In Hierarchy
Method | test_buildDeviceList | Test of SubmissionParser.buildDeviceList(). |
Method | test_buildHalDeviceList | Test the creation of list HALDevice instances for a submission. |
Method | makeUdevDeviceParsedData | Build test data that can be passed to buildUdevDevice(). |
Method | test_buildUdevDeviceList | Test the creation of UdevDevice instances for a submission. |
Method | test_buildUdevDeviceList_root_node_has_dmi_data | The root node of a udev submissions has DMI data. |
Method | test_buildUdevDeviceList_sysfs_data | Optional sysfs data is passed to UdevDevice instances. |
Method | test_buildUdevDeviceList_no_sysfs_data | Sysfs data is not required (maverick and natty submissions). |
Method | test_buildUdevDeviceList_invalid_device_path | Test the creation of UdevDevice instances for a submission. |
Method | test_buildUdevDeviceList_missing_root_device | Test the creation of UdevDevice instances for a submission. |
Method | test_kernel_package_name_hal_data | Test of SubmissionParser.kernel_package_name. |
Method | test_kernel_package_hal_data_name_inconsistent | Test of SubmissionParser.kernel_package_name. |
Method | test_kernel_package_name_hal_data_no_kernel_version_in_hal_data | Test of SubmissionParser.kernel_package_name. |
Method | test_kernel_package_name_hal_data_no_package_data | Test of SubmissionParser.kernel_package_name. |
Method | test_kernel_package_name_udev_data | Test of SubmissionParser.kernel_package_name for udev data. |
Method | test_kernel_package_udev_data_name_inconsistent | Test of SubmissionParser.kernel_package_name. |
Method | test_kernel_package_name_udev_data_no_kernel_version_in_summary | Test of SubmissionParser.kernel_package_name. |
Method | test_kernel_package_name_udev_data_no_package_data | Test of SubmissionParser.kernel_package_name. |
Method | testHALDeviceConstructor | Test of the HALDevice constructor. |
Method | testHALDeviceGetProperty | Test of HALDevice.getProperty. |
Method | testHALDeviceParentUDI | Test of HALDevice.parent_udi. |
Method | testHALDeviceDeviceId | Test of HALDevice.device_id. |
Method | testHALDevicePciClass | Test of HALDevice.pci_class. |
Method | testHALDevicePciSubClass | Test of HALDevice.pci_subclass. |
Method | testHALDeviceUsbVendorId | Test of HALDevice.usb_vendor_id. |
Method | testHALDeviceUsbProductId | Test of HALDevice.usb_product_id. |
Method | testHALDeviceScsiVendor | Test of HALDevice.scsi_vendor. |
Method | testHALDeviceScsiModel | Test of HALDevice.scsi_model. |
Method | testHALDeviceDriverName | Test of HALDevice.driver_name. |
Method | testHalDeviceRawBus | test of HALDevice.raw_bus. |
Method | test_HALDevice_scsi_controller_usb_storage_device | test of HALDevice.scsi_controller. |
Method | test_HALDevice_scsi_controller_pci_controller | test of HALDevice.scsi_controller. |
Method | test_HALDevice_scsi_controller_non_scsi_device | test of HALDevice.scsi_controller. |
Method | test_HALDevice_scsi_controller_no_grandparent | test of HALDevice.scsi_controller. |
Method | test_HALDevice_scsi_controller_no_parent | test of HALDevice.scsi_controller. |
Method | testHALDeviceGetRealBus | Test of HALDevice.real_bus, generic case. |
Method | testHALDeviceGetRealBusSystem | Test of HALDevice.real_bus, for the tested machine itself. |
Method | testHALDeviceGetRealBusScsiUsb | Test of HALDevice.real_bus for info.bus=='scsi' and a USB device. |
Method | testHALDeviceGetRealBusScsiPci | Test of HALDevice.real_bus for info.bus=='scsi'. |
Method | testHALDeviceGetRealBusScsiDeviceWithoutGrandparent | Test of HALDevice.real_bus for a device without a grandparent. |
Method | testHALDeviceGetRealBusScsiDeviceWithoutParent | Test of HALDevice.real_bus for a device without a parent. |
Method | testHALDeviceGetRealBusScsiDeviceWithBogusPciGrandparent | Test of HALDevice.real_bus for a device with a bogus grandparent. |
Method | testHALDeviceGetRealBusPci | Test of HALDevice.real_bus for info.bus=='pci'. |
Method | testHALDeviceGetRealBusUnknown | Test of HALDevice.real_bus for unknown values of info.bus. |
Method | test_HALDevice_is_root_device_for_root_device | Test of HALDevice.is_root_device for the root device. |
Method | test_HALDevice_is_root_device_for_non_root_device | Test of HALDevice.is_root_device for a non-root device. |
Method | renameInfoBusToInfoSubsystem | Rename the property info.bus in a device list to info.subsystem. |
Method | testHALDeviceRealDeviceRegularBus | Test of HALDevice.is_real_device: regular info.bus property. |
Method | testHALDeviceRealDeviceNoBus | Test of HALDevice.is_real_device: No info.bus property. |
Method | testHALDeviceRealDeviceHALBusValueIgnored | Test of HALDevice.is_real_device: ignored values of info.bus. |
Method | runTestHALDeviceRealDeviceScsiDevicesPciController | Test of HALDevice.is_real_device: info.bus == 'scsi'. |
Method | testHALDeviceRealDeviceScsiDevicesPciController | Test of HALDevice.is_real_device: info.bus == 'scsi'. |
Method | testHALDeviceRealDeviceScsiDeviceUsbStorage | Test of HALDevice.is_real_device: info.bus == 'scsi'. |
Method | testHALDeviceRealDeviceRootDevice | Test of HALDevice.is_real_device for the root node. |
Method | testHALDeviceRealChildren | Test of HALDevice.getRealChildren. |
Method | testHasReliableDataRegularCase | Test of HALDevice.has_reliable_data, regular case. |
Method | testHasReliableDataNotProcessible | Test of HALDevice.has_reliable_data, bus without reliable data. |
Method | testHasReliableDataRootDevice | Test of HALDevice.has_reliable_data, root device. |
Method | testHasReliableDataForInsuffientData | Test of HALDevice.has_reliable_data, insufficent device data. |
Method | testHasReliableDataIDEDevice | Test of HALDevice.has_reliable_data, for IDE devices. |
Method | testHALDeviceSCSIVendorModelNameRegularCase | Test of HALDevice.getScsiVendorAndModelName, regular case. |
Method | testHALDeviceSCSIVendorModelNameATADiskShortModelName | Test of HALDevice.getScsiVendorAndModelName, ATA disk (1). |
Method | testHALDeviceSCSIVendorModelNameATADiskLongModelName | Test of HALDevice.getScsiVendorAndModelName, ATA disk (2). |
Method | testHALDeviceVendorFromInfoVendor | Test of HALDevice.vendor, regular case. |
Method | testHALDeviceVendorFromBusVendor | Test of HALDevice.vendor, value copied from ${bus}.vendor. |
Method | testHALDeviceVendorScsi | Test of HALDevice.vendor for SCSI devices: regular case. |
Method | testHALDeviceVendorScsiAta | Test of HALDevice.vendor for SCSI devices: fake IDE/SATA disks. |
Method | testHALDeviceVendorSystem | Test of HALDevice.vendor for the machine itself. |
Method | testHALDeviceProductFromInfoProduct | Test of HALDevice.product, regular case. |
Method | testHALDeviceProductFromBusProduct | Test of HALDevice.product, value copied from ${bus}.product. |
Method | testHALDeviceProductScsi | Test of HALDevice.product for SCSI devices: regular case. |
Method | testHALDeviceProductScsiAta | Test of HALDevice.product for SCSI devices: fake IDE/SATA disks. |
Method | testHALDeviceProductSystem | Test of HALDevice.product for the machine itself. |
Method | testHALDeviceVendorId | Test of HALDevice.vendor_id. |
Method | testHALDeviceVendorIdScsi | Test of HALDevice.vendor_id for SCSI devices. |
Method | testHALDeviceVendorIdScsiAta | Test of HALDevice.vendor_id for SCSI devices: fake IDE/SATA disks. |
Method | testHALDeviceVendorIdSystem | Test of HALDevice.vendor_id for the machine itself. |
Method | testHALDeviceProductId | Test of HALDevice.product_id. |
Method | testHALDeviceProductIdScsi | Test of HALDevice.product_id for SCSI devices. |
Method | testHALDeviceProductIdScsiAta | Test of HALDevice.product_id for SCSI devices: fake IDE/SATA disks. |
Method | testHALDeviceProductIdSystem | Test of HALDevice.product_id for the machine itself. |
Method | testVendorIDForDB | Test of HALDevice.vendor_id_for_db. |
Method | testVendorIDForDBSystem | Test of HALDevice.vendor_id_for_db. |
Method | testProductIDForDB | Test of HALDevice.product_id_for_db. |
Method | testProductIDForDBSystem | Test of HALDevice.product_id_for_db. |
Inherited from TestCaseHWDB:
Method | setUp | Setup the test environment. |
Method | assertWarningMessage | Search for message in the log entries for submission_key. |
Method | assertErrorMessage | Search for log_message in the log entries for submission_key. |
Inherited from TestCase (via TestCaseHWDB):
Method | becomeDbUser | Commit, then log into the database as dbuser . |
Method | __str__ | The string representation of a test is its id. |
Method | useContext | Use the supplied context in this test. |
Method | makeTemporaryDirectory | Create a temporary directory, and return its path. |
Method | installKarmaRecorder | Set up and return a KarmaRecorder . |
Method | assertProvides | Assert 'obj' correctly provides 'interface'. |
Method | assertNotifies | Assert that a callable performs a given notification. |
Method | assertNoNotification | Assert that no notifications are generated by the callable. |
Method | assertSqlAttributeEqualsDate | Fail unless the value of the attribute is equal to the date. |
Method | assertTextMatchesExpressionIgnoreWhitespace | Undocumented |
Method | assertIsInstance | Assert that an instance is an instance of assert_class. |
Method | assertIsNot | Assert that expected is not the same object as observed . |
Method | assertContentEqual | Assert that 'iter1' has the same content as 'iter2'. |
Method | assertRaisesWithContent | Check if the given exception is raised with given content. |
Method | assertBetween | Assert that 'variable' is strictly between two boundaries. |
Method | assertVectorEqual | Apply assertEqual to all given pairs in one go. |
Method | expectedLog | Expect a log to be written that matches the regex. |
Method | pushConfig | Push some key-value pairs into a section of the config. |
Method | attachOopses | Undocumented |
Method | attachLibrarianLog | Include the logChunks from fixture in the test details. |
Method | assertStatementCount | Assert that the expected number of SQL statements occurred. |
Method | useTempDir | Use a temporary directory for this test. |
Method | assertEmailHeadersEqual | Assert that two email headers are equal. |
Method | assertStartsWith | Undocumented |
Method | assertEndsWith | Asserts that s ends with suffix. |
Method | checkPermissions | Check if the used_permissions match expected_permissions. |
Method | assertEmailQueueLength | Pop the email queue, assert its length, and return it. |
Method | _unfoldEmailHeader | Unfold a multiline email header. |
All device paths must start with '/devices'. Any other device path makes the submission invalid.
Each submission must contain a udev node for the root device.
Regular case.
Test a name inconsistency.
Test without HAL property system.kernel.version.
Test without any package data. In this case, SubmissionParser.kernel_package_name is the value of the property system.kernel.version if the root HAL device. No further checks are done.
Variant for udev data, regular case.
Variant for udev data, name inconsistency.
Test without the summary sub-node <kernel-release>.
Variant for udev data, test without any package data. In this case, SubmissionParser.kernel_package_name is the value of the property system.kernel.version if the root HAL device. No further checks are done.
The physical device is a USB storage device.
Variant for a SCSI device connected to a PCI controller.
Variant for non-SCSI devices.
Variant for a SCSI device without a grandparent device.
Variant for a SCSI device without a parent device.
For most buses as "seen" by HAL, HALDevice.real_bus returns a unique HWBus value.
Memory sticks, card readers and USB->IDE/SATA adapters use SCSI emulation; HALDevice.real_bus treats these devices as "black boxes", and thus returns None.
Many non-SCSI devices support the SCSI command, and the Linux kernel can treat them like SCSI devices. The real bus of these devices can be found by looking at the PCI class and subclass of the host controller of the possibly fake SCSI device. The real bus of these device can be IDE, ATA, SATA or SCSI.
The PCI device class must be PCI_CLASS_STORAGE.
If info.bus == 'pci', we may have a real PCI device or a PCCard.
Older HAL version store the device bus in the property info.bus; newer versions store the bus in info.subsystem.
The parameter devices is a list of dictionaries as used in the methods below. This method replaces all dictionary entries with the key info.bus by entries with the key info.subsystem in order to allow easy testing of both variants.
See below for exceptions, if info.bus == 'usb_device' or if info.bus == 'usb'.
A HAL device is considered to not be a real device, if its info.bus proerty is 'drm', 'dvb', 'memstick_host', 'net', 'scsi_generic', 'scsi_host', 'sound', 'ssb', 'tty', 'usb' or 'video4linux'.
The (fake or real) SCSI device is connected to a PCI controller. Though the real bus may not be SCSI, all devices for the busses SCSI, IDE, ATA, SATA, SAS are treated as real devices.
The (fake or real) SCSI device is connected to a PCI controller. Though the real bus may not be SCSI, all devices for the busses SCSI, IDE, ATA, SATA, SAS are treated as real devices.
USB storage devices are treated as SCSI devices by HAL; we do not consider them to be real devices.
The root device has the info.subsystem or info.bus property set to 'unknown'. While we treat other devices with ths bus value as useless, the root device is real.
Test for a HAL device that should be processible but does not provide enough data. Aside from a bus, we need a vendor ID, a product ID and a product name.
Many IDE devices do not provide vendor and product IDs. This is a known problem and hence not worth a log message.
Test of an ATA disk with a short model name. The Linux kenrel sets the vendor name to "ATA" and inserts the real vendor name into the model string.
Test of an ATA disk with a short model name. The Linux kenrel sets the vendor name to "ATA" and ignores the real vendor name,
The value is copied from info.vendor, if available.
If the property info.vendor does not exist, ${bus}.vendor is tried.
The value is copied from info.product, if available.
If the property info.product does not exist, ${bus}.product
Many buses have a numerical vendor ID. Except for the special cases tested below, HWDevice.vendor_id returns the HAL property ${bus}.vendor_id.
The SCSI specification does not know about a vendor ID, we use the vendor string as returned by INQUIRY command as the ID.
Many buses have a numerical product ID. Except for the special cases tested below, HWDevice.product_id returns the HAL property ${bus}.product_id.
The SCSI specification does not know about a product ID, we use the product string as returned by INQUIRY command as the ID.