Commit Graph

283 Commits

Author SHA1 Message Date
Harald Welte a362ee90b4 add sercomm unit test
Change-Id: I9e2e7fcda28e7c6844d5faa09e02acf537cea44d
2017-05-17 15:15:09 +01:00
Vadim Yanitskiy 35b54d12bb fsm_test.c: fix unreachable check
Change-Id: Ic3d5da00f7ece6dbcd4c999187a5748c9331e60f
2017-05-15 12:51:15 +00:00
Harald Welte 3318c657de introduce byteswap.h with osmo_{htonl,ntohl,htons,ntohs}
We need to have an architecture-independend way of endian conversion /
byte swapping functions which will also work on embedded (bare iron)
builds.   Let's introduce osmocom/core/bytesawp.h for this purpose.

Change-Id: Ibc0cc1e36d4ed63a35cf8ceff3af0f26e5ac7a3d
2017-05-15 13:42:00 +02:00
Vadim Yanitskiy 391d8746d0 kasumi_test.c: fix incomplete check
Previously the 'passed' variable in test_expansion() was being
overwritten on every call of _compare_mem(), so only the result
of last call influenced the test result.

Change-Id: Ibf3ab453c20c7eeec234b95bfe14b497c572c35f
2017-05-14 20:27:22 +03:00
Pablo Neira Ayuso 44f423f117 timer: add osmo_timer_setup()
Add a new function timer function to set up the timer, similar to what
we have in the Linux kernel. This patch also converts existing opencoded
timer setup in the libosmocore tree as initial client of this new
function.

This patch implicitly removes function callback passed by reference that
defeat compile time type validation.

Compile-tested only, but I ran make check that reports success when
testing timer infrastructure.

Change-Id: I2fa49972ecaab3748b25168b26d92034e9145666
2017-05-09 12:10:51 +02:00
Max c65c5b4ea0 vty: cleanup logging functions
* remove unused parameter from logging_vty_add_cmds()
* mark log level descriptors static
* change internal static function int check_log_to_target() to more
  appropriate bool should_log_to_target()
* deprecate log_vty_command_*() from public API as it should only be
  used by logging_vty_add_cmds()

Change-Id: I0e9ddd7ba3ce211302d99a3494eb408907a2916e
Related: OS#71
2017-05-09 09:11:05 +00:00
Vadim Yanitskiy 33e03065a5 tests/conv: add GSM 05.03 specific test
This change extends the convolutional code test coverage, adding
the GSM 05.03 specific test vectors, generated by the conv_gen.py.

Inspired by Tom's patch:
http://lists.osmocom.org/pipermail/openbsc/2014-April/007364.html

Change-Id: I76d1cd4032d2f74c5bb93bde4fab99aa655b7f1a
2017-04-30 02:59:42 +07:00
Max f74cfd35ac Add SW Description (de)marshalling
* data structure representing 3GPP TS 52.021 §9.4.62 SW Description
* function to serialize it into msgb
* function to deserialize it from buffer
* functions to extract/estimate buffer size for SW Description
* test harness (partially taken from OpenBSC)

There are several similar functions to deal with SW Description in
OpenBSC, there's also need to use similar functionality in
OsmoBTS. Hence it's better to put the code into common library with
proper tests and documentation.

Change-Id: Ib63b6b5e83b8914864fc7edd789f8958cdc993cd
Related: OS#1614
2017-04-28 08:45:09 +00:00
Harald Welte 31c0fef2fd control_if: Add control interface commands for FSMs
This allows programmatic access to introspection of FSM instances, which
is quite handy from e.g. external test cases: Send a message to the
code, then use the CTRL interface to check if that message has triggered
the right kind of state transition.

Change-Id: I0f80340ee9c61c88962fdd6764a6098a844d0d1e
2017-04-27 09:50:47 +02:00
Harald Welte f85861d6eb control_if: Add helper function for 'local execution' of control command
Sometimes (particularly when testing), we may want to parse+execute an
arbitrary control command simply form a string buffer, rather than from
a msgb.  Let's add a helper for that.

Change-Id: Iaca748e0d942bb2a1ee7c2776b37485e1439eb0c
2017-04-27 09:50:33 +02:00
Harald Welte 4585e6755d osmo_fsm: Lookup functions to find FSM Instance by name or ID
Introduce two lookup helper functions to resolve a fsm_instance based on
the FSM and name or ID.  Also, add related test cases.

