osmo-pcu[master]: EGPRS: EPDAN decoding: add test case to show no ack_nack len...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Aug 25 11:16:13 UTC 2016


Patch Set 2:

(5 comments)

https://gerrit.osmocom.org/#/c/765/2/tests/rlcmac/RLCMACTest.cpp
File tests/rlcmac/RLCMACTest.cpp:

Line 33: extern "C" {
Neither removal of gprs_log_info nor addition of these four headers is necessary.


Line 37: #include <osmocom/core/application.h>
All you need to do for this patch is to add here:
#include <osmocom/core/utils.h>


Line 218: void test_epdan_noack_nack_len_issue()
naming: is there a "noack"?
>From the rest it looks like "test_epdan_no_acknack_len"
would make more sense.

All tests are about an issue, so no need to name it "_issue".


Line 226: 	bitvec_unhex(vector, testData_epdan[0].c_str());
It would be easier to pass the string constant as argument directly,
like in line 210 above.

(Interesting, so far I always used osmo_hexparse() and wasn't
aware of bitvec_unhex()...
There seems to be no bitvec_hex() though.)


Line 227: 	RlcMacUplink_t *data = (RlcMacUplink_t *)malloc(sizeof(RlcMacUplink_t));
really a malloc? In that case you're missing a free, right?
I notice that testRlcMacDownlink() above has a similar leak.

Easier would be to have a static struct:

  RlcMacUplink_t data;

And use '&data' / '&data.u.Egprs...' below.


-- 
To view, visit https://gerrit.osmocom.org/765
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8da84794748f2e81722c3eca69b46ccc3a21552e
Gerrit-PatchSet: 2
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: arvind.sirsikar <arvind.sirsikar at radisys.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: arvind.sirsikar <arvind.sirsikar at radisys.com>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list