FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Masters Of The Universe

 
 
LinkBack Thread Tools
 
Old 08-08-2011, 07:09 AM
Ales Kozumplik
 
Default edd: fix traceback on Xen.

Apparently the /sys/firmware/edd/int13_dev*/host_bus file is missing or
non-standard on Xen.

Resolves: rhbz#728280
---
storage/devicelibs/edd.py | 4 +++-
tests/storage/devicelibs/edd_test.py | 22 ++++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/storage/devicelibs/edd.py b/storage/devicelibs/edd.py
index d494ec2..ff244e4 100644
--- a/storage/devicelibs/edd.py
+++ b/storage/devicelibs/edd.py
@@ -100,7 +100,9 @@ class EddMatcher(object):

def devname_from_pci_dev(self):
name = None
- if self.edd.type == "ATA":
+ if self.edd.type == "ATA" and
+ self.edd.channel is not None and
+ self.edd.ata_device is not None:
path = "/sys/devices/pci0000:00/0000:%(pci_dev)s/host%(chan)d/"
"target%(chan)d:0:%(dev)d/%(chan)d:0:%(dev)d:0/block" % {
'pci_dev' : self.edd.pci_dev,
diff --git a/tests/storage/devicelibs/edd_test.py b/tests/storage/devicelibs/edd_test.py
index dda9ab8..e33e457 100644
--- a/tests/storage/devicelibs/edd_test.py
+++ b/tests/storage/devicelibs/edd_test.py
@@ -83,6 +83,22 @@ class EddTestCase(mock.TestCase):
path = analyzer.devname_from_pci_dev()
self.assertEqual(path, None)

+ def test_bad_host_bus(self):
+ from storage.devicelibs import edd
+ fs = EddTestFS(edd).sda_vda_no_host_bus()
+
+ edd_dict = edd.collect_edd_data()
+
+ # 0x80 entry is basted so fail without an exception
+ analyzer = edd.EddMatcher(edd_dict[0x80])
+ devname = analyzer.devname_from_pci_dev()
+ self.assertEqual(devname, None)
+
+ # but still succeed on 0x81
+ analyzer = edd.EddMatcher(edd_dict[0x81])
+ devname = analyzer.devname_from_pci_dev()
+ self.assertEqual(devname, "vda")
+
def test_get_edd_dict_1(self):
""" Test get_edd_dict()'s pci_dev matching. """
from storage.devicelibs import edd
@@ -153,6 +169,12 @@ class EddTestFS(object):
map(self.fs.os_remove, entries)
return self.fs

+ def sda_vda_no_host_bus(self):
+ self.sda_vda()
+ self.fs["/sys/firmware/edd/int13_dev80/host_bus"] = "PCI 00:01.1 channel:
"
+ self.fs.os_remove("/sys/firmware/edd/int13_dev80/mbr_signature")
+ self.fs.os_remove("/sys/firmware/edd/int13_dev81/mbr_signature")
+
def sda_cciss(self):
self.fs["/sys/firmware/edd/int13_dev80"] = self.fs.Dir()
self.fs["/sys/firmware/edd/int13_dev80/host_bus"] = "PCIX 05:00.0 channel: 0
"
--
1.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

Mon Aug 8 10:30:02 2011
Return-path: <ubuntu-users-bounces@lists.ubuntu.com>
Envelope-to: tom@linux-archive.org
Delivery-date: Mon, 08 Aug 2011 10:27:12 +0300
Received: from chlorine.canonical.com ([91.189.94.204]:51113)
by s2.java-tips.org with esmtp (Exim 4.69)
(envelope-from <ubuntu-users-bounces@lists.ubuntu.com>)
id 1QqKEx-0001q0-T1
for tom@linux-archive.org; Mon, 08 Aug 2011 10:27:12 +0300
Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com)
by chlorine.canonical.com with esmtp (Exim 4.71)
(envelope-from <ubuntu-users-bounces@lists.ubuntu.com>)
id 1QqKHe-0005sb-W0; Mon, 08 Aug 2011 07:29:59 +0000
Received: from mail-gw0-f49.google.com ([74.125.83.49])
by chlorine.canonical.com with esmtp (Exim 4.71)
(envelope-from <toshazed@gmail.com>) id 1QqKHd-0005sO-1M
for ubuntu-users@lists.ubuntu.com; Mon, 08 Aug 2011 07:29:57 +0000
Received: by gwb1 with SMTP id 1so2210950gwb.8
for <ubuntu-users@lists.ubuntu.com>;
Mon, 08 Aug 2011 00:29:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type; bh=UzbMJbecNllBHP2NfgwiuaOG+qjgMVHeZGKaI6Pp9lU=;
b=TSSmFEh69TzLoDPk4XgLdaiwHJkue/87rQ+pryEhgd3hsJz6xDlps18bHrpeNse+Rq
UU+QCHjdvLa1MxWL6BQQoDE+xB0yQr2VSYbwB2wWNxwK43/NoSdEpNE5I2EY11g1Envk
Lznz/FW1rmxL3iSnPs5yR5HxiuCcYD3XbCKZ0=
MIME-Version: 1.0
Received: by 10.236.180.102 with SMTP id i66mr5533484yhm.383.1312788596331;
Mon, 08 Aug 2011 00:29:56 -0700 (PDT)
Received: by 10.236.153.41 with HTTP; Mon, 8 Aug 2011 00:29:56 -0700 (PDT)
In-Reply-To: <CAJQXyccUVSF3PRVZcd4F=6RKN3=7RXFaDvMbK0N=EhD9Qy62 ig@mail.gmail.com>
References: <1312763594.2663.63.camel@LINLAP>
<CAK6e52qfQrksSOv0vtHhyYhH6aoTqhbw87xfP=ED05MghO+E Hw@mail.gmail.com>
<CAJQXyccUVSF3PRVZcd4F=6RKN3=7RXFaDvMbK0N=EhD9Qy62 ig@mail.gmail.com>
Date: Mon, 8 Aug 2011 13:29:56 +0600
Message-ID: <CAK6e52pMUT0Nr+=KOjo2Bx-m5xmtj8jdAJ0WJcCKCLDrSi2=OQ@mail.gmail.com>
Subject: Re: Wireless USB Adapter
From: =?UTF-8?B?4Ka44Ka+4Kac4KeH4Kam4KeB4KawIOCmsOCmueCmv+Cmri Dgppzgp4vgp5/gpr7gprDgpqY=?=
=?UTF-8?B?4Ka+4Kaw?= <toshazed@gmail.com>
To: "Ubuntu user technical support,
not for general discussions" <ubuntu-users@lists.ubuntu.com>
X-BeenThere: ubuntu-users@lists.ubuntu.com
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: "Ubuntu user technical support,
not for general discussions" <ubuntu-users@lists.ubuntu.com>
List-Id: "Ubuntu user technical support,
not for general discussions" <ubuntu-users.lists.ubuntu.com>
List-Unsubscribe: <https://lists.ubuntu.com/mailman/options/ubuntu-users>,
<mailto:ubuntu-users-request@lists.ubuntu.com?subject=unsubscribe>
List-Archive: <https://lists.ubuntu.com/archives/ubuntu-users>
List-Post: <mailto:ubuntu-users@lists.ubuntu.com>
List-Help: <mailto:ubuntu-users-request@lists.ubuntu.com?subject=help>
List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/ubuntu-users>,
<mailto:ubuntu-users-request@lists.ubuntu.com?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============5920567759794182139=="
Sender: ubuntu-users-bounces@lists.ubuntu.com
Errors-To: ubuntu-users-bounces@lists.ubuntu.com

