Forum: GNU Radio RE: Problems with How to Write a Signal ProcessingBlock

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B84410c26465ab9f9e79a99374fb3f0c?d=identicon&s=25 Bahn William L Civ USAFA/DFCS (Guest)
on 2007-01-31 00:35
(Received via mailing list)
As a test, I went into the howto_square_ff.cc file and changed it so
that it adds instead of multiplies (so doubles instead of squares). The
make check still passed without problems. If I introduced a syntax
error, then it fails - so I am definitely changing the file being used
in the make process.

This implies that the make check process is not actually invoking the
qa_howto.py program. That being the case, upon what basis does the
article claim that the new block works?


>
> Everything worked - better than it was supposed to. When I got to the
> first time I was supposed to run "make check" and it was supposed to
> fail, it passed. I'm assuming that this is because the tarball
included
>
> I tracked down the howto.py file (located in the lib directory) and
> copied it to the python site-packages directory.
>
> Now I get the error message:
>
> ImportError: No module named _howto
>
> The only file I can find by that name is _howto.la (again, in the lib
> directory). I copied it over to the site-packages directory, but got
the
745d8202ef5a58c1058d0e5395a78f9c?d=identicon&s=25 Eric Blossom (Guest)
on 2007-01-31 03:12
(Received via mailing list)
On Tue, Jan 30, 2007 at 04:33:53PM -0700, Bahn William L Civ USAFA/DFCS
wrote:
> As a test, I went into the howto_square_ff.cc file and changed it so
> that it adds instead of multiplies (so doubles instead of squares). The
> make check still passed without problems. If I introduced a syntax
> error, then it fails - so I am definitely changing the file being used
> in the make process.
>
> This implies that the make check process is not actually invoking the
> qa_howto.py program. That being the case, upon what basis does the
> article claim that the new block works?


OK, I just tried this (including changing * to +).
It worked as expected for me.

This is what I did.

Downloaded
ftp://ftp.gnu.org/gnu/gnuradio/gr-howto-write-a-block-3.0.2.tar.gz to
~/dl

  $ mkdir /tmp/test
  $ cd /tmp/test
  $ tar xzvf ~/dl/gr-howto-write-a-block-3.0.2.tar.gz
  $ cd gr-howto-write-a-block-3.0.2
  $ ./configure
  $ make
  $ make check

This worked fine.

Then I edited
/tmp/test/gr-howto-write-a-block-3.0.2/src/lib/howto_square_ff.c
and changed the * to a + in line 88.

The, with my current directory set to
/tmp/test/gr-howto-write-a-block-3.0.2

  $ make
  $ make check

And I get output like this (truncated)

Making check in python
make[2]: Entering directory
`/tmp/test/gr-howto-write-a-block-3.0.2/src/python'
make  check-TESTS
make[3]: Entering directory
`/tmp/test/gr-howto-write-a-block-3.0.2/src/python'
F.
======================================================================
FAIL: test_001_square_ff (__main__.qa_howto)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./qa_howto.py", line 44, in test_001_square_ff
    self.assertFloatTuplesAlmostEqual (expected_result, result_data, 6)
  File
"/usr/local/lib64/python2.4/site-packages/gnuradio/gr_unittest.py", line
86, in assertFloatTuplesAlmostEqual
    self.assertAlmostEqual (a[i], b[i], places, msg)
AssertionError: 9 != -6.0 within 6 places

----------------------------------------------------------------------
Ran 2 tests in 0.014s

FAILED (failures=1)
FAIL: run_tests
===================
1 of 1 tests failed
===================
make[3]: *** [check-TESTS] Error 1
make[3]: Leaving directory
`/tmp/test/gr-howto-write-a-block-3.0.2/src/python'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory
`/tmp/test/gr-howto-write-a-block-3.0.2/src/python'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/tmp/test/gr-howto-write-a-block-3.0.2/src'
make: *** [check-recursive] Error 1


Looks good to me.

Eric
This topic is locked and can not be replied to.