Change-Id: I707f3ed2795c28a924e64adc612d378c21baa815
2017-04-16 17:28:23 +02:00
Harald Welte dda70fca79 Add osmo_sock_init2() function, allowing both BIND *and* CONNECT
The old osmo_sock_init() function allows only either a bind (for a
server socket), or a connect (for a client socket), but not both
together.  So there's no way to have a client socket that is bound to a
specific local IP and/or port, which is needed for some use cases.

Change-Id: Idab124bcca47872f55311a82d6818aed590965e6
2017-04-09 21:46:21 +02:00
Philipp Maier 15596e2a7f gsm0808: make gsm0808_create_reset_ack() accessible
The create function to generate the RESET ACKNOWLEDGE
message is not accessible from outside, as it does not
appear in limosmogsm.map. It also has not testcase.

This commit adds gsm0808_create_reset_ack() to the
map file and also adds a testcase.

Change-Id: I82d3411484f82b4a9205d407fa0442244678f183
2017-04-08 07:44:47 +00:00
Philipp Maier c6144a2448 gsm0808: Add create functions for BSS_MAP_MSG_ASSIGMENT_RQST
gsm0808.h/c lacks functionality to generate BSS_MAP_MSG_ASSIGMENT_RQST messages.
These messages are required if the code is used in an MSC implementation.

This commit adds a gsm0808_create_assignment() function, that generates an
A/AoiP BSS_MAP_MSG_PAGING message.

Change-Id: I4d1d455a1e1cf95407e23ded7b7defbcf2dd6ff0
2017-04-08 07:44:47 +00:00
Philipp Maier 3d48ec06a9 gsm0808: Add create functions for BSS_MAP_MSG_PAGING
gsm0808.h/c lacks functionality to generate BSS_MAP_MSG_PAGING messages. These
messages are required if the code is used in an MSC implementation.

This commit adds a gsm0808_create_paging() function, that generates an A/AoiP
BSS_MAP_MSG_PAGING message.

Change-Id: I9afecf0109305ca5153bf081bb29cd94071dd2b7
2017-04-08 07:44:46 +00:00
Philipp Maier b478dd38d2 gsm0808: Add create functions for CIPHER MODE COMMAND
gsm0808.h/c lacks functionality to generate CIPHER MODE COMMAND messages. These
messages are required if the code is used in an MSC implementation.

This commit adds a gsm0808_create_cipher() function, that generates an A/AoiP
CIPHER MODE COMMAND message.

Change-Id: I8eb1c357860c3e740b0f5d17e1c256bc87920958
2017-04-08 07:44:46 +00:00
Philipp Maier 783047e86e gsm0808: Add utils for Cell Identifier List
The planned support for true A over IP requires the encoding of
the a Cell Identifier List element (see also BSS_MAP_MSG_PAGING).

This commt adds encoding/decoding functionality and tests for
the element mentioned above, however, it is not yet actively used.

Change-Id: I625245dd1dd396fc2bc189e8cd2c444a33042528
2017-04-08 07:44:46 +00:00
Philipp Maier 14e76b9958 gsm0808: Add utils for Encryption Information
The planned support for true A over IP requires the encoding of
the an Encryption Information element (see also BSS_MAP_MSG_CIPHER_MODE_CMD).

This commt adds encoding/decoding functionality and tests for
the element mentioned above, however, it is not yet actively used.

Change-Id: I8262050a9d9fd3f17462cfbb046c6e034dccc6fb
2017-04-08 07:44:46 +00:00
Philipp Maier e0c65301d5 gsm0808: Add utils for Channel Type
The planned support for true A over IP requires the encoding of
the a Channel Type element (see also ASSIGNMENT REQUEST).

This commt adds encoding/decoding functionality and tests for
the element mentioned above, however, it is not yet actively used.

Change-Id: Id0e2164d84b8cbcc6fe6a090fc7f40a1251421d7
2017-04-08 07:44:46 +00:00
Philipp Maier fa896abbb3 gsm0808: Add AoIP specific elements to gsm0808_create_... functions
the classic A implementation in libosmocore lacks support for AoIP
message elements. This patch adds support for AoIP by adding a set
of new gsm0808_create_..., which support the missing AoIP message
elements

