Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 843565

Summary: v7 test planning should not use a generic device dictionary
Product: [Retired] Red Hat Hardware Certification Program Reporter: Greg Nichols <gnichols>
Component: Test Suite (harness)Assignee: Greg Nichols <gnichols>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.6.4CC: czhang, qcai, rlandry
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-01 18:20:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch revising test planning by removel of generic device list czhang: review+

Description Greg Nichols 2012-07-26 16:05:22 UTC
Description of problem:

The v7 test suite has uses a device dictionary built from HAL, and augmented from other sources (udev, udisks, kudzu, proc).   This device dictionary is passed to each test's plan method.   The tests check attribute values from the devices in the dictionary to plan device-specific testing.

As HAL is becomming obsolete, tests will often use test-specific methods of device detection.  For example, the storage test will use udisks.    This change means that test code would be simpler to maintain if it moved away from the former generic HAL-based approach.

Version-Release number of selected component (if applicable):

v7 1.6.4

Comment 1 Greg Nichols 2012-07-26 16:13:51 UTC
Proposed Change Overview:

Currently the harness uses the Planner class to do test planning.  The Planner class currently loads up a list of devices (AKA the device dictionary) though several DeviceDetector classes/objects, then passes the devices to each test by calling the tests "plan" method.   The plan methods typically iterate through the devices checking attribute values in order to determine if the test should be planned.

The change would be to have the Planner pass itself to the tests' "plan" method.  The tests' "plan" method would be able to access specific device detectors via the Planner object, supporting simpler, concrete coding for multiple device detection approaches (HAL, UDisks, udev, etc).

Using the Planner object to maintain device detector objects would allow caching of parsed results from sources where this is appropriate.

Comment 2 Greg Nichols 2012-07-26 17:56:24 UTC
Created attachment 600568 [details]
patch revising test planning by removel of generic device list


This patch changes the Planner.__plan test planning implementation to pass the Planner to the Test.plan method of each test.    The Test.plan method implemented by each test (subclass) uses new Planner methods to access specific device detectors (example: Planner.getHalDeviceDetector).

The Test.planWith method is changed to take a device detector object rather than a list of devices.

This patch also removes kudzu-based test planning, removing the Kudzu (DeviceDetector subclass), and KudzuDevice class.

Comment 10 errata-xmlrpc 2013-02-01 18:20:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0222.html