--===============5920567759794182139==
Content-Type: multipart/alternative; boundary=20cf30564097f3159904a9f969d6

--20cf30564097f3159904a9f969d6
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64

RGVhciBBbGFuCgoyMDExLzgvOCBBbGFuIFBvcGUgPGFsYW5AcG 9wZXkuY29tPgoKPiAyMDExLzgv
OCDgprjgpr7gppzgp4fgpqbgp4HgprAg4Kaw4Ka54Ka/4KauIOCmnOCni+Cnn+CmvuCmsOCmpuCm
vuCmsCA8dG9zaGF6ZWRAZ21haWwuY29tPjoKPiA+IDEuIEdvdG 8gU3luYXB0aWMgUGFja2FnZSBN
YW5hZ2VyIGZyb20gdGhlIFN5c3RlbT4+QWRtaW5pc3RyYXRpb2 4gTWVudS4KPgo+IEl0J3MgYSBz
ZXJ2ZXIsIGNoYW5jZXMgYXJlIGl0IGRvZXNudCBoYXZlIFN5bm FwdGljLAo+CgpJIHVzZSB0aGUg
c2FtZSB2ZXJzaW9uIG9mIHVidW50dSBvbiBteSBzZXJ2ZXJzIG FuZCBJIGhhdmUgaW5zdGFsbGVk
IHRoZSBHVUkKb24gaXQuIE9uIHRoZSBvdGhlciBoYW5kIHRoZS BwYWNrYWd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sID xhIGhyZWY9Imh0dHA6Ly9saW51
eG1pbnQtYmQub3JnL2Fib3V0X3VzIiB0YXJnZXQ9Il9ibGFuay I+4Kay4Ka/4Kao4Ka+4KaV4KeN
4Ka4IOCmruCmv+CmqOCnjeCmnyDgpqzgpr7gpoLgprLgpr7gpq bgp4fgprY8L2E+IOClpOClpCDg
prjgpqbgprjgp43gpq8sIDxhIGhyZWY9Imh0dHBzOi8vbGF1bm NocGFkLm5ldC8lN0V0b3NoYXpl
ZCIgdGFyZ2V0PSJfYmxhbmsiPuCmieCmrOCngeCmqOCnjeCmn+ CngSDgpqzgpr7gpoLgprLgpr7g
pqbgp4fgprY8L2E+PGJyPgoKPGJyPgo=
--20cf30564097f3159904a9f969d6--


--===============5920567759794182139==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

--===============5920567759794182139==--
 
Old 08-08-2011, 08:58 PM
Chris Lumens
 
Default edd: fix traceback on Xen.

> Apparently the /sys/firmware/edd/int13_dev*/host_bus file is missing or
> non-standard on Xen.
>
> Resolves: rhbz#728280

Looks okay.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 08:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org