Change-Id: I77f866abec1822d19871052f3c647ad782785b34
2017-04-08 07:44:45 +00:00
Philipp Maier 6f725d6da3 gsm0808: Add utils for Speech Codec List and Speech Codec
The planned support for true A over IP requires the encoding and
decoding of a so called "Speech Codec Element" element.

This commt adds parsing functionality and tests for the element
mentioned above, however, it is not yet actively used.

Change-Id: I0e1e2edf47adaa45b22d4b0bcae3640dba7ca200
2017-04-08 07:44:45 +00:00
Philipp Maier 22401433aa gsm0808: Add utils for AoIP Transport Layer Address
The planned support for true A over IP requires the encoding and
decoding of a so called "AoIP Transport Layer Address" element.

This commt adds parsing functionality and tests for the element
mentioned above, however, it is not yet actively used.

Change-Id: I57933b0a06a3f54ec2a41e6ecb6ced9fbbc89332
2017-04-08 07:44:45 +00:00
Neels Hofmeyr 7c1ec8c8e7 ctrl_type_vals: explicitly terminate
Don't use CTRL_TYPE_UNKNOWN as value_string[] terminator, use an explicit, more
obvious { 0, NULL } termination. Set an explicit string for CTRL_TYPE_UNKNOWN.
No other value_string[]s to date have such a "hidden" terminator.

BTW, a { 0, "string" } item is not a terminator, only { 0, NULL } is, so we can
set a string for CTRL_TYPE_UNKNOWN == 0.

Also, having a string value for CTRL_TYPE_UNKNOWN is not harmful because all
code paths explicitly check for the CTRL_TYPE_*s that are valid.

Adjust the test expectation.

From the ctrl_type_vals enum, remove the = 0, because it is implicitly 0
anyway.

One motivation to press this fixup: I am trying to add a script that checks
whether all value_string[]s are terminated to our jenkins jobs, and to find
that this one is terminated, it would need to interpret the CTRL_TYPE_UNKNOWN
constant, which would make things far more complex. At this point, all of the
value_string[]s have an explicit termination, and I would like to enforce this
from now on -- for readable code and to not spend more time on the validator.

The patch adding ctrl_type_vals (Icd4e96dd9f00876cb70b43cfcf42ab4f10311b28) was
accepted by another reviewer before I could reconfirm my -1, so this is a fixup
to enable the termination checking script patches.

Related: I2bc93ab4781487e7685cfb63091a489cd126b1a8 (adds script to libosmocore)
         I7fe3678b524d602fc6aa14bc0ed06308df809a3e (uses in jenkins.sh)
	 Icd4e96dd9f00876cb70b43cfcf42ab4f10311b28 (adds ctrl_type_vals)

Change-Id: Ia99f37464c7b36b587da2cc78f52c82725f02cbc
2017-03-15 13:47:20 +00:00
Neels Hofmeyr 6761c3f626 milenage_test: cosmetic: verify AUTS in comments
In a comment and by code #if'd away, illustrate that the AUTS used in the unit
test is accurate.

Related: OS#1968
Change-Id: Iefeaaf33570f8e40245fdf9b810390ec61cfc7e0
2017-03-15 13:46:58 +00:00
Neels Hofmeyr 45e778d397 milenage_test: enhance to verify new SQN increments
After the legacy mode incrementing with ind_bitlen == 0 is through, do another
AUTS run with sensible ind_bitlen and ind, and then two more normal vector
generations to verify proper SQN increments.

Related: OS#1968
Change-Id: Id6947899ff7b1c82b939f969e163e51ce282bce2
2017-03-15 12:46:08 +00:00
Neels Hofmeyr bb6f7b7bec osmo_auth_gen_vec: UMTS auth: fix SQN as SEQ || IND
So far we incremented SQN by 1, which doesn't match the procedures described in
3GPP TS 33.102. An IND (index) denotes a non-significant part of SQN, and the
significant SEQ part needs to be incremented.

In OsmoHLR we furthermore want to use the "exception" suggested in annex C.3.4,
so that each HLR's client has a fixed IND index. In other words, we will not
assign IND cyclically, but keep IND unchanged per auth vector consumer.

Add 'ind_bitlen' and 'ind' to the osmo_sub_auth_data.u.umts structure and
increment SQN accordingly.

Add a comment explaining the details.

Because 'ind_bitlen' is still passed as zero, the milenage_test does not change
its behavior, which is a feature I want to clearly show in this patch. The test
will be expanded for the newly implemented SQN scheme in a subsequent patch.

