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 846638 Details for
Bug 858674
virtio_serialport corrupts the data guest->host using 32bit Windows XP guest
[?]
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.
host receiver script
host.py (text/x-python), 1.90 KB, created by
Lukáš Doktor
on 2014-01-07 12:34:48 UTC
(
hide
)
Description:
host receiver script
Filename:
MIME Type:
Creator:
Lukáš Doktor
Created:
2014-01-07 12:34:48 UTC
Size:
1.90 KB
patch
obsolete
>""" >Receives data from defined port and compares them with generated random >data with given random seed. >""" >import random >import socket >random.seed(5) > >class Port: > def __init__(self): > self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) > # TODO: SET PORT PATH HERE > self.sock.connect("/tmp/virtio_port-vc1-20140107-111123-ezCk43K4") > #self.sock.connect("/tmp/virtio_port-vs1-20140107-111123-ezCk43K4") > self.sock.settimeout(None) > self.i = None > self.buf = None > self.length = None > def next(self): > if self.i >= self.length: > # TODO: SET RECEIVE BUFF LENGTH HERE > self.buf = self.sock.recv(5) > self.i = 0 > self.length = len(self.buf) > ret = self.buf[self.i] > self.i += 1 > return ret > >port = Port() >all_correct = 0 >all_incorrect = 0 >correct = 0 >incorrect = 0 >rounds = 0 >while True: > rounds += 1 > if rounds > 10: > break > > correct = 0 > incorrect = 0 > exp = chr(random.randrange(65, 90)) > act = port.next() > while exp == act: > exp = chr(random.randrange(65, 90)) > act = port.next() > correct += 1 > if correct % 1000000 == 0: > print "correct %s, incorrect %s" % (correct, incorrect) > > print "failure" > for _ in xrange(10): > exp += chr(random.randrange(65, 90)) > act += port.next() > while exp != act: > # We expect duplicities, so get next received char... > exp = exp[1:] + chr(random.randrange(65, 90)) # missing chars > #act = act[1:] + port.next() # duplicated chars > incorrect += 1 > correct += len(exp) > > all_correct += correct > all_incorrect += incorrect > print "correct %s/%s, incorrect %s/%s" % (correct, all_correct, incorrect, > all_incorrect) > >print "END correct %s, incorrect %s" % (all_correct, all_incorrect)
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 Raw
Actions:
View
Attachments on
bug 858674
:
846628
|
846631
|
846636
| 846638