Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 871061 Details for
Bug 1038234
FEAT: add pci passthrough testing to FV testing
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch adding target prompts to fv_storage and fv_network
0001-1038234-FEAT-add-pci-passthrough-testing-to-FV-testi.patch (text/plain), 5.26 KB, created by
Greg Nichols
on 2014-03-05 17:16:52 UTC
(
hide
)
Description:
patch adding target prompts to fv_storage and fv_network
Filename:
MIME Type:
Creator:
Greg Nichols
Created:
2014-03-05 17:16:52 UTC
Size:
5.26 KB
patch
obsolete
>From 9b3d00ef7e8eb538b3e5dbd433edffb25402f1c4 Mon Sep 17 00:00:00 2001 >From: Greg Nichols <gnichols@redhat.com> >Date: Wed, 5 Mar 2014 12:15:26 -0500 >Subject: [PATCH] 1038234 - FEAT: add pci passthrough testing to FV testing > >--- > hwcert/fvtest.py | 23 +++++++++++++++++++++-- > tests/fv_network/fv_network.py | 1 + > tests/fv_storage/fv_storage.py | 1 + > tests/storage/storage.py | 16 ++++++++++++---- > 4 files changed, 35 insertions(+), 6 deletions(-) > >diff --git a/hwcert/fvtest.py b/hwcert/fvtest.py >index d156f22..2bb8b7d 100644 >--- a/hwcert/fvtest.py >+++ b/hwcert/fvtest.py >@@ -57,6 +57,8 @@ class FvTest(Test): > self.debug = Constants.off > self.redHatRelease = RedHatRelease() > self.mountPoint = self.environment.getFvImageMountPoint() >+ self.enableTargetDevice = False >+ self.targetDevice = None > try: > Command("mkdir -p " + self.mountPoint).echo() > except HwCertCommandException, e: >@@ -181,6 +183,13 @@ class FvTest(Test): > rpms = ["wget", "libvirt", "libvirt-python", "virt-install", "qemu-kvm", "qemu-kvm-tools"] > return rpms > >+ def promptForTarget(self): >+ if self.enableTargetDevice: >+ print "Please enter the target device to run the %s test on the guest:" % self.testToRun >+ self.targetDevice = self.prompt(" Target (leave blank for default):") >+ if not self.targetDevice: >+ self.targetDevice = None >+ > def verifyGuest(self): > guestName = None > try: >@@ -347,6 +356,9 @@ class FvTest(Test): > # run the tests > guestScript.write("%s plan --mode auto\n" % Constants.hwcert_backend) > commandToRun = self.hwcertCommandInGuest + " --mode auto --test " + self.testToRun >+ if self.enableTargetDevice and self.targetDevice: >+ guestScript.write("%s plan --add --test %s --device %s --mode auto\n" % (Constants.hwcert_backend, self.testToRun, self.targetDevice)) >+ commandToRun += " --device %s " % self.targetDevice > if self.getTestServer(): > commandToRun += ' --server ' + self.getTestServer() > guestScript.write(commandToRun + "\n") >@@ -475,13 +487,20 @@ class FvTest(Test): > for test in tests: > for run in test.getRuns(): > if run.getSummary() == Constants.PASS: >- print test.getName() + " Passed" >- return True >+ if self.enableTargetDevice and self.targetDevice: >+ if test.getLogicalDevice() == self.targetDevice: >+ print "Guest test %s on target %s PASSED" % (test.getName(), test.getLogicalDevice()) >+ return True >+ else: # default target >+ print "Guest test %s PASSED" % test.getName() >+ return True > # otherwise > print "Error: " + test.getName() + " run on guest Failed" > return False > > def run(self): >+ if self.getMode() != Constants.auto: >+ self.promptForTarget() > > # determine whether to use xen or kvm virtualization > self.configureHypervisor() >diff --git a/tests/fv_network/fv_network.py b/tests/fv_network/fv_network.py >index a1b7657..26f593d 100644 >--- a/tests/fv_network/fv_network.py >+++ b/tests/fv_network/fv_network.py >@@ -29,6 +29,7 @@ class FvNetworkTest(FvTest): > FvTest.__init__(self, name="fv_network") > self.hwcertCommandInGuest = Constants.hwcert_backend + " run " > self.testToRun = '100MegEthernet' >+ self.enableTargetDevice = True > > def run(self): > if self.getTestServer() == None or self.getTestServer() == "unknown": >diff --git a/tests/fv_storage/fv_storage.py b/tests/fv_storage/fv_storage.py >index 7e627e6..e096bb9 100644 >--- a/tests/fv_storage/fv_storage.py >+++ b/tests/fv_storage/fv_storage.py >@@ -29,6 +29,7 @@ class FvStorageTest(FvTest): > FvTest.__init__(self, name="fv_storage") > self.hwcertCommandInGuest = Constants.hwcert_backend + " run " > self.testToRun = 'storage' >+ self.enableTargetDevice = True > > if __name__ == "__main__": > test = FvStorageTest() >diff --git a/tests/storage/storage.py b/tests/storage/storage.py >index ea3bb22..214b5bc 100644 >--- a/tests/storage/storage.py >+++ b/tests/storage/storage.py >@@ -423,11 +423,19 @@ class StorageTest(Test): > > # run each disk per user's choice > disksByHost = self.getDisks() >- try: >+ diskDevices = None >+ # assume our device is a host: >+ if self.getLogicalDeviceName() in disksByHost: > diskDevices = disksByHost[self.getLogicalDeviceName()] >- except Exception, e: >- print "Error: could not find disks for host %s" % self.getLogicalDeviceName() >- print e >+ # else, it it a disk? >+ else: >+ for disks in disksByHost.itervalues(): >+ for disk in disks: >+ if self.getLogicalDeviceName() == disk.getProperty("DEVNAME").split('/')[-1]: >+ diskDevices = [disk] >+ >+ if not diskDevices: >+ print "Error: could not find disk or host matching \"%s\"" % self.getLogicalDeviceName() > return False > > disk = None >-- >1.8.4.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1038234
: 871061