Adjust osmo-auc-gen.c to still show the right SQN and SQN.MS -- because it is
passing ind_bitlen == 0, osmo-auc-gen can rely on single increments and know
SQN.MS is sqn - 1. Note that osmo-auc-gen_test output remains unchanged.

Related: OS#1968
Change-Id: Ibc97e1736a797ffcbf8c1f7d41c5c4518f4e41bf
2017-03-15 12:46:08 +00:00
Neels Hofmeyr 82c9a0ec19 osmo_auth_gen_vec: UMTS auth: store last used SQN, not next
Prepare for the implementation of splitting SQN increments in SEQ and an IND
part; particularly to clearly show where the changes in auth/milenage_test's
expectations originate.

Rationale: the source of UMTS auth vectors, for us usually OsmoHLR, typically
stores the last used SQN, not the next one to be used. Particularly with the
upcoming fix of the SQN scheme, this change is important: the next SQN will
depend on which entity asks for it, because each auth consumer may have a
particular slot in the IND part of SQN. It does not make sense to store the
next SQN, because we will not know which consumer that will be for.

The milenage_test has always calculated a tuple for SQN == 34. To account for
the increment now happening before calculating a tuple, lower the test_aud->sqn
by one to 0x21 == 33, so that it is still calculating for SQN == 34.

Because we are no longer incrementing SQN after the tuple is generated,
milenage_test's expected output after doing an AUTS resync to 31 changes to the
next SQN = 32, the SQN used for the generated tuple.

(BTW, a subsequent patch will illustrate AUTS in detail.)

osmo-auc-gen now needs to pass the user requested SQN less one, because the SQN
will be incremented befor generating the auth vector. Also the SQN remains the
same after generating, so SQN output needs less decrementing. Note that the
expected output for osmo-auc-gen_test remains unchanged, hence the same input
arguments (particularly -s <sqn> and -A <auts>) still produce the same results.

Note: osmo-hlr regression tests will require adjustments when this patch is
merged, because it must now pass desired_sqn - 1 instead of just desired_sqn.
See osmo-hlr change-id I4ec5a578537acb1d9e1ebfe00a72417fc3ca5894 .

Related: OS#1968
Change-Id: Iadf43f21e0605e9e85f7e8026c40985f7ceff1a3
2017-03-15 12:46:08 +00:00
Neels Hofmeyr 5fe3d1b0f7 osmo-auc-gen: clarify SQN output, prepare for SQN changes
Upcoming patches will change the way SQN are incremented. Change the SQN
related output by osmo-auc-gen so that it also makes sense after these changes,
and so that its output is proven to remain unchanged for the same arguments:

Always show the SQN used for vector generation when a UMTS vector was generated.

Don't show the next SQN, it will not make sense anymore (see later patches).

The adjustments of expected output of osmo-auc-gen_test illustrates how the
output changes.

Related: OS#1968
Change-Id: I35d9c669002ff3e8570e07b444cca34ce57c3b0c
2017-03-15 12:46:08 +00:00
Neels Hofmeyr d3b58730d5 add osmo-auc-gen_test
Add test for osmo-auc-gen invocations to ensure stability across upcoming SQN
increment scheme changes.

The test comprises of a shell script that invokes the osmo-auc-gen binary with
various milenage parameters, of which the stdout/stderr are verified.

More osmo-auc-gen invocations could be added, but my main focus is on the SEQ
changes. Instead of manually testing that it still works for each SQN patch, I
want this test to do it for me.

To make sure that osmo-auc-gen is build before the tests are launched, place
'utils' before 'tests' in the root Makefile.am.

Related: OS#1968
Change-Id: Ib4af34201cd2e7d76037bcd31dd89ef18c1a9aec
2017-03-15 12:46:08 +00:00
Neels Hofmeyr 8e1b598c8a milenage_test: cosmetic fix: shown value is not SEQ.MS
In the milenage_test, the console output printed "SEQ.MS = 33", but 33 is
a) the SQN, not SEQ;
b) the SQN *after* the next auth generation, i.e. SQN.MS would have been 31.

While at it also use the proper PRIu64 from inttypes.h to output the sqn value.

This prepares for upcoming sparation of SQN incrementing by SEQ and IND,
particularly to clearly show where the changes in auth/milenage_test's
expectations originate.

