Goofed last minute change about action comparison for modifies, modify does not change timeouts -- fixed
diff --git a/src/python/oftest/controller.py b/src/python/oftest/controller.py
index 7495dc7..e7051ee 100644
--- a/src/python/oftest/controller.py
+++ b/src/python/oftest/controller.py
@@ -208,8 +208,9 @@
self.expect_msg_cv.acquire()
if self.expect_msg:
if not self.expect_msg_type or (self.expect_msg_type == hdr.type):
- self.logger.debug("Matched expected msg type "
- + ofp_type_map[hdr.type])
+ self.logger.debug("Matched msg; type %s. expected %s " %
+ (ofp_type_map[hdr.type],
+ ofp_type_map[self.expect_msg_type]))
self.expect_msg_response = (msg, rawmsg)
self.expect_msg = False
self.expect_msg_cv.notify()
@@ -485,13 +486,14 @@
# Careful of race condition releasing sync before message cv
# Also, this style is ripe for a lockup.
self.expect_msg_cv.acquire()
- self.sync.release()
self.expect_msg_response = None
self.expect_msg = True
self.expect_msg_type = exp_msg
+ self.sync.release()
self.expect_msg_cv.wait(timeout)
if self.expect_msg_response is not None:
(msg, pkt) = self.expect_msg_response
+ self.expect_msg = False # Check this -- only 1 thread?
self.expect_msg_cv.release()
if msg is None: