Commit Graph

3 Commits

Author SHA1 Message Date
Vasil Velichkov 601c786d51 tests: Close the temp file handle in qa_burst_file_source
This fixes the following warning

./usr/lib64/python3.7/unittest/case.py:645: ResourceWarning: unclosed file <_io.BufferedWriter name='/tmp/tmpkkz_akd6'>
  testMethod()
ResourceWarning: Enable tracemalloc to get the object allocation traceback

Change-Id: I66c2be2e5bf6915e3df253b3a69f5516534e3750
2021-05-03 07:14:00 +02:00
Vasil Velichkov 0c2845650a tests: Do not specify filename when runing gr_unittest
This fixes the following warning

DEPRECATED: Using filename with gr_unittest does no longer have any effect.

Change-Id: I7d6dbc32ff794ebf2bc116fa7437062e6780b85f
2021-05-03 07:14:00 +02:00
Vasil Velichkov 89585b374b burst_file_source: Fix reading longer bursts
- Read bursts with pmt::deserialize directly from the std::filebuf
- Remove the unused unserialized variable
- Add tests

Since df978693 when the rx_time tags are present in the incomming stream
the gsm receiver adds fm_time to the burst's PMT and the bursts that
burst file sink writes becomes longer because of the additional field.

The burst file source block was expecting all burst to be 147 bytes long
and reading files with longer bursts was failing with an unhandled exception.

terminate called after throwing an instance of 'pmt::exception'
thread[thread-per-block[5]: <block dummy_burst_filter (2)>]: pmt_cdr: wrong_type : #f
  what():  pmt::deserialize: malformed input stream, tag value = : 115

Change-Id: I989b0d6a6b214088b7880e5cbf7bb6725492dbfc
2018-09-13 09:35:28 +00:00