Related: OS#1968
Change-Id: Ie83201f1362f3d793ada774f3fc5f89cc0b3fbb7
2017-03-15 12:46:08 +00:00
Vadim Yanitskiy 3262f820b5 libosmocoding: migrate transcoding routines from OsmoBTS
There are some projects, such as GR-GSM and OsmocomBB, which would
benefit from using one shared implementation of GSM 05.03 code. So,
this commit introduces a new sub-library called libosmocoding, which
(for now) provides GSM, GPRS and EDGE transcoding routines, migrated
from OsmoBTS.

The original GSM 05.03 code from OsmoBTS was relicensed under
GPLv2-or-later with permission of copyright holders (Andreas Eversberg,
Alexander Chemeris and Tom Tsou).

The following data types are currently supported:

 - xCCH
 - PDTCH (CS 1-4 and MCS 1-9)
 - TCH/FR
 - TCH/HR
 - TCH/AFS
 - RCH/AHS
 - RACH
 - SCH

Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1
2017-03-07 01:06:38 +07:00
Vadim Yanitskiy 68930e85b5 tests/conv: separate test logic
To be able to add some more tests, related to convolutional coding,
without duplication of code, the test logic was separated from the
conv_test.c into conv.c and conv.h.

Change-Id: Idbdc7e19cb9b9a36cd1fccd621cd858e87530d98
2017-03-06 17:06:45 +00:00
Max 70c7d4160d Use value_string for ctrl_type
Use value_string for enum ctrl_type instead of custom code. Add
corresponding unit tests.

Related: OS#1615
Change-Id: Icd4e96dd9f00876cb70b43cfcf42ab4f10311b28
2017-03-01 16:37:59 +00:00
Neels Hofmeyr bd9de2f66f gsup_test: also check stderr
Configure logging to be deterministic and add stderr checking to testuite.at.

However, exclude the thousands of message modification log lines from the log
to not have a huge test expectation file.

Change-Id: I0dd7112967a64a168556b62e5ec15107b7608ffb
2017-02-22 07:29:46 +00:00
Neels Hofmeyr abb23698d6 gsup test: add decoding test for UMTS IEs
This would have caught the wrong expectation of AUTS' length fixed recently
(3a5ca647c5).

Besides AUTS, add AUTN, RES, CK, IK which were also not tested yet.

Change-Id: I6fddf8d7ce97137b0a585d365807bcaf90a319d0
Related: OS#1593
2017-02-22 07:29:46 +00:00
Neels Hofmeyr 437ed4ab42 osmo_hexparse: allow whitespace in parsed string, add ws test
This is particularly useful for hex dumps containing spaces found in a log
(e.g. osmo-nitb authentication rand token), which can now be passed in quotes
to osmo-auc-gen without having to edit the spaces away.

Change-Id: Ib7af07f674a2d26c8569acdee98835fb3e626c45
2017-02-14 15:59:22 +01:00
Neels Hofmeyr 7adb567ffb utils: add hexparse test
Change-Id: Ic95ab00b57d54905a235109561c00419161cf4bc
2017-02-14 15:56:40 +01:00
Philipp Maier 6f0f560eab cosmetic: replace fprintf with LOGP
socket.c still uses fprintf to output error messages. This commit
replaces the fprintf with proper LOGP messages.

Change-Id: Ia2993415d5f5c33ccd719af239ff59252d11b764
2017-02-09 16:21:01 +01:00
Harald Welte 4ffb43f654 Add minimal testing of socket.c helper functions
Change-Id: I2773b3859a206f96fb8fa095d50a653d9eeb8d79
2017-02-08 18:23:06 +01:00
Neels Hofmeyr 7132011afa bssgp_fc_test: do not use real time
Employ osmo_gettimeofday_override_* to take bssgp_fc_test off real time. The
jenkins build slave often failed the test based on sporadic time delays due to
server load and randomly rejected good patches. This patch ends that.

Change-Id: Ie5029b85c2a154554d75d7f9af49a3b93425fdd9
Related: OS#1809
2017-02-07 00:39:54 +00:00
Neels Hofmeyr 8352d31a86 GSUP, OAP, osmo-gen-vec: fix AUTS length to 14, not 16
GSUP transmits AUTS for UMTS authentication procedures, and OAP uses the same
procedures to authenticate. osmo-gen-vec is a utility program that passes AUTS
to our osmo_auth_gen_vec_auts() API.

