See <http://jenkins.osmocom.org/jenkins/job/osmocom-coverity/6/display/redirect>
------------------------------------------
[...truncated 819.23 KB...]
CXX gprs_rlcmac.lo
CXX gprs_bssgp_pcu.lo
CXX gprs_rlcmac_sched.lo
CXX gprs_rlcmac_meas.lo
CXX gprs_rlcmac_ts_alloc.lo
CXX gprs_ms.lo
gprs_bssgp_pcu.cpp:967:2: warning: #warning "This causes ASAN to complain. It is not critical for normal operation but should be fixed nevertheless" [-Wcpp]
#warning "This causes ASAN to complain. It is not critical for normal operation but should be fixed nevertheless"
^~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/write_queue.h:31:0,
from ./pcu_l1_if.h:27,
from gprs_rlcmac_meas.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h: In function ‘const char* msgb_hexdump_l2(const msgb*)’:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:96:21: error: invalid conversion from ‘void*’ to ‘const unsigned char*’ [-fpermissive]
#define msgb_l2(m) ((void *)(m->l2h))
~^~~~~~~~~~~~~~~~~
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:516:22: note: in expansion of macro ‘msgb_l2’
return osmo_hexdump(msgb_l2(msg), msgb_l2len(msg));
^~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:24:0,
from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/write_queue.h:31,
from ./pcu_l1_if.h:27,
from gprs_rlcmac_meas.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/utils.h:55:7: note: initializing argument 1 of ‘char* osmo_hexdump(const unsigned char*, int)’
char *osmo_hexdump(const unsigned char *buf, int len);
^~~~~~~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/write_queue.h:31:0,
from ./pcu_l1_if.h:27,
from gprs_rlcmac_meas.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h: In function ‘const char* msgb_hexdump_l3(const msgb*)’:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:98:21: error: invalid conversion from ‘void*’ to ‘const unsigned char*’ [-fpermissive]
#define msgb_l3(m) ((void *)(m->l3h))
~^~~~~~~~~~~~~~~~~
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:523:22: note: in expansion of macro ‘msgb_l3’
return osmo_hexdump(msgb_l3(msg), msgb_l3len(msg));
^~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:24:0,
from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/write_queue.h:31,
from ./pcu_l1_if.h:27,
from gprs_rlcmac_meas.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/utils.h:55:7: note: initializing argument 1 of ‘char* osmo_hexdump(const unsigned char*, int)’
char *osmo_hexdump(const unsigned char *buf, int len);
^~~~~~~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/write_queue.h:31:0,
from ./pcu_l1_if.h:27,
from gprs_rlcmac.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h: In function ‘const char* msgb_hexdump_l2(const msgb*)’:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:96:21: error: invalid conversion from ‘void*’ to ‘const unsigned char*’ [-fpermissive]
#define msgb_l2(m) ((void *)(m->l2h))
~^~~~~~~~~~~~~~~~~
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:516:22: note: in expansion of macro ‘msgb_l2’
return osmo_hexdump(msgb_l2(msg), msgb_l2len(msg));
^~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:24:0,
from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/write_queue.h:31,
from ./pcu_l1_if.h:27,
from gprs_rlcmac.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/utils.h:55:7: note: initializing argument 1 of ‘char* osmo_hexdump(const unsigned char*, int)’
char *osmo_hexdump(const unsigned char *buf, int len);
^~~~~~~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/write_queue.h:31:0,
from ./pcu_l1_if.h:27,
from gprs_rlcmac.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h: In function ‘const char* msgb_hexdump_l3(const msgb*)’:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:98:21: error: invalid conversion from ‘void*’ to ‘const unsigned char*’ [-fpermissive]
#define msgb_l3(m) ((void *)(m->l3h))
~^~~~~~~~~~~~~~~~~
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:523:22: note: in expansion of macro ‘msgb_l3’
return osmo_hexdump(msgb_l3(msg), msgb_l3len(msg));
^~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:24:0,
from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/write_queue.h:31,
from ./pcu_l1_if.h:27,
from gprs_rlcmac.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/utils.h:55:7: note: initializing argument 1 of ‘char* osmo_hexdump(const unsigned char*, int)’
char *osmo_hexdump(const unsigned char *buf, int len);
^~~~~~~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/gprs/gprs_ns.h:10:0,
from ./gprs_bssgp_pcu.h:31,
from gprs_rlcmac_sched.cpp:20:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h: In function ‘const char* msgb_hexdump_l2(const msgb*)’:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:96:21: error: invalid conversion from ‘void*’ to ‘const unsigned char*’ [-fpermissive]
#define msgb_l2(m) ((void *)(m->l2h))
~^~~~~~~~~~~~~~~~~
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:516:22: note: in expansion of macro ‘msgb_l2’
return osmo_hexdump(msgb_l2(msg), msgb_l2len(msg));
^~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:24:0,
from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/gprs/gprs_ns.h:10,
from ./gprs_bssgp_pcu.h:31,
from gprs_rlcmac_sched.cpp:20:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/utils.h:55:7: note: initializing argument 1 of ‘char* osmo_hexdump(const unsigned char*, int)’
char *osmo_hexdump(const unsigned char *buf, int len);
^~~~~~~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/gprs/gprs_ns.h:10:0,
from ./gprs_bssgp_pcu.h:31,
from gprs_rlcmac_sched.cpp:20:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h: In function ‘const char* msgb_hexdump_l3(const msgb*)’:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:98:21: error: invalid conversion from ‘void*’ to ‘const unsigned char*’ [-fpermissive]
#define msgb_l3(m) ((void *)(m->l3h))
~^~~~~~~~~~~~~~~~~
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:523:22: note: in expansion of macro ‘msgb_l3’
return osmo_hexdump(msgb_l3(msg), msgb_l3len(msg));
^~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:24:0,
from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/gprs/gprs_ns.h:10,
from ./gprs_bssgp_pcu.h:31,
from gprs_rlcmac_sched.cpp:20:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/utils.h:55:7: note: initializing argument 1 of ‘char* osmo_hexdump(const unsigned char*, int)’
char *osmo_hexdump(const unsigned char *buf, int len);
^~~~~~~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/prim.h:20:0,
from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/gsm/l1sap.h:5,
from ./bts.h:31,
from gprs_rlcmac_ts_alloc.cpp:24:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h: In function ‘const char* msgb_hexdump_l2(const msgb*)’:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:96:21: error: invalid conversion from ‘void*’ to ‘const unsigned char*’ [-fpermissive]
#define msgb_l2(m) ((void *)(m->l2h))
~^~~~~~~~~~~~~~~~~
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:516:22: note: in expansion of macro ‘msgb_l2’
return osmo_hexdump(msgb_l2(msg), msgb_l2len(msg));
^~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:24:0,
from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/prim.h:20,
from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/gsm/l1sap.h:5,
from ./bts.h:31,
from gprs_rlcmac_ts_alloc.cpp:24:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/utils.h:55:7: note: initializing argument 1 of ‘char* osmo_hexdump(const unsigned char*, int)’
char *osmo_hexdump(const unsigned char *buf, int len);
^~~~~~~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/prim.h:20:0,
from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/gsm/l1sap.h:5,
from ./bts.h:31,
from gprs_rlcmac_ts_alloc.cpp:24:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h: In function ‘const char* msgb_hexdump_l3(const msgb*)’:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:98:21: error: invalid conversion from ‘void*’ to ‘const unsigned char*’ [-fpermissive]
#define msgb_l3(m) ((void *)(m->l3h))
~^~~~~~~~~~~~~~~~~
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:523:22: note: in expansion of macro ‘msgb_l3’
return osmo_hexdump(msgb_l3(msg), msgb_l3len(msg));
^~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:24:0,
from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/prim.h:20,
from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/gsm/l1sap.h:5,
from ./bts.h:31,
from gprs_rlcmac_ts_alloc.cpp:24:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/utils.h:55:7: note: initializing argument 1 of ‘char* osmo_hexdump(const unsigned char*, int)’
char *osmo_hexdump(const unsigned char *buf, int len);
^~~~~~~~~~~~
Makefile:775: recipe for target 'gprs_rlcmac_meas.lo' failed
make[1]: *** [gprs_rlcmac_meas.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:775: recipe for target 'gprs_rlcmac_ts_alloc.lo' failed
make[1]: *** [gprs_rlcmac_ts_alloc.lo] Error 1
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/gprs/gprs_ns.h:10:0,
from ./gprs_bssgp_pcu.h:31,
from gprs_bssgp_pcu.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h: In function ‘const char* msgb_hexdump_l2(const msgb*)’:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:96:21: error: invalid conversion from ‘void*’ to ‘const unsigned char*’ [-fpermissive]
#define msgb_l2(m) ((void *)(m->l2h))
~^~~~~~~~~~~~~~~~~
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:516:22: note: in expansion of macro ‘msgb_l2’
return osmo_hexdump(msgb_l2(msg), msgb_l2len(msg));
^~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:24:0,
from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/gprs/gprs_ns.h:10,
from ./gprs_bssgp_pcu.h:31,
from gprs_bssgp_pcu.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/utils.h:55:7: note: initializing argument 1 of ‘char* osmo_hexdump(const unsigned char*, int)’
char *osmo_hexdump(const unsigned char *buf, int len);
^~~~~~~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/gprs/gprs_ns.h:10:0,
from ./gprs_bssgp_pcu.h:31,
from gprs_bssgp_pcu.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h: In function ‘const char* msgb_hexdump_l3(const msgb*)’:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:98:21: error: invalid conversion from ‘void*’ to ‘const unsigned char*’ [-fpermissive]
#define msgb_l3(m) ((void *)(m->l3h))
~^~~~~~~~~~~~~~~~~
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:523:22: note: in expansion of macro ‘msgb_l3’
return osmo_hexdump(msgb_l3(msg), msgb_l3len(msg));
^~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:24:0,
from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/gprs/gprs_ns.h:10,
from ./gprs_bssgp_pcu.h:31,
from gprs_bssgp_pcu.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/utils.h:55:7: note: initializing argument 1 of ‘char* osmo_hexdump(const unsigned char*, int)’
char *osmo_hexdump(const unsigned char *buf, int len);
^~~~~~~~~~~~
Makefile:775: recipe for target 'gprs_rlcmac_sched.lo' failed
make[1]: *** [gprs_rlcmac_sched.lo] Error 1
gprs_bssgp_pcu.cpp: At global scope:
gprs_bssgp_pcu.cpp:76:12: warning: ‘int parse_ra_cap(tlv_parsed*, MS_Radio_Access_capability_t*)’ defined but not used [-Wunused-function]
static int parse_ra_cap(struct tlv_parsed *tp, MS_Radio_Access_capability_t *rac)
^~~~~~~~~~~~
Makefile:775: recipe for target 'gprs_bssgp_pcu.lo' failed
make[1]: *** [gprs_bssgp_pcu.lo] Error 1
Makefile:775: recipe for target 'gprs_rlcmac.lo' failed
make[1]: *** [gprs_rlcmac.lo] Error 1
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/write_queue.h:31:0,
from pcu_l1_if.h:27,
from gprs_ms.h:28,
from gprs_ms.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h: In function ‘const char* msgb_hexdump_l2(const msgb*)’:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:96:21: error: invalid conversion from ‘void*’ to ‘const unsigned char*’ [-fpermissive]
#define msgb_l2(m) ((void *)(m->l2h))
~^~~~~~~~~~~~~~~~~
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:516:22: note: in expansion of macro ‘msgb_l2’
return osmo_hexdump(msgb_l2(msg), msgb_l2len(msg));
^~~~~~~
In file included from gprs_coding_scheme.h:27:0,
from rlc.h:22,
from tbf.h:25,
from gprs_ms.h:27,
from gprs_ms.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/utils.h:55:7: note: initializing argument 1 of ‘char* osmo_hexdump(const unsigned char*, int)’
char *osmo_hexdump(const unsigned char *buf, int len);
^~~~~~~~~~~~
In file included from /home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/write_queue.h:31:0,
from pcu_l1_if.h:27,
from gprs_ms.h:28,
from gprs_ms.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h: In function ‘const char* msgb_hexdump_l3(const msgb*)’:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:98:21: error: invalid conversion from ‘void*’ to ‘const unsigned char*’ [-fpermissive]
#define msgb_l3(m) ((void *)(m->l3h))
~^~~~~~~~~~~~~~~~~
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/msgb.h:523:22: note: in expansion of macro ‘msgb_l3’
return osmo_hexdump(msgb_l3(msg), msgb_l3len(msg));
^~~~~~~
In file included from gprs_coding_scheme.h:27:0,
from rlc.h:22,
from tbf.h:25,
from gprs_ms.h:27,
from gprs_ms.cpp:22:
/home/osmocom-build/osmo-ci/coverity/install-Osmocom/include/osmocom/core/utils.h:55:7: note: initializing argument 1 of ‘char* osmo_hexdump(const unsigned char*, int)’
char *osmo_hexdump(const unsigned char *buf, int len);
^~~~~~~~~~~~
Makefile:775: recipe for target 'gprs_ms.lo' failed
make[1]: *** [gprs_ms.lo] Error 1
make[1]: Leaving directory '/home/osmocom-build/osmo-ci/coverity/source-Osmocom/osmo-pcu/src'
Makefile:461: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
[WARNING] Build command ./build_Osmocom.sh exited with code 2. Please verify that the build completed successfully.
Emitted 1854 C/C++ compilation units (100%) successfully
[WARNING] Recoverable errors were encountered during 6 of these C/C++ compilation units.
1854 C/C++ compilation units (100%) are ready for analysis
For more details, please look at:
/home/osmocom-build/osmo-ci/coverity/source-Osmocom/cov-int/build-log.txt
Build step 'Execute shell' marked build as failure
Hi all,
I recently proposed the patch https://gerrit.osmocom.org/#/c/6270/
and I would like to get some input from a wider audience.
Basically, it turns libosmo-mgcp (the mgw/server side MGCP lib) into an
internal library similar to 'libmsc' in osmo-msc, which we don't expect
to be used by other programs except osmo-mgw. Hence, there's no need to
install it as a shared library, which introduces requirements about
ABI/API stability and the like.
osmo-bsc_nat uses libosmo-legacy-mgcp, and once we should rewrite
osmo-bsc_nat, we might need some of the libosmo-mgcp related functions,
but at this point it's unclear what exactly would be needed and if
current libosmo-mgcp can provide that. As needed, we can introduce
a related shared library at that point.
Do you guys agree with this move, or do you think there is a point in
having a public shared library with preferably stable API for the MGW
side of MGCP? I think it just constrains us as to what we can do in
terms of code changes within the MGW - for no clear benefit.
Regards,
Harald
--
- Harald Welte <laforge(a)gnumonks.org> http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
Dear list,
I test again with new build for osmo-bsc osmo-msc-osmo-hlr
I dont know if the osmo-hlr and osmo-bsc has been fixing or I have mistake
for configuration which I did not change from the success I test before,
but now I cannot register my phone and even make the network error and keep
on emergency only when registering on the phone.
at osmo-hlr I got this :
20180201190135844 DAUC <0003> hlr.c:79 510106127044410: IMSI known, but has
no auth data; Returning slightly inaccurate cause 'IMSI Unknown' via GSUP
Does the new osmo-bsc on master cannot use? or maybe I need to investigate
more?
Thanks for any feedback!
--
Best Regards,
DUO
Hi,
I know that TTCN-3 is still new to a lot of you, but we are writing tons of
integration testing against the various osmocom programs in it. It is quite
amazing technology, and I would like to ask you to bear with me reading this mail :)
Pau was stating the question earlier today on not finding an example on how to
use decmatch. Indeed, it took me some months to find that gem in the TTCN-3
world.
It solves the problem that you often have during test of layered protocol
stacks: you have separate encoders/decoders for each protocol layer,
and now you want to match on some of the *inner* payload.
So normally, you have some kind of header definition + a binary (octetstring)
payload. This happens in RSL with the L3_INFO IE, and just the same on BSSAP/DTAP
where again the L3 message (for example call control) is encapsulated inside one
information element.
Now you have multiple options of addressing the problem:
a) hand-written calls to the decoder function
b) write na 'emulation' for the entire protocol layer
c) use decmatch.
a) would look like this (pseudo-code):
var octetstring l3oct;
var RSL_Message rsl
RSL.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, ?)) -> value rsl {
var PDU_ML3_MS_NW l3 := dec_PDU_ML3_MS_NW(rsl.payload);
if (match(l3, some_template)) {
... do something
}
...
}
Which uses the built-in pattern-matching on the RSL port to match any
message that matches the tr_RSL_DATA_REQ template, and stores the
resulting RSL message in a variable. It then uses an explicit call to
the decoder function of the L3 message, and then uses regular
conditional expressions for further matching on that inner L3 payload.
This is more or less how you would write in C, python or any other quite imperative
programming languages. It's very verbose, time consuming and un-abstract/elegant.
TTCN-3 has many declarative aspects to it. Code like the above is a waste of your time :)
b) would mean that you implement some test component that handles the RSL
messages on its bottom side test port, and the L3 messages on its top side
test port. That is a possible way, and if you need a lot of state/logic of RSL,
it maeks sense. But what if you really simply want to have a match? Then it would
be a lot of effort and a large detour.
c) decmatch to the rescue!
You can write
RSL.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, decmatch tr_RRM_RR_STATUS))
which means:
* do a receive on the RSL test port, and match on an incoming RSL message that
matches the tr_RSL_DATA_REQ template, with channel number specified, link_id
any (?), *and* if the octetstring payload, if decoded, matches the template
tr_RRM_RR_STATUS !
This is *extremely* powerful and expressive. It allows you to condense complex,
parametric template matching over multiple proocol layers. It would in
the end match RSL DATA REQUEST, only if they contained a [valid] encoded
RR STATUS. See https://gerrit.osmocom.org/6229 for the actual test case
I used for the above examples.
Please also note that I never had to even write the function name of the
decoder (dec_PDU_ML3_MS_NW), but TTCN-3 *automatically* figures out
which decoder function it must call in order to decode from the binary
octetstring.
Happy (TTCN-3) hacking + Osmocom bugfixing,
Harald
--
- Harald Welte <laforge(a)gnumonks.org> http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)