commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 02/05: runtime: QA for lock()/unlock() dead


From: git
Subject: [Commit-gnuradio] [gnuradio] 02/05: runtime: QA for lock()/unlock() deadlock
Date: Sat, 4 Apr 2015 17:39:30 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit 43065a682bedd353124bccc1f059d49d27b1cf91
Author: Jiří Pinkava <address@hidden>
Date:   Sun Mar 15 13:53:45 2015 +0100

    runtime: QA for lock()/unlock() deadlock
---
 gr-blocks/python/blocks/qa_hier_block2.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gr-blocks/python/blocks/qa_hier_block2.py 
b/gr-blocks/python/blocks/qa_hier_block2.py
index 5a351f2..97206a2 100755
--- a/gr-blocks/python/blocks/qa_hier_block2.py
+++ b/gr-blocks/python/blocks/qa_hier_block2.py
@@ -2,6 +2,7 @@
 
 from gnuradio import gr, gr_unittest, blocks
 import numpy
+import time
 
 class add_ff(gr.sync_block):
     def __init__(self):
@@ -426,5 +427,20 @@ class test_hier_block2(gr_unittest.TestCase):
         procs = hblock.processor_affinity()
         self.assertEquals((0,), procs)
 
+    def test_lock_unlock(self):
+        hblock = gr.top_block("test_block")
+        src = blocks.null_source(gr.sizeof_float)
+        throttle = blocks.throttle(gr.sizeof_float, 32000)
+        hier = multiply_const_ff(0.5)
+        sink = blocks.null_sink(gr.sizeof_float)
+        hblock.connect(src, throttle, hier, sink)
+        hblock.set_processor_affinity([0,])
+        hblock.start()
+        time.sleep(1)
+        hblock.lock()
+        hblock.unlock()
+        hblock.stop()
+        hblock.wait()
+
 if __name__ == "__main__":
     gr_unittest.run(test_hier_block2, "test_hier_block2.xml")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]