summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2009-07-02 09:29:11 -0500
committerClark Williams <williams@redhat.com>2009-07-02 09:29:11 -0500
commit66fb1db24ec16a26e248fc7742d84002efc9135e (patch)
tree2f3f312b65be1ab187ffab1127edc6fb85a27faa
parent6092f3b705fd3207ffac7dff681e78033af1cddb (diff)
downloadrt-tests-66fb1db24ec16a26e248fc7742d84002efc9135e.tar.gz
rt-tests-66fb1db24ec16a26e248fc7742d84002efc9135e.tar.xz
added debug prints and retry logic to hwlatdetect enable/disable code and detection code
-rwxr-xr-xsrc/hwlatdetect/hwlatdetect.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hwlatdetect/hwlatdetect.py b/src/hwlatdetect/hwlatdetect.py
index e7c2fe1..538bd55 100755
--- a/src/hwlatdetect/hwlatdetect.py
+++ b/src/hwlatdetect/hwlatdetect.py
@@ -180,7 +180,7 @@ class Hwlat(object):
self.set("enable", 1)
while self.get("enable") == 0:
count += 1
- debug("setting enable to 1 (%d)" % count)
+ debug("retrying setting enable to 1 (%d)" % count)
time.sleep(0.1)
self.set("enable", 1)
@@ -190,7 +190,7 @@ class Hwlat(object):
self.set("enable", 0)
while self.get("enable") == 1:
count += 1
- debug("setting enable to zero(%d)" % count)
+ debug("retrying setting enable to zero(%d)" % count)
time.sleep(0.1)
self.set("enable", 0)
@@ -205,10 +205,10 @@ class Hwlat(object):
while time.time() < testend:
pollcnt += 1
val = self.get_sample()
- if val:
+ while val:
self.samples.append(val.strip())
debug("got a latency sample: %s" % val.strip())
- continue
+ val = self.get_sample()
time.sleep(0.1)
except KeyboardInterrupt, e:
print "interrupted"