Hi All,

I was writing a new block and the "make" process of source files(.cc .h .i,
etc) was successful. However, when I "make check" to test the block, there's
an error message "Segmentation fault" coming out. I searched the previous
discussions but there were not too much useful information. I know that only
this error message is too vague for you. But I am still wondering if anyone
could tell where might have the possible mistakes. I guess the problems may
lie on the qa_test.py scripts which I post below. The lpi.itersum_ff blocks
has 4 parallel input and one output. Any suggestions will be appreciated.

---------------------------------------------------------------------------
from gnuradio import gr, gr_unittest
import lpi

class qa_lpi (gr_unittest.TestCase):

    def setUp (self):
        self.tb = gr.top_block ()

    def tearDown (self):
        self.tb = None

    def test_itersum_ff (self):
        src_data0 = (1.0, 1.0, 0.0, 0.0, 1.0)
        src_data1 = (1.0, 0.0, 1.0, 1.0, 0.0)
        src_data2 = (0.0, 1.0, 1.0, 0.0, 1.0)
        src_data3 = (0.0, 0.0, 1.0, 1.0, 0.0)

        src0 = gr.vector_source_f (src_data0)
        src1 = gr.vector_source_f (src_data1)
        src2 = gr.vector_source_f (src_data2)
        src3 = gr.vector_source_f (src_data3)

        cal = lpi.itersum_ff ()
        dst = gr.vector_sink_f ()

        self.tb.connect (src0, (cal,0))
        self.tb.connect (src1, (cal,1))
        self.tb.connect (src2, (cal,2))
        self.tb.connect (src3, (cal,3))
        self.tb.connect (cal, dst)

        self.tb.run ()
        result = dst.data ()
        #self.assertFloatTuplesAlmostEqual (expected_result, result_data, 6)
        print result


if __name__ == '__main__':
    gr_unittest.main ()
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to