According to 3GPP 33.102 6.3.3, AUTS = SQN^AK || MAC-S, which are 6 || 8 == 14
bytes. This is confirmed by 24.008 9.2.3a where the TLV has 16 bytes, TL = 2
and AUTS being the V = 14.

It is not harmful for milenage_gen_vec_auts() to pass two more AUTS bytes. But
writing 16 bytes to a GSUP struct is a potential problem when passing in a 14
byte long AUTS buffer to the GSUP API, which then reads past the AUTS buffer.
The API implies the length, so far to be 16, so passing in a 14 byte buffer to
GSUP would require copying to a larger buffer first.

Fix this by using a length of 14 for AUTS everywhere instead.

This constitues an ABI breakage, we may handle it as a "fix before an official
release", otherwise we need a version bump.

The OAP protocol document has also been updated, needs an update in the
osmo-gsm-manuals as well.

Change-Id: If25b173d9ec57ea4c504d860954912b7d82af455
2017-02-02 20:34:16 +01:00
Vadim Yanitskiy d8494bc9b7 tests/conv: whitespece fix
Change-Id: I73ab4614c5c23390862d3ecaa2561a6749604a15
2017-01-16 12:54:32 +00:00
Vadim Yanitskiy 1214295062 tests/conv: add LTE PBCH test vector
Change-Id: I1a3a48bba9ee32a0bacc0b05d25358496dbcbc1b
2017-01-16 12:52:01 +00:00
Neels Hofmeyr b41b48e76a stats_test: fix mismatching osmo_stats_reporter->send_item signature
The function pointer expects the last arg as int64_t, stats_test.c uses
an int instead. Fix the argument type as well as the printf format for it.

Fixes this compiler warning seen on our FreeBSD build slave:

    CC       stats/stats_test.o
  ../../tests/stats/stats_test.c:288:18: warning: incompatible pointer types assigning to 'int (*)(struct osmo_stats_reporter *, const struct osmo_stat_item_group *, const struct osmo_stat_item_desc *, int64_t)' from 'int (struct osmo_stats_reporter *, const struct osmo_stat_item_group *, const struct osmo_stat_item_desc *, int)' [-Wincompatible-pointer-types]
          srep->send_item = stats_reporter_test_send_item;
                          ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

Change-Id: I91cbfd4dd25a881b803943430101dabf07dafc7c
2017-01-15 18:10:15 +00:00
Max 2f0b0c955b Fix compilation warnings: missing includes: gsm0411_utils.c, lapd_core.c, oap_test.c
Change-Id: Id524327b3f44e22e3aa44c5e8e4965b084cb326a
2017-01-13 09:36:25 +00:00
Jean-Francois Dionne d02c8af6cc DTX: fix AMR SID-FIRST detection
Max's note: adjusted test output.

Change-Id: I46477c631bf86345cb757f31d7f2e2935b12adcc
Related: OS#1801
2017-01-10 23:28:12 +00:00
Pravin Kumarvel 848de8f1df Add function to get uninterrupted bit run
Function bitvec_rl_curbit added to get number of  uninterrupted
bits run in vector starting from the current bit till max number
of bits.
Test case is added to check bitvec_rl_curbit.

Change-Id: Iae153d3639ea6b891c1fc10d7801a435c9492e26
2017-01-06 10:37:42 +00:00
Harald Welte 53e2672e11 lapd_test: avoid calling memcpy with NULL source
fixes
lapd/lapd_test.c:54:2: runtime error: null pointer passed as argument 2, which is declared to never be null

Change-Id: I7030729f4f4c867adecc7afc15bb5ca9beff0030
2017-01-06 10:03:30 +00:00
Neels Hofmeyr cba8eb9b21 fsm_test.c: fix compiler warning: timer cb return type
Change-Id: Ifd7e85cd69b5e7e473000abc1ef7a56748aafc0e
2016-12-24 17:11:52 +00:00
Neels Hofmeyr 6a13e7f563 fsm: add LOGPFSML to pass explicit logging level
Provide one central LOGPFSML to print FSM information, take the FSM logging
subsystem from the FSM instance but use an explicitly provided log level
instead of the FSM's default level.

Use to replace some, essentially, duplications of the LOGPFSM macro.

In effect, the fsm_test's expected error changes, since the previous code dup
for logging events used round braces to indicate the fi's state, while the
central macro uses curly braces.

Change-Id: If295fdabb3f31a0fd9490d1e0df57794c75ae547
2016-12-14 17:56:48 +01:00