2023-01-18 17:54:00 +00:00
|
|
|
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir)
|
2019-09-17 16:38:58 +00:00
|
|
|
AM_CFLAGS = -Wall $(TALLOC_CFLAGS) $(PTHREAD_CFLAGS)
|
2019-03-18 23:04:51 +00:00
|
|
|
AM_LDFLAGS = -no-install
|
2023-01-18 16:04:04 +00:00
|
|
|
LDADD = $(top_builddir)/src/core/libosmocore.la $(TALLOC_LIBS) $(PTHREAD_LIBS)
|
2012-06-29 20:01:18 +00:00
|
|
|
|
2018-01-18 15:50:51 +00:00
|
|
|
if ENABLE_SERCOM_STUB
|
|
|
|
noinst_LIBRARIES = libsercomstub.a
|
|
|
|
LDADD += $(top_builddir)/tests/libsercomstub.a
|
|
|
|
endif
|
|
|
|
|
2012-06-29 20:01:18 +00:00
|
|
|
check_PROGRAMS = timer/timer_test sms/sms_test ussd/ussd_test \
|
2022-08-05 11:46:44 +00:00
|
|
|
bits/bitrev_test a5/a5_test \
|
2023-05-28 07:36:50 +00:00
|
|
|
conv/conv_test auth/milenage_test auth/tuak_test \
|
|
|
|
lapd/lapd_test \
|
2012-09-07 08:23:44 +00:00
|
|
|
gsm0808/gsm0808_test gsm0408/gsm0408_test \
|
2016-06-30 08:39:00 +00:00
|
|
|
gprs/gprs_test kasumi/kasumi_test gea/gea_test \
|
2017-12-01 18:39:23 +00:00
|
|
|
logging/logging_test codec/codec_test \
|
2024-04-22 02:25:10 +00:00
|
|
|
logging/logging_gsmtap_test \
|
2013-08-06 12:29:14 +00:00
|
|
|
loggingrb/loggingrb_test strrb/strrb_test \
|
2022-08-05 11:46:44 +00:00
|
|
|
comp128/comp128_test \
|
2016-03-14 20:04:50 +00:00
|
|
|
bitvec/bitvec_test msgb/msgb_test bits/bitcomp_test \
|
2017-10-18 11:14:49 +00:00
|
|
|
bits/bitfield_test \
|
gsup: Convert PDP-Type IE to PDP-Address IE
The previous PDP-Type IE should have been a PDP-Address from the
start, since having only PDP-Type with no address is only a specific
case (dynamic addressing).
This becomes clear by looking at other similar protocols like:
* MAP: APN-Configuration IE has servedPartyIP-IP{v4,v6}-Address IEs
* Diameter S6b, 3GPP TS 29.272 7.3.35 APN-Configuration contains
Served-Party-IP-Address AVPs
* Diameter SWx, 3GPP TS 29.273 APN-Configuration.
* GTPv1C Ts 29.060 7.7.29 PDP Context containing PDP Address.
Since PDP-Type on its own really makes no sense, being it a special case
of PDP-Address, let's keep the IE by renaming it (keeping old name too
for API backward compat) and extend it to support lengths > 2 bytes.
Old implementation of libosmogsm gsup actually ignored lengths > 2
bytes, so we are safe acting against older implementations here, both
on the sending and receiving side on the wire.
The big drawback of this commit is that it breaks ABI compatibility due
to adding "struct osmo_sockaddr pdp_address[2];" to struct
osmo_gsup_pdp_info, which in turn affects shift of fields in struct
osmo_gsup_message. Unfortunately, there's not much that can be done to
improve the situation when adding the missing field, due to existing API
having the same struct for all messages. Ideally we'd have 1 union with
structs per message type inside, this way the ABI break would be far
less pronounced.
The GSUP test output change is becaue we now accept some of the len>2
cases for PDP-Type/Address IE which were being rejected since a couple
commits ago.
libosmogsm gsup code is now disabled in EMBEDDED mode, since it nows
depends on core/socket.h (struct osmo_sockaddr) which is not available
in EMBEDDED, and hence fails during build:
"""
In file included from /build/include/osmocom/gsm/gsup.h:45,
from /build/src/gsm/gsup_sms.c:28:
/build/include/osmocom/core/socket.h:15:10: fatal error: arpa/inet.h: No such file or directory
15 | #include <arpa/inet.h>
| ^~~~~~~~~~~~~
"""
Related: OS#6091
Change-Id: I775ff9c3be165d9f30d6ab55d03f99b6104eadd6
2024-01-19 17:28:09 +00:00
|
|
|
tlv/tlv_test oap/oap_test \
|
2016-09-22 18:48:59 +00:00
|
|
|
write_queue/wqueue_test socket/socket_test \
|
2017-01-19 10:01:15 +00:00
|
|
|
coding/coding_test conv/conv_gsm0503_test \
|
2017-05-18 20:59:02 +00:00
|
|
|
abis/abis_test endian/endian_test sercomm/sercomm_test \
|
2018-01-18 15:05:27 +00:00
|
|
|
prbs/prbs_test gsm23003/gsm23003_test \
|
2020-05-11 17:43:20 +00:00
|
|
|
gsm23236/gsm23236_test \
|
2018-07-30 16:14:45 +00:00
|
|
|
codec/codec_ecu_fr_test timer/clk_override_test \
|
2018-12-10 09:57:59 +00:00
|
|
|
oap/oap_client_test gsm29205/gsm29205_test \
|
2018-09-10 15:18:28 +00:00
|
|
|
logging/logging_vty_test \
|
2019-01-31 08:06:53 +00:00
|
|
|
vty/vty_transcript_test \
|
2021-11-16 22:58:03 +00:00
|
|
|
tdef/tdef_test tdef/tdef_vty_config_root_test \
|
|
|
|
tdef/tdef_vty_config_subnode_test \
|
|
|
|
tdef/tdef_vty_dynamic_test \
|
2019-02-25 01:45:06 +00:00
|
|
|
sockaddr_str/sockaddr_str_test \
|
2019-02-11 19:32:25 +00:00
|
|
|
use_count/use_count_test \
|
2019-03-18 16:17:43 +00:00
|
|
|
context/context_test \
|
2019-10-09 11:38:38 +00:00
|
|
|
gsm0502/gsm0502_test \
|
2020-02-06 13:25:01 +00:00
|
|
|
dtx/dtx_gsm0503_test \
|
2020-05-14 09:42:53 +00:00
|
|
|
i460_mux/i460_mux_test \
|
bitXXgen: add bitgen_test.c
The autogenerated bitXXgen.h headers for osmo_load16le_ext() thru
osmo_store64_be() are not actually tested at all. Add a test.
The test output shows that the osmo_load*be_ext for a shorter len do not return
nicely matching results. A practical example showing the difficulty in storing
and loading 24bit integer values as/from big-endian:
uint8_t buf[4];
memset(buf, 0, sizeof(buf));
osmo_store32be_ext(0x00112233, buf, 3); // stores 11 22 33
printf("%s\n", osmo_hexdump(buf, 4));
uint32_t r = osmo_load32be_ext(buf, 3); // returns 0x11223300, not 0x00112233
printf("0x%x\n", r);
output is:
11 22 33 00
0x11223300
In contrast, the little-endian variant properly aligns the loaded bytes on the
least significant octet:
uint8_t buf[4];
memset(buf, 0, sizeof(buf));
osmo_store32le_ext(0x00112233, buf, 3); // stores 33 22 11
printf("%s\n", osmo_hexdump(buf, 4));
uint32_t r = osmo_load32le_ext(buf, 3); // returns 0x00112233 as expected
printf("0x%x\n", r);
output for le is:
33 22 11 00
0x112233
Change-Id: I5542ace54376a206aa8574812d4c742c86c293b4
2020-09-13 21:56:21 +00:00
|
|
|
bitgen/bitgen_test \
|
2020-09-18 16:00:50 +00:00
|
|
|
gad/gad_test \
|
2020-09-18 16:00:50 +00:00
|
|
|
bsslap/bsslap_test \
|
2020-09-18 16:00:50 +00:00
|
|
|
bssmap_le/bssmap_le_test \
|
2019-08-06 17:56:16 +00:00
|
|
|
it_q/it_q_test \
|
2021-11-13 22:19:33 +00:00
|
|
|
time_cc/time_cc_test \
|
2021-02-09 17:28:25 +00:00
|
|
|
gsm48/rest_octets_test \
|
2021-09-17 06:35:32 +00:00
|
|
|
base64/base64_test \
|
2018-11-29 12:47:39 +00:00
|
|
|
iuup/iuup_test \
|
2022-08-05 11:46:44 +00:00
|
|
|
smscb/smscb_test \
|
|
|
|
smscb/gsm0341_test \
|
2022-08-05 11:58:17 +00:00
|
|
|
smscb/cbsp_test \
|
2023-02-21 21:35:29 +00:00
|
|
|
auth/xor2g_test \
|
2023-09-04 10:41:49 +00:00
|
|
|
v110/frame_test \
|
|
|
|
v110/ra1_test \
|
isdn: initial implementation of the V.110 TA
ITU-T recommendation V.110 defines Terminal Adaptor (TA) functions
for the connection of Terminal Equipment (TE) having standard V-series
interfaces to the ISDN. This patch brings "software" implementation
of the TA to libosmoisdn.
The primary user for this soft-TA is the mobile-side implementation
of CSD (Circuit Switched Data) in osmocom-bb. CSD is heavily based
on V.110, which is not surprising given that GSM is a "wireless ISDN".
Nevertheless, this code will likely also be useful in the context
of retro-networking.
Similarly to the existing V.110 code in libosmoisdn, the present
implementation aims to be functional and correct, rather than
efficient in any way. It also has several limitations, which are
not critical for the CSD use case, but eventually may be a problem
for other use cases in the context of retro-networking.
Therefore, the V.110 TA API should be considered _unstable_,
and may be subject to change in the future.
+-------+ +------+ B-channel +------+ +-------+
| TE1 |------| TA |~~~~~~~~~~~~~~~| TA |------| TE2 |
+-------+ +------+ +------+ +-------+
TE (also known as DTE) is basically a computer, having a V-series
(usually RS-232) connection to TA (also known as DCE). The TA acts
like a regular analog modem, except that it is not performing any
kind of modulation or demodulation itself.
The TE-TA interface is implemented by the user supplied callback
functions, configured during the allocation of a TA instance:
* .rx_cb() - receive call-back of the application,
* .tx_cb() - transmit call-back of the application,
* .status_update_cb() - status line update call-back.
In addition to that, the application (TE) can interact with the
V.24 status lines (circuits) using the following API:
* osmo_v110_ta_{get,set}_status(),
* osmo_v110_ta_{get,set}_circuit().
The Rx and Tx between TE and TA is always driven by the TA itself,
as a result of an interaction with the lower layer implementing
the B-channel interface. There is currently no buffering and thus
no way for TE to initiate transmission or pull data on its own.
The TA-TA (B-channel) interface is implemented by the following
functions, which are meant to be called by the lower layer
transmitting and receiving V.110 frames over certain medium:
* osmo_v110_ta_frame_in() - indicate a received V.110 frame,
* osmo_v110_ta_frame_out() - pull a V.110 frame for transmission,
* osmo_v110_ta_[de]sync_ind() - indicate a synchronization event.
The lower layer is responsible for finding the synchronization
pattern (if needed), aligning to the frame boundaries, and doing
the V.110 frame coding.
The D-channel signalling is behind the scope of this module.
Initial (Work-in-Progress) implementation by Harald Welte,
completed and co-authored by Vadim Yanitskiy.
Change-Id: I5716bd6fd0201ee7a7a29e72f775972cd374082f
Related: OS#4396
2023-03-14 19:33:51 +00:00
|
|
|
v110/ta_test \
|
2023-09-04 10:41:49 +00:00
|
|
|
gsm44021/frame_csd_test \
|
2023-03-31 12:36:16 +00:00
|
|
|
osmo_io/osmo_io_test \
|
2023-11-14 13:46:01 +00:00
|
|
|
soft_uart/soft_uart_test \
|
2023-11-23 21:08:51 +00:00
|
|
|
rlp/rlp_test \
|
2018-09-10 15:18:28 +00:00
|
|
|
$(NULL)
|
2013-02-21 05:16:29 +00:00
|
|
|
|
2010-10-06 16:00:15 +00:00
|
|
|
if ENABLE_MSGFILE
|
2012-06-29 20:01:18 +00:00
|
|
|
check_PROGRAMS += msgfile/msgfile_test
|
2010-10-06 16:00:15 +00:00
|
|
|
endif
|
2011-11-13 00:02:54 +00:00
|
|
|
|
2016-11-15 16:31:14 +00:00
|
|
|
if ENABLE_PCSC
|
|
|
|
check_PROGRAMS += sim/sim_test
|
|
|
|
endif
|
|
|
|
|
2017-05-18 20:59:02 +00:00
|
|
|
if ENABLE_UTILITIES
|
|
|
|
check_PROGRAMS += utils/utils_test
|
|
|
|
endif
|
|
|
|
|
|
|
|
if ENABLE_VTY
|
|
|
|
check_PROGRAMS += vty/vty_test
|
|
|
|
endif
|
|
|
|
|
|
|
|
if ENABLE_CTRL
|
2019-03-23 22:38:43 +00:00
|
|
|
check_PROGRAMS += \
|
|
|
|
ctrl/ctrl_test \
|
|
|
|
fsm/fsm_test \
|
|
|
|
fsm/fsm_dealloc_test \
|
|
|
|
$(NULL)
|
2017-05-18 20:59:02 +00:00
|
|
|
endif
|
|
|
|
|
2019-12-16 22:14:45 +00:00
|
|
|
if !EMBEDDED
|
|
|
|
check_PROGRAMS += \
|
gsup: Convert PDP-Type IE to PDP-Address IE
The previous PDP-Type IE should have been a PDP-Address from the
start, since having only PDP-Type with no address is only a specific
case (dynamic addressing).
This becomes clear by looking at other similar protocols like:
* MAP: APN-Configuration IE has servedPartyIP-IP{v4,v6}-Address IEs
* Diameter S6b, 3GPP TS 29.272 7.3.35 APN-Configuration contains
Served-Party-IP-Address AVPs
* Diameter SWx, 3GPP TS 29.273 APN-Configuration.
* GTPv1C Ts 29.060 7.7.29 PDP Context containing PDP Address.
Since PDP-Type on its own really makes no sense, being it a special case
of PDP-Address, let's keep the IE by renaming it (keeping old name too
for API backward compat) and extend it to support lengths > 2 bytes.
Old implementation of libosmogsm gsup actually ignored lengths > 2
bytes, so we are safe acting against older implementations here, both
on the sending and receiving side on the wire.
The big drawback of this commit is that it breaks ABI compatibility due
to adding "struct osmo_sockaddr pdp_address[2];" to struct
osmo_gsup_pdp_info, which in turn affects shift of fields in struct
osmo_gsup_message. Unfortunately, there's not much that can be done to
improve the situation when adding the missing field, due to existing API
having the same struct for all messages. Ideally we'd have 1 union with
structs per message type inside, this way the ABI break would be far
less pronounced.
The GSUP test output change is becaue we now accept some of the len>2
cases for PDP-Type/Address IE which were being rejected since a couple
commits ago.
libosmogsm gsup code is now disabled in EMBEDDED mode, since it nows
depends on core/socket.h (struct osmo_sockaddr) which is not available
in EMBEDDED, and hence fails during build:
"""
In file included from /build/include/osmocom/gsm/gsup.h:45,
from /build/src/gsm/gsup_sms.c:28:
/build/include/osmocom/core/socket.h:15:10: fatal error: arpa/inet.h: No such file or directory
15 | #include <arpa/inet.h>
| ^~~~~~~~~~~~~
"""
Related: OS#6091
Change-Id: I775ff9c3be165d9f30d6ab55d03f99b6104eadd6
2024-01-19 17:28:09 +00:00
|
|
|
gsup/gsup_test \
|
2019-12-16 22:14:45 +00:00
|
|
|
stats/stats_test \
|
2021-11-09 00:35:44 +00:00
|
|
|
stats/stats_vty_test \
|
gsup: Convert PDP-Type IE to PDP-Address IE
The previous PDP-Type IE should have been a PDP-Address from the
start, since having only PDP-Type with no address is only a specific
case (dynamic addressing).
This becomes clear by looking at other similar protocols like:
* MAP: APN-Configuration IE has servedPartyIP-IP{v4,v6}-Address IEs
* Diameter S6b, 3GPP TS 29.272 7.3.35 APN-Configuration contains
Served-Party-IP-Address AVPs
* Diameter SWx, 3GPP TS 29.273 APN-Configuration.
* GTPv1C Ts 29.060 7.7.29 PDP Context containing PDP Address.
Since PDP-Type on its own really makes no sense, being it a special case
of PDP-Address, let's keep the IE by renaming it (keeping old name too
for API backward compat) and extend it to support lengths > 2 bytes.
Old implementation of libosmogsm gsup actually ignored lengths > 2
bytes, so we are safe acting against older implementations here, both
on the sending and receiving side on the wire.
The big drawback of this commit is that it breaks ABI compatibility due
to adding "struct osmo_sockaddr pdp_address[2];" to struct
osmo_gsup_pdp_info, which in turn affects shift of fields in struct
osmo_gsup_message. Unfortunately, there's not much that can be done to
improve the situation when adding the missing field, due to existing API
having the same struct for all messages. Ideally we'd have 1 union with
structs per message type inside, this way the ABI break would be far
less pronounced.
The GSUP test output change is becaue we now accept some of the len>2
cases for PDP-Type/Address IE which were being rejected since a couple
commits ago.
libosmogsm gsup code is now disabled in EMBEDDED mode, since it nows
depends on core/socket.h (struct osmo_sockaddr) which is not available
in EMBEDDED, and hence fails during build:
"""
In file included from /build/include/osmocom/gsm/gsup.h:45,
from /build/src/gsm/gsup_sms.c:28:
/build/include/osmocom/core/socket.h:15:10: fatal error: arpa/inet.h: No such file or directory
15 | #include <arpa/inet.h>
| ^~~~~~~~~~~~~
"""
Related: OS#6091
Change-Id: I775ff9c3be165d9f30d6ab55d03f99b6104eadd6
2024-01-19 17:28:09 +00:00
|
|
|
exec/exec_test \
|
|
|
|
$(NULL)
|
2018-01-18 15:05:27 +00:00
|
|
|
endif
|
|
|
|
|
2017-05-18 20:59:02 +00:00
|
|
|
if ENABLE_GB
|
2021-01-06 19:40:23 +00:00
|
|
|
check_PROGRAMS += gb/bssgp_fc_test gb/gprs_bssgp_test gb/gprs_bssgp_rim_test gb/gprs_ns_test gb/gprs_ns2_test fr/fr_test
|
2017-05-18 20:59:02 +00:00
|
|
|
endif
|
|
|
|
|
2021-09-17 06:35:32 +00:00
|
|
|
base64_base64_test_SOURCES = base64/base64_test.c
|
|
|
|
|
2014-01-02 12:55:00 +00:00
|
|
|
utils_utils_test_SOURCES = utils/utils_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
utils_utils_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2014-01-02 12:55:00 +00:00
|
|
|
|
2015-10-01 18:43:53 +00:00
|
|
|
stats_stats_test_SOURCES = stats/stats_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
stats_stats_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2023-01-18 16:04:04 +00:00
|
|
|
stats_stats_test_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/core
|
2015-10-01 18:43:53 +00:00
|
|
|
|
2021-11-09 00:35:44 +00:00
|
|
|
stats_stats_vty_test_SOURCES = stats/stats_vty_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
stats_stats_vty_test_LDADD = $(top_builddir)/src/vty/libosmovty.la $(LDADD)
|
2021-11-09 00:35:44 +00:00
|
|
|
|
2015-08-19 09:14:23 +00:00
|
|
|
a5_a5_test_SOURCES = a5/a5_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
a5_a5_test_LDADD = $(top_builddir)/src/gsm/libgsmint.la $(LDADD)
|
2012-06-29 20:01:18 +00:00
|
|
|
|
2015-08-19 09:14:23 +00:00
|
|
|
kasumi_kasumi_test_SOURCES = kasumi/kasumi_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
kasumi_kasumi_test_LDADD = $(top_builddir)/src/gsm/libgsmint.la $(LDADD)
|
2014-06-16 12:59:30 +00:00
|
|
|
|
2013-12-02 10:30:32 +00:00
|
|
|
comp128_comp128_test_SOURCES = comp128/comp128_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
comp128_comp128_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2013-12-02 10:30:32 +00:00
|
|
|
|
2012-06-29 20:01:18 +00:00
|
|
|
auth_milenage_test_SOURCES = auth/milenage_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
auth_milenage_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2012-06-29 20:01:18 +00:00
|
|
|
|
2023-05-28 07:36:50 +00:00
|
|
|
auth_tuak_test_SOURCES = auth/tuak_test.c
|
|
|
|
auth_tuak_test_LDADD = $(top_builddir)/src/gsm/libgsmint.la $(LDADD)
|
|
|
|
auth_tuak_test_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src
|
|
|
|
|
2023-02-21 21:35:29 +00:00
|
|
|
auth_xor2g_test_SOURCES = auth/xor2g_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
auth_xor2g_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2023-02-21 21:35:29 +00:00
|
|
|
|
2017-03-24 19:16:33 +00:00
|
|
|
abis_abis_test_SOURCES = abis/abis_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
abis_abis_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2017-03-24 19:16:33 +00:00
|
|
|
|
2017-02-24 12:59:14 +00:00
|
|
|
ctrl_ctrl_test_SOURCES = ctrl/ctrl_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
ctrl_ctrl_test_LDADD = \
|
fix tests linking: don't use system installed libs
Do not link against the system-wide installed libosmo* libs when building the
regression test programs. Always use the locally built ones.
Linking some libosmo libraries causes libtool to pull in other libosmo libs
even though they were not explicitly named. For example, ctrl_test explicitly
links libosmoctrl, but this also has dependencies to libosmovty and libosmogsm:
ldd src/ctrl/.libs/libosmoctrl.so | grep osmo
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f26c26d4000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f26c22bb000)
libosmovty.so.4 => /usr/local/lib/libosmovty.so.4 (0x00007f26c2171000)
If we omit explicit LDADD of these dependencies in the Makefile.am, libtool
will take the first canonical place to find them, which may just be the already
installed older versions of the same libs, which may or may not be compatible
with the current build. In any case, it is never intended to link installed
libs.
All library dependencies are listed by this quick script:
cd libosmocore
for l in $(find . -name "*.so") ; do echo; echo "$l"; ldd $l | grep libosmo; done
./.libs/libosmocore.so
./coding/.libs/libosmocoding.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f25fc3c2000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f25fbfa9000)
libosmocodec.so.0 => /usr/local/lib/libosmocodec.so.0 (0x00007f25fbf9b000)
./codec/.libs/libosmocodec.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007fb4c900d000)
./ctrl/.libs/libosmoctrl.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f5df5129000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f5df4d10000)
libosmovty.so.4 => /usr/local/lib/libosmovty.so.4 (0x00007f5df4bc6000)
./gb/.libs/libosmogb.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f788e536000)
libosmovty.so.4 => /usr/local/lib/libosmovty.so.4 (0x00007f788e3ec000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f788dfd3000)
./vty/.libs/libosmovty.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f3b7ed21000)
./gsm/.libs/libosmogsm.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007fc69472e000)
./sim/.libs/libosmosim.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f2f6412d000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f2f63d14000)
Add all explicit linking of all required library dependencies in all regression
test programs, as shown by above listing.
Example for reproducing a problem:
In libosmocore.a, introduce a new function, and call that from libosmovty code.
For example, I made loglevel_strs non-static in logging.c, and used that in
logging_vty.c. Build and install this in a place where libtool can find it.
Then go back to before this change and rebuild. You will see that linking
ctrl_test (before this patch) then complains about libosmovty requiring the
loglevel_strs symbol which it cannot find in libosmocore.so.
Change-Id: Id084e6e6efd25cd62b1bd7a4fc7c5985c39130c6
2018-01-17 12:07:16 +00:00
|
|
|
$(top_builddir)/src/ctrl/libosmoctrl.la \
|
|
|
|
$(top_builddir)/src/gsm/libosmogsm.la \
|
2023-03-14 13:20:18 +00:00
|
|
|
$(top_builddir)/src/vty/libosmovty.la \
|
|
|
|
$(LDADD)
|
2017-02-24 12:59:14 +00:00
|
|
|
|
2016-06-30 08:39:00 +00:00
|
|
|
gea_gea_test_SOURCES = gea/gea_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gea_gea_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2016-06-30 08:39:00 +00:00
|
|
|
|
2012-06-29 20:01:18 +00:00
|
|
|
bits_bitrev_test_SOURCES = bits/bitrev_test.c
|
|
|
|
|
2015-12-21 15:04:03 +00:00
|
|
|
bitvec_bitvec_test_SOURCES = bitvec/bitvec_test.c
|
|
|
|
|
2016-02-05 12:55:38 +00:00
|
|
|
bits_bitcomp_test_SOURCES = bits/bitcomp_test.c
|
|
|
|
|
2017-10-18 11:14:49 +00:00
|
|
|
bits_bitfield_test_SOURCES = bits/bitfield_test.c
|
|
|
|
|
2017-01-18 20:33:24 +00:00
|
|
|
conv_conv_test_SOURCES = conv/conv_test.c conv/conv.c
|
2023-03-14 13:20:18 +00:00
|
|
|
conv_conv_test_LDADD = $(top_builddir)/src/gsm/libgsmint.la $(LDADD)
|
2012-06-29 20:01:18 +00:00
|
|
|
|
2019-10-09 11:38:38 +00:00
|
|
|
gsm0502_gsm0502_test_SOURCES = gsm0502/gsm0502_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gsm0502_gsm0502_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2019-10-09 11:38:38 +00:00
|
|
|
|
2020-02-06 13:25:01 +00:00
|
|
|
dtx_dtx_gsm0503_test_SOURCES = dtx/dtx_gsm0503_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
dtx_dtx_gsm0503_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la \
|
|
|
|
$(top_builddir)/src/coding/libosmocoding.la \
|
|
|
|
$(LDADD)
|
2020-02-06 13:25:01 +00:00
|
|
|
|
2017-01-19 10:01:15 +00:00
|
|
|
conv_conv_gsm0503_test_SOURCES = conv/conv_gsm0503_test.c conv/conv.c conv/gsm0503_test_vectors.c
|
2023-03-14 13:20:18 +00:00
|
|
|
conv_conv_gsm0503_test_LDADD = $(top_builddir)/src/gsm/libgsmint.la $(LDADD)
|
2017-01-19 10:01:15 +00:00
|
|
|
conv_conv_gsm0503_test_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/conv
|
|
|
|
|
2012-06-29 20:01:18 +00:00
|
|
|
gsm0808_gsm0808_test_SOURCES = gsm0808/gsm0808_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gsm0808_gsm0808_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2012-06-29 20:01:18 +00:00
|
|
|
|
2018-12-10 09:57:59 +00:00
|
|
|
gsm29205_gsm29205_test_SOURCES = gsm29205/gsm29205_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gsm29205_gsm29205_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2018-12-10 09:57:59 +00:00
|
|
|
|
2012-08-24 19:27:26 +00:00
|
|
|
gsm0408_gsm0408_test_SOURCES = gsm0408/gsm0408_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gsm0408_gsm0408_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2012-08-24 19:27:26 +00:00
|
|
|
|
2021-02-09 17:28:25 +00:00
|
|
|
gsm48_rest_octets_test_SOURCES = gsm48/rest_octets_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gsm48_rest_octets_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2021-02-09 17:28:25 +00:00
|
|
|
|
2015-11-17 07:42:05 +00:00
|
|
|
gprs_gprs_test_SOURCES = gprs/gprs_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gprs_gprs_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2015-11-17 07:42:05 +00:00
|
|
|
|
2012-06-29 20:01:18 +00:00
|
|
|
lapd_lapd_test_SOURCES = lapd/lapd_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
lapd_lapd_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la \
|
|
|
|
$(top_builddir)/src/isdn/libosmoisdn.la \
|
|
|
|
$(LDADD)
|
2012-06-29 20:01:18 +00:00
|
|
|
|
2015-11-27 12:26:16 +00:00
|
|
|
msgb_msgb_test_SOURCES = msgb/msgb_test.c
|
|
|
|
|
2012-06-29 20:01:18 +00:00
|
|
|
msgfile_msgfile_test_SOURCES = msgfile/msgfile_test.c
|
|
|
|
|
|
|
|
smscb_smscb_test_SOURCES = smscb/smscb_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
smscb_smscb_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2012-06-29 20:01:18 +00:00
|
|
|
|
2014-12-29 16:09:11 +00:00
|
|
|
smscb_gsm0341_test_SOURCES = smscb/gsm0341_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
smscb_gsm0341_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2014-12-29 16:09:11 +00:00
|
|
|
|
2022-08-05 11:58:17 +00:00
|
|
|
smscb_cbsp_test_SOURCES = smscb/cbsp_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
smscb_cbsp_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2022-08-05 11:58:17 +00:00
|
|
|
|
2012-06-29 20:01:18 +00:00
|
|
|
sms_sms_test_SOURCES = sms/sms_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
sms_sms_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2012-06-29 20:01:18 +00:00
|
|
|
|
|
|
|
timer_timer_test_SOURCES = timer/timer_test.c
|
|
|
|
|
2018-02-26 18:42:22 +00:00
|
|
|
timer_clk_override_test_SOURCES = timer/clk_override_test.c
|
|
|
|
|
2012-06-29 20:01:18 +00:00
|
|
|
ussd_ussd_test_SOURCES = ussd/ussd_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
ussd_ussd_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2011-11-13 00:02:54 +00:00
|
|
|
|
2012-09-07 08:23:44 +00:00
|
|
|
gb_bssgp_fc_test_SOURCES = gb/bssgp_fc_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gb_bssgp_fc_test_LDADD = $(top_builddir)/src/gb/libosmogb.la \
|
fix tests linking: don't use system installed libs
Do not link against the system-wide installed libosmo* libs when building the
regression test programs. Always use the locally built ones.
Linking some libosmo libraries causes libtool to pull in other libosmo libs
even though they were not explicitly named. For example, ctrl_test explicitly
links libosmoctrl, but this also has dependencies to libosmovty and libosmogsm:
ldd src/ctrl/.libs/libosmoctrl.so | grep osmo
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f26c26d4000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f26c22bb000)
libosmovty.so.4 => /usr/local/lib/libosmovty.so.4 (0x00007f26c2171000)
If we omit explicit LDADD of these dependencies in the Makefile.am, libtool
will take the first canonical place to find them, which may just be the already
installed older versions of the same libs, which may or may not be compatible
with the current build. In any case, it is never intended to link installed
libs.
All library dependencies are listed by this quick script:
cd libosmocore
for l in $(find . -name "*.so") ; do echo; echo "$l"; ldd $l | grep libosmo; done
./.libs/libosmocore.so
./coding/.libs/libosmocoding.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f25fc3c2000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f25fbfa9000)
libosmocodec.so.0 => /usr/local/lib/libosmocodec.so.0 (0x00007f25fbf9b000)
./codec/.libs/libosmocodec.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007fb4c900d000)
./ctrl/.libs/libosmoctrl.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f5df5129000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f5df4d10000)
libosmovty.so.4 => /usr/local/lib/libosmovty.so.4 (0x00007f5df4bc6000)
./gb/.libs/libosmogb.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f788e536000)
libosmovty.so.4 => /usr/local/lib/libosmovty.so.4 (0x00007f788e3ec000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f788dfd3000)
./vty/.libs/libosmovty.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f3b7ed21000)
./gsm/.libs/libosmogsm.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007fc69472e000)
./sim/.libs/libosmosim.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f2f6412d000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f2f63d14000)
Add all explicit linking of all required library dependencies in all regression
test programs, as shown by above listing.
Example for reproducing a problem:
In libosmocore.a, introduce a new function, and call that from libosmovty code.
For example, I made loglevel_strs non-static in logging.c, and used that in
logging_vty.c. Build and install this in a place where libtool can find it.
Then go back to before this change and rebuild. You will see that linking
ctrl_test (before this patch) then complains about libosmovty requiring the
loglevel_strs symbol which it cannot find in libosmocore.so.
Change-Id: Id084e6e6efd25cd62b1bd7a4fc7c5985c39130c6
2018-01-17 12:07:16 +00:00
|
|
|
$(top_builddir)/src/vty/libosmovty.la \
|
2023-03-14 13:20:18 +00:00
|
|
|
$(top_builddir)/src/gsm/libosmogsm.la \
|
|
|
|
$(LDADD)
|
2012-09-07 08:23:44 +00:00
|
|
|
|
2014-10-14 12:49:37 +00:00
|
|
|
gb_gprs_bssgp_test_SOURCES = gb/gprs_bssgp_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gb_gprs_bssgp_test_LDADD = $(top_builddir)/src/vty/libosmovty.la \
|
2020-12-14 21:28:19 +00:00
|
|
|
$(top_builddir)/src/gsm/libosmogsm.la \
|
2023-03-14 13:09:43 +00:00
|
|
|
$(top_builddir)/src/gb/libosmogb.la \
|
2023-03-14 13:20:18 +00:00
|
|
|
$(LDADD) \
|
2023-03-14 13:09:43 +00:00
|
|
|
$(LIBRARY_DLSYM)
|
2014-10-14 12:49:37 +00:00
|
|
|
|
2021-01-06 19:40:23 +00:00
|
|
|
gb_gprs_bssgp_rim_test_SOURCES = gb/gprs_bssgp_rim_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gb_gprs_bssgp_rim_test_LDADD = $(top_builddir)/src/gb/libosmogb.la \
|
|
|
|
$(LDADD) \
|
2023-03-14 13:09:43 +00:00
|
|
|
$(LIBRARY_DLSYM)
|
2021-01-06 19:40:23 +00:00
|
|
|
|
2013-10-08 10:04:43 +00:00
|
|
|
gb_gprs_ns_test_SOURCES = gb/gprs_ns_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gb_gprs_ns_test_LDADD = $(top_builddir)/src/gb/libosmogb.la \
|
fix tests linking: don't use system installed libs
Do not link against the system-wide installed libosmo* libs when building the
regression test programs. Always use the locally built ones.
Linking some libosmo libraries causes libtool to pull in other libosmo libs
even though they were not explicitly named. For example, ctrl_test explicitly
links libosmoctrl, but this also has dependencies to libosmovty and libosmogsm:
ldd src/ctrl/.libs/libosmoctrl.so | grep osmo
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f26c26d4000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f26c22bb000)
libosmovty.so.4 => /usr/local/lib/libosmovty.so.4 (0x00007f26c2171000)
If we omit explicit LDADD of these dependencies in the Makefile.am, libtool
will take the first canonical place to find them, which may just be the already
installed older versions of the same libs, which may or may not be compatible
with the current build. In any case, it is never intended to link installed
libs.
All library dependencies are listed by this quick script:
cd libosmocore
for l in $(find . -name "*.so") ; do echo; echo "$l"; ldd $l | grep libosmo; done
./.libs/libosmocore.so
./coding/.libs/libosmocoding.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f25fc3c2000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f25fbfa9000)
libosmocodec.so.0 => /usr/local/lib/libosmocodec.so.0 (0x00007f25fbf9b000)
./codec/.libs/libosmocodec.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007fb4c900d000)
./ctrl/.libs/libosmoctrl.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f5df5129000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f5df4d10000)
libosmovty.so.4 => /usr/local/lib/libosmovty.so.4 (0x00007f5df4bc6000)
./gb/.libs/libosmogb.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f788e536000)
libosmovty.so.4 => /usr/local/lib/libosmovty.so.4 (0x00007f788e3ec000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f788dfd3000)
./vty/.libs/libosmovty.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f3b7ed21000)
./gsm/.libs/libosmogsm.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007fc69472e000)
./sim/.libs/libosmosim.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f2f6412d000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f2f63d14000)
Add all explicit linking of all required library dependencies in all regression
test programs, as shown by above listing.
Example for reproducing a problem:
In libosmocore.a, introduce a new function, and call that from libosmovty code.
For example, I made loglevel_strs non-static in logging.c, and used that in
logging_vty.c. Build and install this in a place where libtool can find it.
Then go back to before this change and rebuild. You will see that linking
ctrl_test (before this patch) then complains about libosmovty requiring the
loglevel_strs symbol which it cannot find in libosmocore.so.
Change-Id: Id084e6e6efd25cd62b1bd7a4fc7c5985c39130c6
2018-01-17 12:07:16 +00:00
|
|
|
$(top_builddir)/src/vty/libosmovty.la \
|
2023-03-14 13:09:43 +00:00
|
|
|
$(top_builddir)/src/gsm/libosmogsm.la \
|
2023-03-14 13:20:18 +00:00
|
|
|
$(LDADD) \
|
2023-03-14 13:09:43 +00:00
|
|
|
$(LIBRARY_DLSYM)
|
2013-10-08 10:04:43 +00:00
|
|
|
|
2020-12-17 05:58:53 +00:00
|
|
|
gb_gprs_ns2_test_SOURCES = gb/gprs_ns2_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gb_gprs_ns2_test_LDADD = $(top_builddir)/src/vty/libosmovty.la \
|
2020-12-17 05:58:53 +00:00
|
|
|
$(top_builddir)/src/gsm/libosmogsm.la \
|
2023-01-18 16:04:04 +00:00
|
|
|
$(top_builddir)/src/core/libosmocore.la \
|
2023-03-14 13:09:43 +00:00
|
|
|
$(top_builddir)/src/gb/libosmogb-test.la \
|
2023-03-14 13:20:18 +00:00
|
|
|
$(LDADD) \
|
2023-03-14 13:09:43 +00:00
|
|
|
$(LIBRARY_DLSYM)
|
2020-12-17 05:58:53 +00:00
|
|
|
|
2012-09-27 12:18:37 +00:00
|
|
|
logging_logging_test_SOURCES = logging/logging_test.c
|
|
|
|
|
2018-09-10 15:18:28 +00:00
|
|
|
logging_logging_vty_test_SOURCES = logging/logging_vty_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
logging_logging_vty_test_LDADD = $(top_builddir)/src/vty/libosmovty.la $(LDADD)
|
2018-09-10 15:18:28 +00:00
|
|
|
|
2024-04-22 02:25:10 +00:00
|
|
|
logging_logging_gsmtap_test_SOURCES = logging/logging_gsmtap_test.c
|
2023-11-03 20:19:03 +00:00
|
|
|
|
2019-01-31 08:06:53 +00:00
|
|
|
vty_vty_transcript_test_SOURCES = vty/vty_transcript_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
vty_vty_transcript_test_LDADD = $(top_builddir)/src/vty/libosmovty.la $(LDADD)
|
2019-01-31 08:06:53 +00:00
|
|
|
|
2012-11-11 13:21:26 +00:00
|
|
|
fr_fr_test_SOURCES = fr/fr_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
fr_fr_test_LDADD = $(top_builddir)/src/gb/libosmogb.la \
|
fix tests linking: don't use system installed libs
Do not link against the system-wide installed libosmo* libs when building the
regression test programs. Always use the locally built ones.
Linking some libosmo libraries causes libtool to pull in other libosmo libs
even though they were not explicitly named. For example, ctrl_test explicitly
links libosmoctrl, but this also has dependencies to libosmovty and libosmogsm:
ldd src/ctrl/.libs/libosmoctrl.so | grep osmo
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f26c26d4000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f26c22bb000)
libosmovty.so.4 => /usr/local/lib/libosmovty.so.4 (0x00007f26c2171000)
If we omit explicit LDADD of these dependencies in the Makefile.am, libtool
will take the first canonical place to find them, which may just be the already
installed older versions of the same libs, which may or may not be compatible
with the current build. In any case, it is never intended to link installed
libs.
All library dependencies are listed by this quick script:
cd libosmocore
for l in $(find . -name "*.so") ; do echo; echo "$l"; ldd $l | grep libosmo; done
./.libs/libosmocore.so
./coding/.libs/libosmocoding.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f25fc3c2000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f25fbfa9000)
libosmocodec.so.0 => /usr/local/lib/libosmocodec.so.0 (0x00007f25fbf9b000)
./codec/.libs/libosmocodec.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007fb4c900d000)
./ctrl/.libs/libosmoctrl.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f5df5129000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f5df4d10000)
libosmovty.so.4 => /usr/local/lib/libosmovty.so.4 (0x00007f5df4bc6000)
./gb/.libs/libosmogb.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f788e536000)
libosmovty.so.4 => /usr/local/lib/libosmovty.so.4 (0x00007f788e3ec000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f788dfd3000)
./vty/.libs/libosmovty.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f3b7ed21000)
./gsm/.libs/libosmogsm.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007fc69472e000)
./sim/.libs/libosmosim.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f2f6412d000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f2f63d14000)
Add all explicit linking of all required library dependencies in all regression
test programs, as shown by above listing.
Example for reproducing a problem:
In libosmocore.a, introduce a new function, and call that from libosmovty code.
For example, I made loglevel_strs non-static in logging.c, and used that in
logging_vty.c. Build and install this in a place where libtool can find it.
Then go back to before this change and rebuild. You will see that linking
ctrl_test (before this patch) then complains about libosmovty requiring the
loglevel_strs symbol which it cannot find in libosmocore.so.
Change-Id: Id084e6e6efd25cd62b1bd7a4fc7c5985c39130c6
2018-01-17 12:07:16 +00:00
|
|
|
$(top_builddir)/src/vty/libosmovty.la \
|
2023-03-14 13:09:43 +00:00
|
|
|
$(top_builddir)/src/gsm/libosmogsm.la \
|
2023-03-14 13:20:18 +00:00
|
|
|
$(LDADD) \
|
2023-03-14 13:09:43 +00:00
|
|
|
$(LIBRARY_DLSYM)
|
2012-11-11 13:21:26 +00:00
|
|
|
|
2016-05-25 16:13:51 +00:00
|
|
|
codec_codec_test_SOURCES = codec/codec_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
codec_codec_test_LDADD = $(top_builddir)/src/codec/libosmocodec.la $(LDADD)
|
2016-05-25 16:13:51 +00:00
|
|
|
|
2017-12-15 20:42:15 +00:00
|
|
|
codec_codec_ecu_fr_test_SOURCES = codec/codec_ecu_fr_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
codec_codec_ecu_fr_test_LDADD = $(top_builddir)/src/codec/libosmocodec.la $(LDADD)
|
2017-12-15 20:42:15 +00:00
|
|
|
|
2015-03-30 12:22:14 +00:00
|
|
|
loggingrb_loggingrb_test_SOURCES = loggingrb/loggingrb_test.c
|
2017-12-01 18:39:23 +00:00
|
|
|
loggingrb_loggingrb_test_LDADD = $(LDADD)
|
2013-02-21 05:16:29 +00:00
|
|
|
|
|
|
|
strrb_strrb_test_SOURCES = strrb/strrb_test.c
|
|
|
|
|
2013-08-06 12:29:14 +00:00
|
|
|
vty_vty_test_SOURCES = vty/vty_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
vty_vty_test_LDADD = $(top_builddir)/src/vty/libosmovty.la $(LDADD)
|
2013-08-06 12:29:14 +00:00
|
|
|
|
2016-03-14 20:04:50 +00:00
|
|
|
sim_sim_test_SOURCES = sim/sim_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
sim_sim_test_LDADD = $(top_builddir)/src/sim/libosmosim.la \
|
|
|
|
$(top_builddir)/src/gsm/libosmogsm.la \
|
|
|
|
$(LDADD)
|
2012-11-11 13:21:26 +00:00
|
|
|
|
2016-04-25 13:19:35 +00:00
|
|
|
tlv_tlv_test_SOURCES = tlv/tlv_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
tlv_tlv_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2016-04-25 13:19:35 +00:00
|
|
|
|
2016-04-25 16:46:22 +00:00
|
|
|
gsup_gsup_test_SOURCES = gsup/gsup_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gsup_gsup_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2016-04-25 16:46:22 +00:00
|
|
|
|
2016-12-08 16:50:03 +00:00
|
|
|
oap_oap_test_SOURCES = oap/oap_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
oap_oap_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2016-12-08 16:50:03 +00:00
|
|
|
|
2018-07-30 16:14:45 +00:00
|
|
|
oap_oap_client_test_SOURCES = oap/oap_client_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
oap_oap_client_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2018-07-30 16:14:45 +00:00
|
|
|
|
2016-05-29 01:53:17 +00:00
|
|
|
fsm_fsm_test_SOURCES = fsm/fsm_test.c
|
fix tests linking: don't use system installed libs
Do not link against the system-wide installed libosmo* libs when building the
regression test programs. Always use the locally built ones.
Linking some libosmo libraries causes libtool to pull in other libosmo libs
even though they were not explicitly named. For example, ctrl_test explicitly
links libosmoctrl, but this also has dependencies to libosmovty and libosmogsm:
ldd src/ctrl/.libs/libosmoctrl.so | grep osmo
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f26c26d4000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f26c22bb000)
libosmovty.so.4 => /usr/local/lib/libosmovty.so.4 (0x00007f26c2171000)
If we omit explicit LDADD of these dependencies in the Makefile.am, libtool
will take the first canonical place to find them, which may just be the already
installed older versions of the same libs, which may or may not be compatible
with the current build. In any case, it is never intended to link installed
libs.
All library dependencies are listed by this quick script:
cd libosmocore
for l in $(find . -name "*.so") ; do echo; echo "$l"; ldd $l | grep libosmo; done
./.libs/libosmocore.so
./coding/.libs/libosmocoding.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f25fc3c2000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f25fbfa9000)
libosmocodec.so.0 => /usr/local/lib/libosmocodec.so.0 (0x00007f25fbf9b000)
./codec/.libs/libosmocodec.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007fb4c900d000)
./ctrl/.libs/libosmoctrl.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f5df5129000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f5df4d10000)
libosmovty.so.4 => /usr/local/lib/libosmovty.so.4 (0x00007f5df4bc6000)
./gb/.libs/libosmogb.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f788e536000)
libosmovty.so.4 => /usr/local/lib/libosmovty.so.4 (0x00007f788e3ec000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f788dfd3000)
./vty/.libs/libosmovty.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f3b7ed21000)
./gsm/.libs/libosmogsm.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007fc69472e000)
./sim/.libs/libosmosim.so
libosmocore.so.11 => /usr/local/lib/libosmocore.so.11 (0x00007f2f6412d000)
libosmogsm.so.10 => /usr/local/lib/libosmogsm.so.10 (0x00007f2f63d14000)
Add all explicit linking of all required library dependencies in all regression
test programs, as shown by above listing.
Example for reproducing a problem:
In libosmocore.a, introduce a new function, and call that from libosmovty code.
For example, I made loglevel_strs non-static in logging.c, and used that in
logging_vty.c. Build and install this in a place where libtool can find it.
Then go back to before this change and rebuild. You will see that linking
ctrl_test (before this patch) then complains about libosmovty requiring the
loglevel_strs symbol which it cannot find in libosmocore.so.
Change-Id: Id084e6e6efd25cd62b1bd7a4fc7c5985c39130c6
2018-01-17 12:07:16 +00:00
|
|
|
fsm_fsm_test_LDADD = \
|
|
|
|
$(top_builddir)/src/ctrl/libosmoctrl.la \
|
|
|
|
$(top_builddir)/src/gsm/libosmogsm.la \
|
2023-03-14 13:20:18 +00:00
|
|
|
$(top_builddir)/src/vty/libosmovty.la \
|
|
|
|
$(LDADD)
|
2016-05-29 01:53:17 +00:00
|
|
|
|
2019-03-23 22:38:43 +00:00
|
|
|
fsm_fsm_dealloc_test_SOURCES = fsm/fsm_dealloc_test.c
|
|
|
|
fsm_fsm_dealloc_test_LDADD = $(LDADD)
|
|
|
|
|
2016-11-12 20:25:21 +00:00
|
|
|
write_queue_wqueue_test_SOURCES = write_queue/wqueue_test.c
|
|
|
|
|
2017-01-27 09:29:49 +00:00
|
|
|
socket_socket_test_SOURCES = socket/socket_test.c
|
|
|
|
|
2016-09-22 18:48:59 +00:00
|
|
|
coding_coding_test_SOURCES = coding/coding_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
coding_coding_test_LDADD = \
|
2016-09-22 18:48:59 +00:00
|
|
|
$(top_builddir)/src/gsm/libosmogsm.la \
|
|
|
|
$(top_builddir)/src/codec/libosmocodec.la \
|
2023-03-14 13:20:18 +00:00
|
|
|
$(top_builddir)/src/coding/libosmocoding.la \
|
|
|
|
$(LDADD)
|
2016-09-22 18:48:59 +00:00
|
|
|
|
2017-05-15 10:07:51 +00:00
|
|
|
endian_endian_test_SOURCES = endian/endian_test.c
|
|
|
|
|
2017-05-15 14:39:56 +00:00
|
|
|
sercomm_sercomm_test_SOURCES = sercomm/sercomm_test.c
|
|
|
|
|
2017-06-18 15:16:02 +00:00
|
|
|
prbs_prbs_test_SOURCES = prbs/prbs_test.c
|
|
|
|
|
2017-10-04 01:15:47 +00:00
|
|
|
gsm23003_gsm23003_test_SOURCES = gsm23003/gsm23003_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gsm23003_gsm23003_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2017-10-04 01:15:47 +00:00
|
|
|
|
2020-05-11 17:43:20 +00:00
|
|
|
gsm23236_gsm23236_test_SOURCES = gsm23236/gsm23236_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gsm23236_gsm23236_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2020-05-11 17:43:20 +00:00
|
|
|
|
add osmo_tdef API, originally adopted from osmo-bsc T_def
Move T_def from osmo-bsc to libosmocore as osmo_tdef. Adjust naming to be more
consistent. Upgrade to first class API:
- add timer grouping
- add generic vty support
- add mising API doc
- add C test
- add VTY transcript tests, also as examples for using the API
From osmo_fsm_inst_state_chg() API doc, cross reference to osmo_tdef API.
The root reason for moving to libosmocore is that I want to use the
mgw_endpoint_fsm in osmo-msc for inter-MSC handover, and hence want to move the
FSM to libosmo-mgcp-client. This FSM uses the T_def from osmo-bsc. Though the
mgw_endpoint_fsm's use of T_def is minimal, I intend to use the osmo_tdef API
in osmo-msc (and probably elsewhere) as well. libosmocore is the most sensible
place for this.
osmo_tdef provides:
- a list of Tnnnn (GSM) timers with description, unit and default value.
- vty UI to allow users to configure non-default timeouts.
- API to tie T timers to osmo_fsm states and set them on state transitions.
- a few standard units (minute, second, millisecond) as well as a custom unit
(which relies on the timer's human readable description to indicate the
meaning of the value).
- conversion for standard units: for example, some GSM timers are defined in
minutes, while our FSM definitions need timeouts in seconds. Conversion is
for convenience only and can be easily avoided via the custom unit.
By keeping separate osmo_tdef arrays, several groups of timers can be kept
separately. The VTY tests in tests/tdef/ showcase different schemes:
- tests/vty/tdef_vty_test_config_root.c:
Keep several timer definitions in separately named groups: showcase the
osmo_tdef_vty_groups*() API. Each timer group exists exactly once.
- tests/vty/tdef_vty_test_config_subnode.c:
Keep a single list of timers without separate grouping.
Put this list on a specific subnode below the CONFIG_NODE.
There could be several separate subnodes with timers like this, i.e.
continuing from this example, sets timers could be separated by placing
timers in specific config subnodes instead of using the global group name.
- tests/vty/tdef_vty_test_dynamic.c:
Dynamically allocate timer definitions per each new created object.
Thus there can be an arbitrary number of independent timer definitions, one
per allocated object.
T_def was introduced during the recent osmo-bsc refactoring for inter-BSC
handover, and has proven useful:
- without osmo_tdef, each invocation of osmo_fsm_inst_state_chg() needs to be
programmed with the right timeout value, for all code paths that invoke this
state change. It is a likely source of errors to get one of them wrong. By
defining a T timer exactly for an FSM state, the caller can merely invoke the
state change and trust on the original state definition to apply the correct
timeout.
- it is helpful to have a standardized config file UI to provide user
configurable timeouts, instead of inventing new VTY commands for each
separate application of T timer numbers.
Change-Id: Ibd6b1ed7f1bd6e1f2e0fde53352055a4468f23e5
2019-01-26 19:36:12 +00:00
|
|
|
tdef_tdef_test_SOURCES = tdef/tdef_test.c
|
|
|
|
tdef_tdef_test_LDADD = $(LDADD)
|
|
|
|
|
2021-11-16 22:58:03 +00:00
|
|
|
tdef_tdef_vty_config_root_test_SOURCES = tdef/tdef_vty_config_root_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
tdef_tdef_vty_config_root_test_LDADD = $(top_builddir)/src/vty/libosmovty.la $(LDADD)
|
add osmo_tdef API, originally adopted from osmo-bsc T_def
Move T_def from osmo-bsc to libosmocore as osmo_tdef. Adjust naming to be more
consistent. Upgrade to first class API:
- add timer grouping
- add generic vty support
- add mising API doc
- add C test
- add VTY transcript tests, also as examples for using the API
From osmo_fsm_inst_state_chg() API doc, cross reference to osmo_tdef API.
The root reason for moving to libosmocore is that I want to use the
mgw_endpoint_fsm in osmo-msc for inter-MSC handover, and hence want to move the
FSM to libosmo-mgcp-client. This FSM uses the T_def from osmo-bsc. Though the
mgw_endpoint_fsm's use of T_def is minimal, I intend to use the osmo_tdef API
in osmo-msc (and probably elsewhere) as well. libosmocore is the most sensible
place for this.
osmo_tdef provides:
- a list of Tnnnn (GSM) timers with description, unit and default value.
- vty UI to allow users to configure non-default timeouts.
- API to tie T timers to osmo_fsm states and set them on state transitions.
- a few standard units (minute, second, millisecond) as well as a custom unit
(which relies on the timer's human readable description to indicate the
meaning of the value).
- conversion for standard units: for example, some GSM timers are defined in
minutes, while our FSM definitions need timeouts in seconds. Conversion is
for convenience only and can be easily avoided via the custom unit.
By keeping separate osmo_tdef arrays, several groups of timers can be kept
separately. The VTY tests in tests/tdef/ showcase different schemes:
- tests/vty/tdef_vty_test_config_root.c:
Keep several timer definitions in separately named groups: showcase the
osmo_tdef_vty_groups*() API. Each timer group exists exactly once.
- tests/vty/tdef_vty_test_config_subnode.c:
Keep a single list of timers without separate grouping.
Put this list on a specific subnode below the CONFIG_NODE.
There could be several separate subnodes with timers like this, i.e.
continuing from this example, sets timers could be separated by placing
timers in specific config subnodes instead of using the global group name.
- tests/vty/tdef_vty_test_dynamic.c:
Dynamically allocate timer definitions per each new created object.
Thus there can be an arbitrary number of independent timer definitions, one
per allocated object.
T_def was introduced during the recent osmo-bsc refactoring for inter-BSC
handover, and has proven useful:
- without osmo_tdef, each invocation of osmo_fsm_inst_state_chg() needs to be
programmed with the right timeout value, for all code paths that invoke this
state change. It is a likely source of errors to get one of them wrong. By
defining a T timer exactly for an FSM state, the caller can merely invoke the
state change and trust on the original state definition to apply the correct
timeout.
- it is helpful to have a standardized config file UI to provide user
configurable timeouts, instead of inventing new VTY commands for each
separate application of T timer numbers.
Change-Id: Ibd6b1ed7f1bd6e1f2e0fde53352055a4468f23e5
2019-01-26 19:36:12 +00:00
|
|
|
|
2021-11-16 22:58:03 +00:00
|
|
|
tdef_tdef_vty_config_subnode_test_SOURCES = tdef/tdef_vty_config_subnode_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
tdef_tdef_vty_config_subnode_test_LDADD = $(top_builddir)/src/vty/libosmovty.la $(LDADD)
|
add osmo_tdef API, originally adopted from osmo-bsc T_def
Move T_def from osmo-bsc to libosmocore as osmo_tdef. Adjust naming to be more
consistent. Upgrade to first class API:
- add timer grouping
- add generic vty support
- add mising API doc
- add C test
- add VTY transcript tests, also as examples for using the API
From osmo_fsm_inst_state_chg() API doc, cross reference to osmo_tdef API.
The root reason for moving to libosmocore is that I want to use the
mgw_endpoint_fsm in osmo-msc for inter-MSC handover, and hence want to move the
FSM to libosmo-mgcp-client. This FSM uses the T_def from osmo-bsc. Though the
mgw_endpoint_fsm's use of T_def is minimal, I intend to use the osmo_tdef API
in osmo-msc (and probably elsewhere) as well. libosmocore is the most sensible
place for this.
osmo_tdef provides:
- a list of Tnnnn (GSM) timers with description, unit and default value.
- vty UI to allow users to configure non-default timeouts.
- API to tie T timers to osmo_fsm states and set them on state transitions.
- a few standard units (minute, second, millisecond) as well as a custom unit
(which relies on the timer's human readable description to indicate the
meaning of the value).
- conversion for standard units: for example, some GSM timers are defined in
minutes, while our FSM definitions need timeouts in seconds. Conversion is
for convenience only and can be easily avoided via the custom unit.
By keeping separate osmo_tdef arrays, several groups of timers can be kept
separately. The VTY tests in tests/tdef/ showcase different schemes:
- tests/vty/tdef_vty_test_config_root.c:
Keep several timer definitions in separately named groups: showcase the
osmo_tdef_vty_groups*() API. Each timer group exists exactly once.
- tests/vty/tdef_vty_test_config_subnode.c:
Keep a single list of timers without separate grouping.
Put this list on a specific subnode below the CONFIG_NODE.
There could be several separate subnodes with timers like this, i.e.
continuing from this example, sets timers could be separated by placing
timers in specific config subnodes instead of using the global group name.
- tests/vty/tdef_vty_test_dynamic.c:
Dynamically allocate timer definitions per each new created object.
Thus there can be an arbitrary number of independent timer definitions, one
per allocated object.
T_def was introduced during the recent osmo-bsc refactoring for inter-BSC
handover, and has proven useful:
- without osmo_tdef, each invocation of osmo_fsm_inst_state_chg() needs to be
programmed with the right timeout value, for all code paths that invoke this
state change. It is a likely source of errors to get one of them wrong. By
defining a T timer exactly for an FSM state, the caller can merely invoke the
state change and trust on the original state definition to apply the correct
timeout.
- it is helpful to have a standardized config file UI to provide user
configurable timeouts, instead of inventing new VTY commands for each
separate application of T timer numbers.
Change-Id: Ibd6b1ed7f1bd6e1f2e0fde53352055a4468f23e5
2019-01-26 19:36:12 +00:00
|
|
|
|
2021-11-16 22:58:03 +00:00
|
|
|
tdef_tdef_vty_dynamic_test_SOURCES = tdef/tdef_vty_dynamic_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
tdef_tdef_vty_dynamic_test_LDADD = $(top_builddir)/src/vty/libosmovty.la $(LDADD)
|
add osmo_tdef API, originally adopted from osmo-bsc T_def
Move T_def from osmo-bsc to libosmocore as osmo_tdef. Adjust naming to be more
consistent. Upgrade to first class API:
- add timer grouping
- add generic vty support
- add mising API doc
- add C test
- add VTY transcript tests, also as examples for using the API
From osmo_fsm_inst_state_chg() API doc, cross reference to osmo_tdef API.
The root reason for moving to libosmocore is that I want to use the
mgw_endpoint_fsm in osmo-msc for inter-MSC handover, and hence want to move the
FSM to libosmo-mgcp-client. This FSM uses the T_def from osmo-bsc. Though the
mgw_endpoint_fsm's use of T_def is minimal, I intend to use the osmo_tdef API
in osmo-msc (and probably elsewhere) as well. libosmocore is the most sensible
place for this.
osmo_tdef provides:
- a list of Tnnnn (GSM) timers with description, unit and default value.
- vty UI to allow users to configure non-default timeouts.
- API to tie T timers to osmo_fsm states and set them on state transitions.
- a few standard units (minute, second, millisecond) as well as a custom unit
(which relies on the timer's human readable description to indicate the
meaning of the value).
- conversion for standard units: for example, some GSM timers are defined in
minutes, while our FSM definitions need timeouts in seconds. Conversion is
for convenience only and can be easily avoided via the custom unit.
By keeping separate osmo_tdef arrays, several groups of timers can be kept
separately. The VTY tests in tests/tdef/ showcase different schemes:
- tests/vty/tdef_vty_test_config_root.c:
Keep several timer definitions in separately named groups: showcase the
osmo_tdef_vty_groups*() API. Each timer group exists exactly once.
- tests/vty/tdef_vty_test_config_subnode.c:
Keep a single list of timers without separate grouping.
Put this list on a specific subnode below the CONFIG_NODE.
There could be several separate subnodes with timers like this, i.e.
continuing from this example, sets timers could be separated by placing
timers in specific config subnodes instead of using the global group name.
- tests/vty/tdef_vty_test_dynamic.c:
Dynamically allocate timer definitions per each new created object.
Thus there can be an arbitrary number of independent timer definitions, one
per allocated object.
T_def was introduced during the recent osmo-bsc refactoring for inter-BSC
handover, and has proven useful:
- without osmo_tdef, each invocation of osmo_fsm_inst_state_chg() needs to be
programmed with the right timeout value, for all code paths that invoke this
state change. It is a likely source of errors to get one of them wrong. By
defining a T timer exactly for an FSM state, the caller can merely invoke the
state change and trust on the original state definition to apply the correct
timeout.
- it is helpful to have a standardized config file UI to provide user
configurable timeouts, instead of inventing new VTY commands for each
separate application of T timer numbers.
Change-Id: Ibd6b1ed7f1bd6e1f2e0fde53352055a4468f23e5
2019-01-26 19:36:12 +00:00
|
|
|
|
2019-02-25 01:45:06 +00:00
|
|
|
sockaddr_str_sockaddr_str_test_SOURCES = sockaddr_str/sockaddr_str_test.c
|
|
|
|
sockaddr_str_sockaddr_str_test_LDADD = $(LDADD)
|
|
|
|
|
2019-02-11 19:32:25 +00:00
|
|
|
use_count_use_count_test_SOURCES = use_count/use_count_test.c
|
|
|
|
use_count_use_count_test_LDADD = $(LDADD)
|
|
|
|
|
2019-03-18 16:17:43 +00:00
|
|
|
context_context_test_SOURCES = context/context_test.c
|
|
|
|
context_context_test_LDADD = $(LDADD)
|
|
|
|
|
2019-12-16 22:14:45 +00:00
|
|
|
exec_exec_test_SOURCES = exec/exec_test.c
|
|
|
|
exec_exec_test_LDADD = $(LDADD)
|
|
|
|
|
2020-05-14 09:42:53 +00:00
|
|
|
i460_mux_i460_mux_test_SOURCES = i460_mux/i460_mux_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
i460_mux_i460_mux_test_LDADD = $(top_builddir)/src/isdn/libosmoisdn.la $(LDADD)
|
2020-05-14 09:42:53 +00:00
|
|
|
|
bitXXgen: add bitgen_test.c
The autogenerated bitXXgen.h headers for osmo_load16le_ext() thru
osmo_store64_be() are not actually tested at all. Add a test.
The test output shows that the osmo_load*be_ext for a shorter len do not return
nicely matching results. A practical example showing the difficulty in storing
and loading 24bit integer values as/from big-endian:
uint8_t buf[4];
memset(buf, 0, sizeof(buf));
osmo_store32be_ext(0x00112233, buf, 3); // stores 11 22 33
printf("%s\n", osmo_hexdump(buf, 4));
uint32_t r = osmo_load32be_ext(buf, 3); // returns 0x11223300, not 0x00112233
printf("0x%x\n", r);
output is:
11 22 33 00
0x11223300
In contrast, the little-endian variant properly aligns the loaded bytes on the
least significant octet:
uint8_t buf[4];
memset(buf, 0, sizeof(buf));
osmo_store32le_ext(0x00112233, buf, 3); // stores 33 22 11
printf("%s\n", osmo_hexdump(buf, 4));
uint32_t r = osmo_load32le_ext(buf, 3); // returns 0x00112233 as expected
printf("0x%x\n", r);
output for le is:
33 22 11 00
0x112233
Change-Id: I5542ace54376a206aa8574812d4c742c86c293b4
2020-09-13 21:56:21 +00:00
|
|
|
bitgen_bitgen_test_SOURCES = bitgen/bitgen_test.c
|
|
|
|
bitgen_bitgen_test_LDADD = $(LDADD)
|
|
|
|
|
2020-09-18 16:00:50 +00:00
|
|
|
gad_gad_test_SOURCES = gad/gad_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
gad_gad_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2020-09-18 16:00:50 +00:00
|
|
|
|
2020-09-18 16:00:50 +00:00
|
|
|
bsslap_bsslap_test_SOURCES = bsslap/bsslap_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
bsslap_bsslap_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2020-09-18 16:00:50 +00:00
|
|
|
|
2020-09-18 16:00:50 +00:00
|
|
|
bssmap_le_bssmap_le_test_SOURCES = bssmap_le/bssmap_le_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
bssmap_le_bssmap_le_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2020-09-18 16:00:50 +00:00
|
|
|
|
2019-08-06 17:56:16 +00:00
|
|
|
it_q_it_q_test_SOURCES = it_q/it_q_test.c
|
|
|
|
it_q_it_q_test_LDADD = $(LDADD)
|
|
|
|
|
2021-11-13 22:19:33 +00:00
|
|
|
time_cc_time_cc_test_SOURCES = time_cc/time_cc_test.c
|
|
|
|
time_cc_time_cc_test_LDADD = $(LDADD)
|
|
|
|
|
2018-11-29 12:47:39 +00:00
|
|
|
iuup_iuup_test_SOURCES = iuup/iuup_test.c
|
2023-03-14 13:20:18 +00:00
|
|
|
iuup_iuup_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
2018-11-29 12:47:39 +00:00
|
|
|
|
2023-09-04 10:41:49 +00:00
|
|
|
v110_frame_test_SOURCES = v110/frame_test.c
|
|
|
|
v110_frame_test_LDADD = $(top_builddir)/src/isdn/libosmoisdn.la $(LDADD)
|
2022-11-29 22:13:06 +00:00
|
|
|
|
2023-09-04 10:41:49 +00:00
|
|
|
v110_ra1_test_SOURCES = v110/ra1_test.c
|
|
|
|
v110_ra1_test_LDADD = $(top_builddir)/src/isdn/libosmoisdn.la $(LDADD)
|
2022-11-29 22:13:06 +00:00
|
|
|
|
isdn: initial implementation of the V.110 TA
ITU-T recommendation V.110 defines Terminal Adaptor (TA) functions
for the connection of Terminal Equipment (TE) having standard V-series
interfaces to the ISDN. This patch brings "software" implementation
of the TA to libosmoisdn.
The primary user for this soft-TA is the mobile-side implementation
of CSD (Circuit Switched Data) in osmocom-bb. CSD is heavily based
on V.110, which is not surprising given that GSM is a "wireless ISDN".
Nevertheless, this code will likely also be useful in the context
of retro-networking.
Similarly to the existing V.110 code in libosmoisdn, the present
implementation aims to be functional and correct, rather than
efficient in any way. It also has several limitations, which are
not critical for the CSD use case, but eventually may be a problem
for other use cases in the context of retro-networking.
Therefore, the V.110 TA API should be considered _unstable_,
and may be subject to change in the future.
+-------+ +------+ B-channel +------+ +-------+
| TE1 |------| TA |~~~~~~~~~~~~~~~| TA |------| TE2 |
+-------+ +------+ +------+ +-------+
TE (also known as DTE) is basically a computer, having a V-series
(usually RS-232) connection to TA (also known as DCE). The TA acts
like a regular analog modem, except that it is not performing any
kind of modulation or demodulation itself.
The TE-TA interface is implemented by the user supplied callback
functions, configured during the allocation of a TA instance:
* .rx_cb() - receive call-back of the application,
* .tx_cb() - transmit call-back of the application,
* .status_update_cb() - status line update call-back.
In addition to that, the application (TE) can interact with the
V.24 status lines (circuits) using the following API:
* osmo_v110_ta_{get,set}_status(),
* osmo_v110_ta_{get,set}_circuit().
The Rx and Tx between TE and TA is always driven by the TA itself,
as a result of an interaction with the lower layer implementing
the B-channel interface. There is currently no buffering and thus
no way for TE to initiate transmission or pull data on its own.
The TA-TA (B-channel) interface is implemented by the following
functions, which are meant to be called by the lower layer
transmitting and receiving V.110 frames over certain medium:
* osmo_v110_ta_frame_in() - indicate a received V.110 frame,
* osmo_v110_ta_frame_out() - pull a V.110 frame for transmission,
* osmo_v110_ta_[de]sync_ind() - indicate a synchronization event.
The lower layer is responsible for finding the synchronization
pattern (if needed), aligning to the frame boundaries, and doing
the V.110 frame coding.
The D-channel signalling is behind the scope of this module.
Initial (Work-in-Progress) implementation by Harald Welte,
completed and co-authored by Vadim Yanitskiy.
Change-Id: I5716bd6fd0201ee7a7a29e72f775972cd374082f
Related: OS#4396
2023-03-14 19:33:51 +00:00
|
|
|
v110_ta_test_SOURCES = v110/ta_test.c
|
|
|
|
v110_ta_test_LDADD = $(top_builddir)/src/isdn/libosmoisdn.la $(LDADD)
|
|
|
|
|
2023-09-04 10:41:49 +00:00
|
|
|
gsm44021_frame_csd_test_SOURCES = gsm44021/frame_csd_test.c
|
|
|
|
gsm44021_frame_csd_test_LDADD = $(top_builddir)/src/isdn/libosmoisdn.la \
|
2023-03-14 13:20:18 +00:00
|
|
|
$(top_builddir)/src/gsm/libosmogsm.la \
|
|
|
|
$(LDADD)
|
2022-11-29 22:16:52 +00:00
|
|
|
|
2023-03-31 12:36:16 +00:00
|
|
|
osmo_io_osmo_io_test_SOURCES = osmo_io/osmo_io_test.c
|
|
|
|
|
2023-11-14 13:46:01 +00:00
|
|
|
soft_uart_soft_uart_test_SOURCES = soft_uart/soft_uart_test.c
|
|
|
|
|
2023-11-23 21:08:51 +00:00
|
|
|
rlp_rlp_test_SOURCES = rlp/rlp_test.c
|
|
|
|
rlp_rlp_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(LDADD)
|
|
|
|
|
2022-11-29 22:16:52 +00:00
|
|
|
|
2011-11-13 00:02:54 +00:00
|
|
|
# The `:;' works around a Bash 3.2 bug when the output is not writeable.
|
|
|
|
$(srcdir)/package.m4: $(top_srcdir)/configure.ac
|
|
|
|
:;{ \
|
|
|
|
echo '# Signature of the current package.' && \
|
|
|
|
echo 'm4_define([AT_PACKAGE_NAME],' && \
|
|
|
|
echo ' [$(PACKAGE_NAME)])' && \
|
|
|
|
echo 'm4_define([AT_PACKAGE_TARNAME],' && \
|
|
|
|
echo ' [$(PACKAGE_TARNAME)])' && \
|
|
|
|
echo 'm4_define([AT_PACKAGE_VERSION],' && \
|
|
|
|
echo ' [$(PACKAGE_VERSION)])' && \
|
|
|
|
echo 'm4_define([AT_PACKAGE_STRING],' && \
|
|
|
|
echo ' [$(PACKAGE_STRING)])' && \
|
|
|
|
echo 'm4_define([AT_PACKAGE_BUGREPORT],' && \
|
|
|
|
echo ' [$(PACKAGE_BUGREPORT)])'; \
|
|
|
|
echo 'm4_define([AT_PACKAGE_URL],' && \
|
|
|
|
echo ' [$(PACKAGE_URL)])'; \
|
|
|
|
} >'$(srcdir)/package.m4'
|
2012-06-29 20:01:18 +00:00
|
|
|
|
|
|
|
EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) \
|
|
|
|
timer/timer_test.ok sms/sms_test.ok ussd/ussd_test.ok \
|
2022-08-05 11:46:44 +00:00
|
|
|
bits/bitrev_test.ok a5/a5_test.ok \
|
2017-02-24 12:59:14 +00:00
|
|
|
conv/conv_test.ok auth/milenage_test.ok ctrl/ctrl_test.ok \
|
2023-05-28 07:36:50 +00:00
|
|
|
auth/tuak_test.ok \
|
2023-02-21 21:35:29 +00:00
|
|
|
auth/xor2g_test.ok \
|
2022-07-02 22:41:02 +00:00
|
|
|
lapd/lapd_test.ok \
|
|
|
|
gsm0408/gsm0408_test.ok gsm0408/gsm0408_test.err \
|
2012-09-11 09:49:35 +00:00
|
|
|
gsm0808/gsm0808_test.ok gb/bssgp_fc_tests.err \
|
|
|
|
gb/bssgp_fc_tests.ok gb/bssgp_fc_tests.sh \
|
2023-12-28 22:28:38 +00:00
|
|
|
gb/gprs_bssgp_test.ok gea/gea_test.ok \
|
2021-01-06 19:40:23 +00:00
|
|
|
gb/gprs_bssgp_rim_test.ok \
|
2021-01-01 18:52:17 +00:00
|
|
|
gb/gprs_ns2_vty.vty gb/osmoappdesc.py gb/osmo-ns-dummy.cfg \
|
2023-12-28 22:28:38 +00:00
|
|
|
gb/gprs_ns_test.ok \
|
|
|
|
gb/gprs_ns_test.err \
|
2020-12-17 05:58:53 +00:00
|
|
|
gb/gprs_ns2_test.ok \
|
2023-12-28 22:28:38 +00:00
|
|
|
gb/gprs_ns2_test.err \
|
2017-12-15 20:42:15 +00:00
|
|
|
gprs/gprs_test.ok kasumi/kasumi_test.ok \
|
2012-09-27 12:18:37 +00:00
|
|
|
msgfile/msgfile_test.ok msgfile/msgconfig.cfg \
|
2022-01-29 14:38:04 +00:00
|
|
|
logging/logging_test.ok logging/logging_test.err \
|
2019-01-28 18:07:06 +00:00
|
|
|
logging/logging_vty_test.vty \
|
2024-04-22 02:25:10 +00:00
|
|
|
logging/logging_gsmtap_test.err \
|
2013-02-21 05:16:29 +00:00
|
|
|
fr/fr_test.ok loggingrb/logging_test.ok \
|
2013-08-06 12:29:14 +00:00
|
|
|
loggingrb/logging_test.err strrb/strrb_test.ok \
|
2017-12-15 20:42:15 +00:00
|
|
|
codec/codec_test.ok \
|
|
|
|
codec/codec_ecu_fr_test.ok \
|
2020-10-02 11:43:47 +00:00
|
|
|
vty/vty_test.ok vty/vty_test.err \
|
VTY: implicit node exit by de-indenting, not parent lookup
Note: This will break users' config files if they do not use consistent
indenting. (see below for a definition of "consistent".)
When reading VTY commands from a file, use indenting as means to implicitly
exit child nodes. Do not look for commands in the parent node implicitly.
The VTY so far implies 'exit' commands if a VTY line cannot be parsed on the
current node, but succeeds on the parent node. That is the mechanism by which
our VTY config files do not need 'exit' at the end of each child node.
We've hit problems with this in the following scenarios, which will show
improved user experience after this patch:
*) When both a parent and its child node have commands with identical names:
cs7 instace 0
point-code 1.2.3
sccp-address osmo-msc
point-code 0.0.1
If I put the parent's command below the child, it is still interpreted in the
context of the child node:
cs7 instace 0
sccp-address osmo-msc
point-code 0.0.1
point-code 1.2.3
Though the indenting lets me assume I am setting the cs7 instance's global PC
to 1.2.3, I'm actually overwriting osmo-msc's PC with 1.2.3 and discarding the
0.0.1.
*) When a software change moves a VTY command from a child to a parent. Say
'timezone' moved from 'bts' to 'network' level:
network
timezone 1 2
Say a user still has an old config file with 'timezone' on the child level:
network
bts 0
timezone 1 2
trx 0
The user would expect an error message that 'timezone' is invalid on the 'bts'
level. Instead, the VTY finds the parent node's 'timezone', steps out of 'bts'
to the 'network' level, and instead says that the 'trx' command does not exist.
Format:
Consistent means that two adjacent indenting lines have the exact
same indenting characters for the common length:
Weird mix if you ask me, but correct and consistent:
ROOT
<space>PARENT
<space><tab><space>CHILD
<space><tab><space><tab><tab>GRANDCHILD
<space><tab><space><tab><tab>GRANDCHILD2
<space>SIBLING
Inconsistent:
ROOT
<space>PARENT
<tab><space>CHILD
<space><space><tab>GRANDCHILD
<space><tab><tab>GRANDCHILD2
<tab>SIBLING
Also, when going back to a parent level, the exact same indenting must be used
as before in that node:
Incorrect:
ROOT
<tab>PARENT
<tab><tab><tab>CHILD
<tab><tab>SIBLING
As not really intended side effect, it is also permitted to indent the entire
file starting from the root level. We could guard against it but there's no
harm:
Correct and consistent:
<tab>ROOT
<tab><tab>PARENT
<tab><tab><tab><tab>CHILD
<tab><tab>SIBLING
Implementation:
Track parent nodes state: whenever a command enters a child node, push a parent
node onto an llist to remember the exact indentation characters used for that
level.
As soon as the first line on a child node is parsed, remember this new
indentation (which must have a longer strlen() than its parent level) to apply
to all remaining child siblings and grandchildren.
If the amount of spaces that indent a following VTY command are less than this
expected indentation, call vty_go_parent() until it matches up.
At any level, if the common length of indentation characters mismatch, abort
parsing in error.
Transitions to child node are spread across VTY implementations and are hard to
change. But transitions to the parent node are all handled by vty_go_parent().
By popping a parent from the list of parents in vty_go_parent(), we can also
detect that a command has changed the node without changing the parent, hence
it must have stepped into a child node, and we can push a parent frame.
The behavior on the interactive telnet VTY remains unchanged.
Change-Id: I24cbb3f6de111f2d31110c3c484c066f1153aac9
2017-09-07 01:08:06 +00:00
|
|
|
vty/fail_not_de-indented.cfg \
|
|
|
|
vty/fail_tabs_and_spaces.cfg \
|
|
|
|
vty/fail_too_much_indent.cfg \
|
2019-10-22 16:38:01 +00:00
|
|
|
vty/fail_cmd_ret_warning.cfg \
|
VTY: implicit node exit by de-indenting, not parent lookup
Note: This will break users' config files if they do not use consistent
indenting. (see below for a definition of "consistent".)
When reading VTY commands from a file, use indenting as means to implicitly
exit child nodes. Do not look for commands in the parent node implicitly.
The VTY so far implies 'exit' commands if a VTY line cannot be parsed on the
current node, but succeeds on the parent node. That is the mechanism by which
our VTY config files do not need 'exit' at the end of each child node.
We've hit problems with this in the following scenarios, which will show
improved user experience after this patch:
*) When both a parent and its child node have commands with identical names:
cs7 instace 0
point-code 1.2.3
sccp-address osmo-msc
point-code 0.0.1
If I put the parent's command below the child, it is still interpreted in the
context of the child node:
cs7 instace 0
sccp-address osmo-msc
point-code 0.0.1
point-code 1.2.3
Though the indenting lets me assume I am setting the cs7 instance's global PC
to 1.2.3, I'm actually overwriting osmo-msc's PC with 1.2.3 and discarding the
0.0.1.
*) When a software change moves a VTY command from a child to a parent. Say
'timezone' moved from 'bts' to 'network' level:
network
timezone 1 2
Say a user still has an old config file with 'timezone' on the child level:
network
bts 0
timezone 1 2
trx 0
The user would expect an error message that 'timezone' is invalid on the 'bts'
level. Instead, the VTY finds the parent node's 'timezone', steps out of 'bts'
to the 'network' level, and instead says that the 'trx' command does not exist.
Format:
Consistent means that two adjacent indenting lines have the exact
same indenting characters for the common length:
Weird mix if you ask me, but correct and consistent:
ROOT
<space>PARENT
<space><tab><space>CHILD
<space><tab><space><tab><tab>GRANDCHILD
<space><tab><space><tab><tab>GRANDCHILD2
<space>SIBLING
Inconsistent:
ROOT
<space>PARENT
<tab><space>CHILD
<space><space><tab>GRANDCHILD
<space><tab><tab>GRANDCHILD2
<tab>SIBLING
Also, when going back to a parent level, the exact same indenting must be used
as before in that node:
Incorrect:
ROOT
<tab>PARENT
<tab><tab><tab>CHILD
<tab><tab>SIBLING
As not really intended side effect, it is also permitted to indent the entire
file starting from the root level. We could guard against it but there's no
harm:
Correct and consistent:
<tab>ROOT
<tab><tab>PARENT
<tab><tab><tab><tab>CHILD
<tab><tab>SIBLING
Implementation:
Track parent nodes state: whenever a command enters a child node, push a parent
node onto an llist to remember the exact indentation characters used for that
level.
As soon as the first line on a child node is parsed, remember this new
indentation (which must have a longer strlen() than its parent level) to apply
to all remaining child siblings and grandchildren.
If the amount of spaces that indent a following VTY command are less than this
expected indentation, call vty_go_parent() until it matches up.
At any level, if the common length of indentation characters mismatch, abort
parsing in error.
Transitions to child node are spread across VTY implementations and are hard to
change. But transitions to the parent node are all handled by vty_go_parent().
By popping a parent from the list of parents in vty_go_parent(), we can also
detect that a command has changed the node without changing the parent, hence
it must have stepped into a child node, and we can push a parent frame.
The behavior on the interactive telnet VTY remains unchanged.
Change-Id: I24cbb3f6de111f2d31110c3c484c066f1153aac9
2017-09-07 01:08:06 +00:00
|
|
|
vty/ok.cfg \
|
2017-09-19 21:54:01 +00:00
|
|
|
vty/ok_empty_parent.cfg \
|
VTY: implicit node exit by de-indenting, not parent lookup
Note: This will break users' config files if they do not use consistent
indenting. (see below for a definition of "consistent".)
When reading VTY commands from a file, use indenting as means to implicitly
exit child nodes. Do not look for commands in the parent node implicitly.
The VTY so far implies 'exit' commands if a VTY line cannot be parsed on the
current node, but succeeds on the parent node. That is the mechanism by which
our VTY config files do not need 'exit' at the end of each child node.
We've hit problems with this in the following scenarios, which will show
improved user experience after this patch:
*) When both a parent and its child node have commands with identical names:
cs7 instace 0
point-code 1.2.3
sccp-address osmo-msc
point-code 0.0.1
If I put the parent's command below the child, it is still interpreted in the
context of the child node:
cs7 instace 0
sccp-address osmo-msc
point-code 0.0.1
point-code 1.2.3
Though the indenting lets me assume I am setting the cs7 instance's global PC
to 1.2.3, I'm actually overwriting osmo-msc's PC with 1.2.3 and discarding the
0.0.1.
*) When a software change moves a VTY command from a child to a parent. Say
'timezone' moved from 'bts' to 'network' level:
network
timezone 1 2
Say a user still has an old config file with 'timezone' on the child level:
network
bts 0
timezone 1 2
trx 0
The user would expect an error message that 'timezone' is invalid on the 'bts'
level. Instead, the VTY finds the parent node's 'timezone', steps out of 'bts'
to the 'network' level, and instead says that the 'trx' command does not exist.
Format:
Consistent means that two adjacent indenting lines have the exact
same indenting characters for the common length:
Weird mix if you ask me, but correct and consistent:
ROOT
<space>PARENT
<space><tab><space>CHILD
<space><tab><space><tab><tab>GRANDCHILD
<space><tab><space><tab><tab>GRANDCHILD2
<space>SIBLING
Inconsistent:
ROOT
<space>PARENT
<tab><space>CHILD
<space><space><tab>GRANDCHILD
<space><tab><tab>GRANDCHILD2
<tab>SIBLING
Also, when going back to a parent level, the exact same indenting must be used
as before in that node:
Incorrect:
ROOT
<tab>PARENT
<tab><tab><tab>CHILD
<tab><tab>SIBLING
As not really intended side effect, it is also permitted to indent the entire
file starting from the root level. We could guard against it but there's no
harm:
Correct and consistent:
<tab>ROOT
<tab><tab>PARENT
<tab><tab><tab><tab>CHILD
<tab><tab>SIBLING
Implementation:
Track parent nodes state: whenever a command enters a child node, push a parent
node onto an llist to remember the exact indentation characters used for that
level.
As soon as the first line on a child node is parsed, remember this new
indentation (which must have a longer strlen() than its parent level) to apply
to all remaining child siblings and grandchildren.
If the amount of spaces that indent a following VTY command are less than this
expected indentation, call vty_go_parent() until it matches up.
At any level, if the common length of indentation characters mismatch, abort
parsing in error.
Transitions to child node are spread across VTY implementations and are hard to
change. But transitions to the parent node are all handled by vty_go_parent().
By popping a parent from the list of parents in vty_go_parent(), we can also
detect that a command has changed the node without changing the parent, hence
it must have stepped into a child node, and we can push a parent frame.
The behavior on the interactive telnet VTY remains unchanged.
Change-Id: I24cbb3f6de111f2d31110c3c484c066f1153aac9
2017-09-07 01:08:06 +00:00
|
|
|
vty/ok_ignore_blank.cfg \
|
|
|
|
vty/ok_ignore_comment.cfg \
|
|
|
|
vty/ok_indented_root.cfg \
|
|
|
|
vty/ok_more_spaces.cfg \
|
|
|
|
vty/ok_tabs_and_spaces.cfg \
|
|
|
|
vty/ok_tabs.cfg \
|
2019-11-20 17:19:36 +00:00
|
|
|
vty/ok_deprecated_logging.cfg \
|
2017-10-18 11:14:49 +00:00
|
|
|
comp128/comp128_test.ok bits/bitfield_test.ok \
|
2021-03-17 14:29:55 +00:00
|
|
|
utils/utils_test.ok utils/utils_test.err \
|
|
|
|
stats/stats_test.ok stats/stats_test.err \
|
2021-11-09 00:35:44 +00:00
|
|
|
stats/stats_vty_test.vty \
|
2016-03-14 20:04:50 +00:00
|
|
|
bitvec/bitvec_test.ok msgb/msgb_test.ok bits/bitcomp_test.ok \
|
2017-03-24 19:16:33 +00:00
|
|
|
sim/sim_test.ok tlv/tlv_test.ok abis/abis_test.ok \
|
2017-02-21 19:17:35 +00:00
|
|
|
gsup/gsup_test.ok gsup/gsup_test.err \
|
2016-12-08 16:50:03 +00:00
|
|
|
oap/oap_test.ok fsm/fsm_test.ok fsm/fsm_test.err \
|
fsm: support graceful osmo_fsm_inst_term() cascades
Add global flag osmo_fsm_term_safely() -- if set to true, enable the following
behavior:
Detect osmo_fsm_inst_term() occuring within osmo_fsm_inst_term():
- collect deallocations until the outermost osmo_fsm_inst_term() is done.
- call osmo_fsm_inst_free() *after* dispatching the parent event.
If a struct osmo_fsm_inst enters osmo_fsm_inst_term() while another is already
within osmo_fsm_inst_term(), do not directly deallocate it, but talloc-reparent
it to a separate talloc context, to be deallocated with the outermost FSM inst.
The effect is that all osmo_fsm_inst freed within an osmo_fsm_inst_term()
cascade will stay allocated until all osmo_fsm_inst_term() are complete and all
of them will be deallocated at the same time.
Mark the deferred deallocation state as __thread in an attempt to make cascaded
deallocation handling threadsafe. Keep the enable/disable flag separate, so
that it is global and not per-thread.
The feature is showcased by fsm_dealloc_test.c: with this feature, all of those
wild deallocation scenarios succeed.
Make fsm_dealloc_test a normal regression test in testsuite.at.
Rationale:
It is difficult to gracefully handle deallocations of groups of FSM instances
that reference each other. As soon as one child dispatching a cleanup event
causes its parent to deallocate before fsm.c was ready for it, deallocation
will hit a use-after-free. Before this patch, by using parent_term events and
distinct "terminating" FSM states, parent/child FSMs can be taught to wait for
all children to deallocate before deallocating the parent. But as soon as a
non-child / non-parent FSM instance is involved, or actually any other
cleanup() action that triggers parent FSMs or parent talloc contexts to become
unused, it is near impossible to think of all possible deallocation events
ricocheting, and to avoid running into freeing FSM instances that were still in
the middle of osmo_fsm_inst_term(), or FSM instances to enter
osmo_fsm_inst_term() more than once. This patch makes deallocation of "all
possible" setups of complex cross referencing FSM instances easy to handle
correctly, without running into use-after-free or double free situations, and,
notably, without changing calling code.
Change-Id: I8eda67540a1cd444491beb7856b9fcd0a3143b18
2019-03-24 04:56:21 +00:00
|
|
|
fsm/fsm_dealloc_test.err \
|
2017-01-27 09:29:49 +00:00
|
|
|
write_queue/wqueue_test.ok socket/socket_test.ok \
|
2017-03-15 00:52:58 +00:00
|
|
|
socket/socket_test.err coding/coding_test.ok \
|
|
|
|
osmo-auc-gen/osmo-auc-gen_test.sh \
|
|
|
|
osmo-auc-gen/osmo-auc-gen_test.ok \
|
2017-01-19 10:01:15 +00:00
|
|
|
osmo-auc-gen/osmo-auc-gen_test.err \
|
2017-05-15 14:39:56 +00:00
|
|
|
conv/conv_gsm0503_test.ok endian/endian_test.ok \
|
2017-10-04 01:15:47 +00:00
|
|
|
sercomm/sercomm_test.ok prbs/prbs_test.ok \
|
2018-12-10 09:57:59 +00:00
|
|
|
gsm29205/gsm29205_test.ok gsm23003/gsm23003_test.ok \
|
2020-05-11 17:43:20 +00:00
|
|
|
gsm23236/gsm23236_test.ok \
|
2018-07-30 16:14:45 +00:00
|
|
|
timer/clk_override_test.ok \
|
2019-01-31 08:06:53 +00:00
|
|
|
oap/oap_client_test.ok oap/oap_client_test.err \
|
|
|
|
vty/vty_transcript_test.vty \
|
add osmo_tdef API, originally adopted from osmo-bsc T_def
Move T_def from osmo-bsc to libosmocore as osmo_tdef. Adjust naming to be more
consistent. Upgrade to first class API:
- add timer grouping
- add generic vty support
- add mising API doc
- add C test
- add VTY transcript tests, also as examples for using the API
From osmo_fsm_inst_state_chg() API doc, cross reference to osmo_tdef API.
The root reason for moving to libosmocore is that I want to use the
mgw_endpoint_fsm in osmo-msc for inter-MSC handover, and hence want to move the
FSM to libosmo-mgcp-client. This FSM uses the T_def from osmo-bsc. Though the
mgw_endpoint_fsm's use of T_def is minimal, I intend to use the osmo_tdef API
in osmo-msc (and probably elsewhere) as well. libosmocore is the most sensible
place for this.
osmo_tdef provides:
- a list of Tnnnn (GSM) timers with description, unit and default value.
- vty UI to allow users to configure non-default timeouts.
- API to tie T timers to osmo_fsm states and set them on state transitions.
- a few standard units (minute, second, millisecond) as well as a custom unit
(which relies on the timer's human readable description to indicate the
meaning of the value).
- conversion for standard units: for example, some GSM timers are defined in
minutes, while our FSM definitions need timeouts in seconds. Conversion is
for convenience only and can be easily avoided via the custom unit.
By keeping separate osmo_tdef arrays, several groups of timers can be kept
separately. The VTY tests in tests/tdef/ showcase different schemes:
- tests/vty/tdef_vty_test_config_root.c:
Keep several timer definitions in separately named groups: showcase the
osmo_tdef_vty_groups*() API. Each timer group exists exactly once.
- tests/vty/tdef_vty_test_config_subnode.c:
Keep a single list of timers without separate grouping.
Put this list on a specific subnode below the CONFIG_NODE.
There could be several separate subnodes with timers like this, i.e.
continuing from this example, sets timers could be separated by placing
timers in specific config subnodes instead of using the global group name.
- tests/vty/tdef_vty_test_dynamic.c:
Dynamically allocate timer definitions per each new created object.
Thus there can be an arbitrary number of independent timer definitions, one
per allocated object.
T_def was introduced during the recent osmo-bsc refactoring for inter-BSC
handover, and has proven useful:
- without osmo_tdef, each invocation of osmo_fsm_inst_state_chg() needs to be
programmed with the right timeout value, for all code paths that invoke this
state change. It is a likely source of errors to get one of them wrong. By
defining a T timer exactly for an FSM state, the caller can merely invoke the
state change and trust on the original state definition to apply the correct
timeout.
- it is helpful to have a standardized config file UI to provide user
configurable timeouts, instead of inventing new VTY commands for each
separate application of T timer numbers.
Change-Id: Ibd6b1ed7f1bd6e1f2e0fde53352055a4468f23e5
2019-01-26 19:36:12 +00:00
|
|
|
tdef/tdef_test.ok \
|
2023-12-30 16:39:09 +00:00
|
|
|
tdef/tdef_test.err \
|
2019-02-06 00:08:43 +00:00
|
|
|
tdef/tdef_test_range_64bit.ok \
|
2021-11-16 22:58:03 +00:00
|
|
|
tdef/tdef_vty_config_root_test.vty \
|
|
|
|
tdef/tdef_vty_config_subnode_test.vty \
|
|
|
|
tdef/tdef_vty_dynamic_test.vty \
|
2019-02-25 01:45:06 +00:00
|
|
|
sockaddr_str/sockaddr_str_test.ok \
|
2019-02-11 19:32:25 +00:00
|
|
|
use_count/use_count_test.ok use_count/use_count_test.err \
|
2019-03-18 16:17:43 +00:00
|
|
|
context/context_test.ok \
|
2019-10-09 11:38:38 +00:00
|
|
|
gsm0502/gsm0502_test.ok \
|
2020-02-06 13:25:01 +00:00
|
|
|
dtx/dtx_gsm0503_test.ok \
|
2019-12-16 22:14:45 +00:00
|
|
|
exec/exec_test.ok exec/exec_test.err \
|
2020-05-14 09:42:53 +00:00
|
|
|
i460_mux/i460_mux_test.ok \
|
bitXXgen: add bitgen_test.c
The autogenerated bitXXgen.h headers for osmo_load16le_ext() thru
osmo_store64_be() are not actually tested at all. Add a test.
The test output shows that the osmo_load*be_ext for a shorter len do not return
nicely matching results. A practical example showing the difficulty in storing
and loading 24bit integer values as/from big-endian:
uint8_t buf[4];
memset(buf, 0, sizeof(buf));
osmo_store32be_ext(0x00112233, buf, 3); // stores 11 22 33
printf("%s\n", osmo_hexdump(buf, 4));
uint32_t r = osmo_load32be_ext(buf, 3); // returns 0x11223300, not 0x00112233
printf("0x%x\n", r);
output is:
11 22 33 00
0x11223300
In contrast, the little-endian variant properly aligns the loaded bytes on the
least significant octet:
uint8_t buf[4];
memset(buf, 0, sizeof(buf));
osmo_store32le_ext(0x00112233, buf, 3); // stores 33 22 11
printf("%s\n", osmo_hexdump(buf, 4));
uint32_t r = osmo_load32le_ext(buf, 3); // returns 0x00112233 as expected
printf("0x%x\n", r);
output for le is:
33 22 11 00
0x112233
Change-Id: I5542ace54376a206aa8574812d4c742c86c293b4
2020-09-13 21:56:21 +00:00
|
|
|
bitgen/bitgen_test.ok \
|
2020-09-18 16:00:50 +00:00
|
|
|
gad/gad_test.ok \
|
2020-09-18 16:00:50 +00:00
|
|
|
bsslap/bsslap_test.ok \
|
2020-09-18 16:00:50 +00:00
|
|
|
bssmap_le/bssmap_le_test.ok \
|
2019-08-06 17:56:16 +00:00
|
|
|
it_q/it_q_test.ok \
|
2021-11-13 22:19:33 +00:00
|
|
|
time_cc/time_cc_test.ok \
|
2021-02-09 17:28:25 +00:00
|
|
|
gsm48/rest_octets_test.ok \
|
2021-09-17 06:35:32 +00:00
|
|
|
base64/base64_test.ok \
|
2018-11-29 12:47:39 +00:00
|
|
|
iuup/iuup_test.ok \
|
2023-12-28 22:28:38 +00:00
|
|
|
iuup/iuup_test.err \
|
2022-08-05 11:46:44 +00:00
|
|
|
smscb/smscb_test.ok \
|
|
|
|
smscb/gsm0341_test.ok \
|
2022-08-05 11:58:17 +00:00
|
|
|
smscb/cbsp_test.ok \
|
2023-09-04 10:41:49 +00:00
|
|
|
v110/frame_test.ok \
|
|
|
|
v110/ra1_test.ok \
|
isdn: initial implementation of the V.110 TA
ITU-T recommendation V.110 defines Terminal Adaptor (TA) functions
for the connection of Terminal Equipment (TE) having standard V-series
interfaces to the ISDN. This patch brings "software" implementation
of the TA to libosmoisdn.
The primary user for this soft-TA is the mobile-side implementation
of CSD (Circuit Switched Data) in osmocom-bb. CSD is heavily based
on V.110, which is not surprising given that GSM is a "wireless ISDN".
Nevertheless, this code will likely also be useful in the context
of retro-networking.
Similarly to the existing V.110 code in libosmoisdn, the present
implementation aims to be functional and correct, rather than
efficient in any way. It also has several limitations, which are
not critical for the CSD use case, but eventually may be a problem
for other use cases in the context of retro-networking.
Therefore, the V.110 TA API should be considered _unstable_,
and may be subject to change in the future.
+-------+ +------+ B-channel +------+ +-------+
| TE1 |------| TA |~~~~~~~~~~~~~~~| TA |------| TE2 |
+-------+ +------+ +------+ +-------+
TE (also known as DTE) is basically a computer, having a V-series
(usually RS-232) connection to TA (also known as DCE). The TA acts
like a regular analog modem, except that it is not performing any
kind of modulation or demodulation itself.
The TE-TA interface is implemented by the user supplied callback
functions, configured during the allocation of a TA instance:
* .rx_cb() - receive call-back of the application,
* .tx_cb() - transmit call-back of the application,
* .status_update_cb() - status line update call-back.
In addition to that, the application (TE) can interact with the
V.24 status lines (circuits) using the following API:
* osmo_v110_ta_{get,set}_status(),
* osmo_v110_ta_{get,set}_circuit().
The Rx and Tx between TE and TA is always driven by the TA itself,
as a result of an interaction with the lower layer implementing
the B-channel interface. There is currently no buffering and thus
no way for TE to initiate transmission or pull data on its own.
The TA-TA (B-channel) interface is implemented by the following
functions, which are meant to be called by the lower layer
transmitting and receiving V.110 frames over certain medium:
* osmo_v110_ta_frame_in() - indicate a received V.110 frame,
* osmo_v110_ta_frame_out() - pull a V.110 frame for transmission,
* osmo_v110_ta_[de]sync_ind() - indicate a synchronization event.
The lower layer is responsible for finding the synchronization
pattern (if needed), aligning to the frame boundaries, and doing
the V.110 frame coding.
The D-channel signalling is behind the scope of this module.
Initial (Work-in-Progress) implementation by Harald Welte,
completed and co-authored by Vadim Yanitskiy.
Change-Id: I5716bd6fd0201ee7a7a29e72f775972cd374082f
Related: OS#4396
2023-03-14 19:33:51 +00:00
|
|
|
v110/ta_test.err \
|
2023-09-04 10:41:49 +00:00
|
|
|
gsm44021/frame_csd_test.ok \
|
2023-03-31 12:36:16 +00:00
|
|
|
osmo_io/osmo_io_test.ok osmo_io/osmo_io_test.err \
|
2023-11-14 13:46:01 +00:00
|
|
|
soft_uart/soft_uart_test.ok \
|
2023-11-23 21:08:51 +00:00
|
|
|
rlp/rlp_test.ok \
|
2024-01-28 17:18:16 +00:00
|
|
|
socket/socket_sctp_test.ok socket/socket_sctp_test.err \
|
2019-01-31 08:06:53 +00:00
|
|
|
$(NULL)
|
2012-09-27 12:18:37 +00:00
|
|
|
|
2020-08-25 11:56:43 +00:00
|
|
|
if ENABLE_LIBSCTP
|
|
|
|
if ENABLE_SCTP_TESTS
|
|
|
|
check_PROGRAMS += socket/socket_sctp_test
|
|
|
|
socket_socket_sctp_test_SOURCES = socket/socket_sctp_test.c
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2017-01-19 10:01:15 +00:00
|
|
|
DISTCLEANFILES = atconfig atlocal conv/gsm0503_test_vectors.c
|
|
|
|
BUILT_SOURCES = conv/gsm0503_test_vectors.c
|
2017-01-18 20:33:24 +00:00
|
|
|
noinst_HEADERS = conv/conv.h
|
2012-12-25 23:12:21 +00:00
|
|
|
|
2011-11-13 00:02:54 +00:00
|
|
|
TESTSUITE = $(srcdir)/testsuite
|
2012-06-29 20:01:18 +00:00
|
|
|
|
2021-08-18 19:49:16 +00:00
|
|
|
update_exp: $(check_PROGRAMS)
|
|
|
|
a5/a5_test \
|
|
|
|
>$(srcdir)/a5/a5_test.ok
|
|
|
|
abis/abis_test \
|
|
|
|
>$(srcdir)/abis/abis_test.ok
|
|
|
|
if ENABLE_CTRL
|
|
|
|
ctrl/ctrl_test \
|
|
|
|
>$(srcdir)/ctrl/ctrl_test.ok
|
|
|
|
endif
|
|
|
|
kasumi/kasumi_test \
|
|
|
|
>$(srcdir)/kasumi/kasumi_test.ok
|
|
|
|
bits/bitrev_test \
|
|
|
|
>$(srcdir)/bits/bitrev_test.ok
|
|
|
|
bitvec/bitvec_test \
|
|
|
|
>$(srcdir)/bitvec/bitvec_test.ok
|
|
|
|
bits/bitcomp_test \
|
|
|
|
>$(srcdir)/bits/bitcomp_test.ok
|
|
|
|
bits/bitfield_test \
|
|
|
|
>$(srcdir)/bits/bitfield_test.ok
|
|
|
|
conv/conv_test \
|
|
|
|
>$(srcdir)/conv/conv_test.ok
|
|
|
|
conv/conv_gsm0503_test \
|
|
|
|
>$(srcdir)/conv/conv_gsm0503_test.ok
|
|
|
|
coding/coding_test \
|
|
|
|
>$(srcdir)/coding/coding_test.ok
|
|
|
|
msgb/msgb_test \
|
|
|
|
>$(srcdir)/msgb/msgb_test.ok
|
|
|
|
gea/gea_test \
|
|
|
|
>$(srcdir)/gea/gea_test.ok
|
|
|
|
if ENABLE_MSGFILE
|
2024-04-22 02:12:39 +00:00
|
|
|
msgfile/msgfile_test $(srcdir)/msgfile/msgconfig.cfg \
|
2021-08-18 19:49:16 +00:00
|
|
|
>$(srcdir)/msgfile/msgfile_test.ok
|
|
|
|
endif
|
|
|
|
sms/sms_test \
|
|
|
|
>$(srcdir)/sms/sms_test.ok
|
|
|
|
smscb/smscb_test \
|
|
|
|
>$(srcdir)/smscb/smscb_test.ok
|
2022-08-05 11:46:44 +00:00
|
|
|
smscb/gsm0341_test \
|
|
|
|
>$(srcdir)/smscb/gsm0341_test.ok
|
2022-08-05 11:58:17 +00:00
|
|
|
smscb/cbsp_test \
|
|
|
|
>$(srcdir)/smscb/cbsp_test.ok
|
2021-08-18 19:49:16 +00:00
|
|
|
ussd/ussd_test \
|
|
|
|
>$(srcdir)/ussd/ussd_test.ok
|
|
|
|
auth/milenage_test \
|
|
|
|
>$(srcdir)/auth/milenage_test.ok
|
2023-05-28 07:36:50 +00:00
|
|
|
auth/tuak_test \
|
|
|
|
>$(srcdir)/auth/tuak_test.ok
|
2021-08-18 19:49:16 +00:00
|
|
|
comp128/comp128_test \
|
|
|
|
>$(srcdir)/comp128/comp128_test.ok
|
|
|
|
lapd/lapd_test \
|
|
|
|
>$(srcdir)/lapd/lapd_test.ok
|
|
|
|
gsm0502/gsm0502_test \
|
|
|
|
>$(srcdir)/gsm0502/gsm0502_test.ok
|
|
|
|
dtx/dtx_gsm0503_test \
|
|
|
|
>$(srcdir)/dtx/dtx_gsm0503_test.ok
|
|
|
|
gsm0808/gsm0808_test \
|
|
|
|
>$(srcdir)/gsm0808/gsm0808_test.ok
|
|
|
|
gsm29205/gsm29205_test \
|
|
|
|
>$(srcdir)/gsm29205/gsm29205_test.ok
|
|
|
|
gsm0408/gsm0408_test \
|
2022-07-02 22:41:02 +00:00
|
|
|
2>$(srcdir)/gsm0408/gsm0408_test.err \
|
|
|
|
1>$(srcdir)/gsm0408/gsm0408_test.ok
|
2021-08-18 19:49:16 +00:00
|
|
|
gsm48/rest_octets_test \
|
|
|
|
>$(srcdir)/gsm48/rest_octets_test.ok
|
|
|
|
gprs/gprs_test \
|
|
|
|
>$(srcdir)/gprs/gprs_test.ok
|
2022-01-29 14:38:04 +00:00
|
|
|
logging/logging_test \
|
2021-08-18 19:49:16 +00:00
|
|
|
>$(srcdir)/logging/logging_test.ok \
|
2022-01-29 14:38:04 +00:00
|
|
|
2>$(srcdir)/logging/logging_test.err
|
2024-04-22 02:25:10 +00:00
|
|
|
logging/logging_gsmtap_test \
|
|
|
|
2>&1 |grep -v "enqueueing message failed" >$(srcdir)/logging/logging_gsmtap_test.err
|
2021-08-18 19:49:16 +00:00
|
|
|
codec/codec_test \
|
|
|
|
>$(srcdir)/codec/codec_test.ok
|
|
|
|
codec/codec_ecu_fr_test \
|
|
|
|
>$(srcdir)/codec/codec_ecu_fr_test.ok
|
|
|
|
if ENABLE_GB
|
|
|
|
fr/fr_test \
|
|
|
|
>$(srcdir)/fr/fr_test.ok
|
|
|
|
endif
|
|
|
|
loggingrb/loggingrb_test \
|
|
|
|
>$(srcdir)/loggingrb/logging_test.ok \
|
|
|
|
2>$(srcdir)/loggingrb/logging_test.err
|
|
|
|
strrb/strrb_test \
|
|
|
|
>$(srcdir)/strrb/strrb_test.ok
|
|
|
|
if ENABLE_VTY
|
2024-04-22 02:12:39 +00:00
|
|
|
vty/vty_test $(srcdir)/vty \
|
2021-08-18 19:49:16 +00:00
|
|
|
>$(srcdir)/vty/vty_test.ok \
|
|
|
|
2>$(srcdir)/vty/vty_test.err
|
|
|
|
endif
|
|
|
|
if ENABLE_GB
|
|
|
|
gb/gprs_bssgp_test \
|
|
|
|
>$(srcdir)/gb/gprs_bssgp_test.ok
|
|
|
|
gb/gprs_bssgp_rim_test \
|
|
|
|
>$(srcdir)/gb/gprs_bssgp_rim_test.ok
|
|
|
|
gb/gprs_ns_test \
|
2023-12-28 22:28:38 +00:00
|
|
|
>$(srcdir)/gb/gprs_ns_test.ok \
|
|
|
|
2>$(srcdir)/gb/gprs_ns_test.err
|
2021-08-18 19:49:16 +00:00
|
|
|
gb/gprs_ns2_test \
|
2023-12-28 22:28:38 +00:00
|
|
|
>$(srcdir)/gb/gprs_ns2_test.ok \
|
|
|
|
2>$(srcdir)/gb/gprs_ns2_test.err
|
2021-08-18 19:49:16 +00:00
|
|
|
endif
|
|
|
|
if ENABLE_UTILITIES
|
|
|
|
utils/utils_test \
|
|
|
|
>$(srcdir)/utils/utils_test.ok
|
|
|
|
endif
|
|
|
|
if !EMBEDDED
|
|
|
|
stats/stats_test \
|
|
|
|
>$(srcdir)/stats/stats_test.ok \
|
|
|
|
2>$(srcdir)/stats/stats_test.err
|
|
|
|
endif
|
|
|
|
write_queue/wqueue_test \
|
|
|
|
>$(srcdir)/write_queue/wqueue_test.ok
|
|
|
|
if ENABLE_GB
|
|
|
|
$(srcdir)/gb/bssgp_fc_tests.sh gb \
|
|
|
|
>$(srcdir)/gb/bssgp_fc_tests.ok \
|
|
|
|
2>$(srcdir)/gb/bssgp_fc_tests.err
|
|
|
|
endif
|
|
|
|
if ENABLE_PCSC
|
|
|
|
sim/sim_test \
|
|
|
|
>$(srcdir)/sim/sim_test.ok
|
|
|
|
endif
|
|
|
|
timer/timer_test \
|
|
|
|
>$(srcdir)/timer/timer_test.ok
|
|
|
|
timer/clk_override_test \
|
|
|
|
>$(srcdir)/timer/clk_override_test.ok
|
|
|
|
tlv/tlv_test \
|
|
|
|
>$(srcdir)/tlv/tlv_test.ok
|
gsup: Convert PDP-Type IE to PDP-Address IE
The previous PDP-Type IE should have been a PDP-Address from the
start, since having only PDP-Type with no address is only a specific
case (dynamic addressing).
This becomes clear by looking at other similar protocols like:
* MAP: APN-Configuration IE has servedPartyIP-IP{v4,v6}-Address IEs
* Diameter S6b, 3GPP TS 29.272 7.3.35 APN-Configuration contains
Served-Party-IP-Address AVPs
* Diameter SWx, 3GPP TS 29.273 APN-Configuration.
* GTPv1C Ts 29.060 7.7.29 PDP Context containing PDP Address.
Since PDP-Type on its own really makes no sense, being it a special case
of PDP-Address, let's keep the IE by renaming it (keeping old name too
for API backward compat) and extend it to support lengths > 2 bytes.
Old implementation of libosmogsm gsup actually ignored lengths > 2
bytes, so we are safe acting against older implementations here, both
on the sending and receiving side on the wire.
The big drawback of this commit is that it breaks ABI compatibility due
to adding "struct osmo_sockaddr pdp_address[2];" to struct
osmo_gsup_pdp_info, which in turn affects shift of fields in struct
osmo_gsup_message. Unfortunately, there's not much that can be done to
improve the situation when adding the missing field, due to existing API
having the same struct for all messages. Ideally we'd have 1 union with
structs per message type inside, this way the ABI break would be far
less pronounced.
The GSUP test output change is becaue we now accept some of the len>2
cases for PDP-Type/Address IE which were being rejected since a couple
commits ago.
libosmogsm gsup code is now disabled in EMBEDDED mode, since it nows
depends on core/socket.h (struct osmo_sockaddr) which is not available
in EMBEDDED, and hence fails during build:
"""
In file included from /build/include/osmocom/gsm/gsup.h:45,
from /build/src/gsm/gsup_sms.c:28:
/build/include/osmocom/core/socket.h:15:10: fatal error: arpa/inet.h: No such file or directory
15 | #include <arpa/inet.h>
| ^~~~~~~~~~~~~
"""
Related: OS#6091
Change-Id: I775ff9c3be165d9f30d6ab55d03f99b6104eadd6
2024-01-19 17:28:09 +00:00
|
|
|
if !EMBEDDED
|
2021-08-18 19:49:16 +00:00
|
|
|
gsup/gsup_test \
|
|
|
|
>$(srcdir)/gsup/gsup_test.ok \
|
|
|
|
2>$(srcdir)/gsup/gsup_test.err
|
gsup: Convert PDP-Type IE to PDP-Address IE
The previous PDP-Type IE should have been a PDP-Address from the
start, since having only PDP-Type with no address is only a specific
case (dynamic addressing).
This becomes clear by looking at other similar protocols like:
* MAP: APN-Configuration IE has servedPartyIP-IP{v4,v6}-Address IEs
* Diameter S6b, 3GPP TS 29.272 7.3.35 APN-Configuration contains
Served-Party-IP-Address AVPs
* Diameter SWx, 3GPP TS 29.273 APN-Configuration.
* GTPv1C Ts 29.060 7.7.29 PDP Context containing PDP Address.
Since PDP-Type on its own really makes no sense, being it a special case
of PDP-Address, let's keep the IE by renaming it (keeping old name too
for API backward compat) and extend it to support lengths > 2 bytes.
Old implementation of libosmogsm gsup actually ignored lengths > 2
bytes, so we are safe acting against older implementations here, both
on the sending and receiving side on the wire.
The big drawback of this commit is that it breaks ABI compatibility due
to adding "struct osmo_sockaddr pdp_address[2];" to struct
osmo_gsup_pdp_info, which in turn affects shift of fields in struct
osmo_gsup_message. Unfortunately, there's not much that can be done to
improve the situation when adding the missing field, due to existing API
having the same struct for all messages. Ideally we'd have 1 union with
structs per message type inside, this way the ABI break would be far
less pronounced.
The GSUP test output change is becaue we now accept some of the len>2
cases for PDP-Type/Address IE which were being rejected since a couple
commits ago.
libosmogsm gsup code is now disabled in EMBEDDED mode, since it nows
depends on core/socket.h (struct osmo_sockaddr) which is not available
in EMBEDDED, and hence fails during build:
"""
In file included from /build/include/osmocom/gsm/gsup.h:45,
from /build/src/gsm/gsup_sms.c:28:
/build/include/osmocom/core/socket.h:15:10: fatal error: arpa/inet.h: No such file or directory
15 | #include <arpa/inet.h>
| ^~~~~~~~~~~~~
"""
Related: OS#6091
Change-Id: I775ff9c3be165d9f30d6ab55d03f99b6104eadd6
2024-01-19 17:28:09 +00:00
|
|
|
endif
|
2021-08-18 19:49:16 +00:00
|
|
|
if ENABLE_CTRL
|
|
|
|
fsm/fsm_test \
|
|
|
|
>$(srcdir)/fsm/fsm_test.ok \
|
|
|
|
2>$(srcdir)/fsm/fsm_test.err
|
|
|
|
fsm/fsm_dealloc_test \
|
|
|
|
2>$(srcdir)/fsm/fsm_dealloc_test.err
|
|
|
|
endif
|
|
|
|
oap/oap_test \
|
|
|
|
>$(srcdir)/oap/oap_test.ok
|
|
|
|
oap/oap_client_test \
|
|
|
|
>$(srcdir)/oap/oap_client_test.ok \
|
|
|
|
2>$(srcdir)/oap/oap_client_test.err
|
|
|
|
socket/socket_test \
|
|
|
|
>$(srcdir)/socket/socket_test.ok \
|
|
|
|
2>$(srcdir)/socket/socket_test.err
|
|
|
|
socket/socket_sctp_test \
|
|
|
|
>$(srcdir)/socket/socket_sctp_test.ok \
|
|
|
|
2>$(srcdir)/socket/socket_sctp_test.err
|
|
|
|
$(srcdir)/osmo-auc-gen/osmo-auc-gen_test.sh ../utils/osmo-auc-gen \
|
|
|
|
>$(srcdir)/osmo-auc-gen/osmo-auc-gen_test.ok \
|
|
|
|
2>$(srcdir)/osmo-auc-gen/osmo-auc-gen_test.err
|
|
|
|
endian/endian_test \
|
|
|
|
>$(srcdir)/endian/endian_test.ok
|
|
|
|
sercomm/sercomm_test \
|
|
|
|
>$(srcdir)/sercomm/sercomm_test.ok
|
|
|
|
prbs/prbs_test \
|
|
|
|
>$(srcdir)/prbs/prbs_test.ok
|
|
|
|
gsm23003/gsm23003_test \
|
|
|
|
>$(srcdir)/gsm23003/gsm23003_test.ok
|
|
|
|
gsm23236/gsm23236_test \
|
|
|
|
>$(srcdir)/gsm23236/gsm23236_test.ok
|
|
|
|
tdef/tdef_test \
|
2023-12-30 16:39:09 +00:00
|
|
|
>$(srcdir)/tdef/tdef_test.ok \
|
|
|
|
2>$(srcdir)/tdef/tdef_test.err
|
2021-08-18 19:49:16 +00:00
|
|
|
sockaddr_str/sockaddr_str_test \
|
|
|
|
>$(srcdir)/sockaddr_str/sockaddr_str_test.ok
|
|
|
|
use_count/use_count_test \
|
|
|
|
>$(srcdir)/use_count/use_count_test.ok \
|
|
|
|
2>$(srcdir)/use_count/use_count_test.err
|
|
|
|
context/context_test \
|
|
|
|
>$(srcdir)/context/context_test.ok
|
|
|
|
if !EMBEDDED
|
|
|
|
exec/exec_test \
|
|
|
|
>$(srcdir)/exec/exec_test.ok \
|
|
|
|
2>$(srcdir)/exec/exec_test.err
|
|
|
|
endif
|
|
|
|
i460_mux/i460_mux_test \
|
|
|
|
>$(srcdir)/i460_mux/i460_mux_test.ok
|
|
|
|
bitgen/bitgen_test \
|
|
|
|
>$(srcdir)/bitgen/bitgen_test.ok
|
|
|
|
gad/gad_test \
|
|
|
|
>$(srcdir)/gad/gad_test.ok
|
|
|
|
bsslap/bsslap_test \
|
|
|
|
>$(srcdir)/bsslap/bsslap_test.ok
|
|
|
|
bssmap_le/bssmap_le_test \
|
|
|
|
>$(srcdir)/bssmap_le/bssmap_le_test.ok
|
|
|
|
it_q/it_q_test \
|
|
|
|
>$(srcdir)/it_q/it_q_test.ok
|
2021-11-13 22:19:33 +00:00
|
|
|
time_cc/time_cc_test \
|
|
|
|
>$(srcdir)/time_cc/time_cc_test.ok
|
2018-11-29 12:47:39 +00:00
|
|
|
iuup/iuup_test \
|
2023-12-28 22:28:38 +00:00
|
|
|
>$(srcdir)/iuup/iuup_test.ok \
|
|
|
|
2>$(srcdir)/iuup/iuup_test.err
|
2023-09-04 10:41:49 +00:00
|
|
|
v110/frame_test \
|
|
|
|
>$(srcdir)/v110/frame_test.ok
|
|
|
|
v110/ra1_test \
|
|
|
|
>$(srcdir)/v110/ra1_test.ok
|
isdn: initial implementation of the V.110 TA
ITU-T recommendation V.110 defines Terminal Adaptor (TA) functions
for the connection of Terminal Equipment (TE) having standard V-series
interfaces to the ISDN. This patch brings "software" implementation
of the TA to libosmoisdn.
The primary user for this soft-TA is the mobile-side implementation
of CSD (Circuit Switched Data) in osmocom-bb. CSD is heavily based
on V.110, which is not surprising given that GSM is a "wireless ISDN".
Nevertheless, this code will likely also be useful in the context
of retro-networking.
Similarly to the existing V.110 code in libosmoisdn, the present
implementation aims to be functional and correct, rather than
efficient in any way. It also has several limitations, which are
not critical for the CSD use case, but eventually may be a problem
for other use cases in the context of retro-networking.
Therefore, the V.110 TA API should be considered _unstable_,
and may be subject to change in the future.
+-------+ +------+ B-channel +------+ +-------+
| TE1 |------| TA |~~~~~~~~~~~~~~~| TA |------| TE2 |
+-------+ +------+ +------+ +-------+
TE (also known as DTE) is basically a computer, having a V-series
(usually RS-232) connection to TA (also known as DCE). The TA acts
like a regular analog modem, except that it is not performing any
kind of modulation or demodulation itself.
The TE-TA interface is implemented by the user supplied callback
functions, configured during the allocation of a TA instance:
* .rx_cb() - receive call-back of the application,
* .tx_cb() - transmit call-back of the application,
* .status_update_cb() - status line update call-back.
In addition to that, the application (TE) can interact with the
V.24 status lines (circuits) using the following API:
* osmo_v110_ta_{get,set}_status(),
* osmo_v110_ta_{get,set}_circuit().
The Rx and Tx between TE and TA is always driven by the TA itself,
as a result of an interaction with the lower layer implementing
the B-channel interface. There is currently no buffering and thus
no way for TE to initiate transmission or pull data on its own.
The TA-TA (B-channel) interface is implemented by the following
functions, which are meant to be called by the lower layer
transmitting and receiving V.110 frames over certain medium:
* osmo_v110_ta_frame_in() - indicate a received V.110 frame,
* osmo_v110_ta_frame_out() - pull a V.110 frame for transmission,
* osmo_v110_ta_[de]sync_ind() - indicate a synchronization event.
The lower layer is responsible for finding the synchronization
pattern (if needed), aligning to the frame boundaries, and doing
the V.110 frame coding.
The D-channel signalling is behind the scope of this module.
Initial (Work-in-Progress) implementation by Harald Welte,
completed and co-authored by Vadim Yanitskiy.
Change-Id: I5716bd6fd0201ee7a7a29e72f775972cd374082f
Related: OS#4396
2023-03-14 19:33:51 +00:00
|
|
|
v110/ta_test \
|
|
|
|
2>$(srcdir)/v110/ta_test.err
|
2023-09-04 10:41:49 +00:00
|
|
|
gsm44021/frame_csd_test \
|
|
|
|
>$(srcdir)/gsm44021/frame_csd_test.ok
|
2023-03-31 12:36:16 +00:00
|
|
|
osmo_io/osmo_io_test \
|
|
|
|
>$(srcdir)/osmo_io/osmo_io_test.ok \
|
|
|
|
2>$(srcdir)/osmo_io/osmo_io_test.err
|
2023-11-14 13:46:01 +00:00
|
|
|
soft_uart/soft_uart_test \
|
2023-12-28 22:22:41 +00:00
|
|
|
>$(srcdir)/soft_uart/soft_uart.ok
|
2023-11-23 21:08:51 +00:00
|
|
|
rlp/rlp_test \
|
|
|
|
>$(srcdir)/rlp/rlp_test.ok \
|
|
|
|
$(NULL)
|
2023-03-31 12:36:16 +00:00
|
|
|
|
2021-08-18 19:49:16 +00:00
|
|
|
|
2011-11-13 00:02:54 +00:00
|
|
|
check-local: atconfig $(TESTSUITE)
|
2018-11-18 12:14:27 +00:00
|
|
|
[ -e /proc/cpuinfo ] && cat /proc/cpuinfo
|
2024-02-15 12:30:38 +00:00
|
|
|
$(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) ENABLE_URING=$(ENABLE_URING) ENABLE_URING_TESTS=$(ENABLE_URING_TESTS)
|
2018-09-10 15:18:28 +00:00
|
|
|
$(MAKE) $(AM_MAKEFLAGS) ext-tests
|
2012-06-29 20:01:18 +00:00
|
|
|
|
2011-11-13 00:02:54 +00:00
|
|
|
installcheck-local: atconfig $(TESTSUITE)
|
|
|
|
$(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \
|
2024-02-15 12:30:38 +00:00
|
|
|
$(TESTSUITEFLAGS) ENABLE_URING=$(ENABLE_URING) ENABLE_URING_TESTS=$(ENABLE_URING_TESTS)
|
2012-06-29 20:01:18 +00:00
|
|
|
|
2011-11-13 00:02:54 +00:00
|
|
|
clean-local:
|
|
|
|
test ! -f '$(TESTSUITE)' || \
|
|
|
|
$(SHELL) '$(TESTSUITE)' --clean
|
2012-06-29 20:01:18 +00:00
|
|
|
|
2011-11-29 21:20:34 +00:00
|
|
|
AUTOM4TE = $(SHELL) $(top_srcdir)/missing --run autom4te
|
2011-11-13 00:02:54 +00:00
|
|
|
AUTOTEST = $(AUTOM4TE) --language=autotest
|
|
|
|
$(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4
|
|
|
|
$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
|
|
|
|
mv $@.tmp $@
|
2017-01-19 10:01:15 +00:00
|
|
|
|
|
|
|
conv/gsm0503_test_vectors.c: $(top_srcdir)/utils/conv_gen.py $(top_srcdir)/utils/conv_codes_gsm.py
|
2019-12-11 07:46:41 +00:00
|
|
|
$(AM_V_GEN)python3 $(top_srcdir)/utils/conv_gen.py gen_vectors gsm \
|
2017-01-19 10:01:15 +00:00
|
|
|
--target-path $(builddir)/conv
|
2018-09-10 15:18:28 +00:00
|
|
|
|
|
|
|
if ENABLE_EXT_TESTS
|
|
|
|
ext-tests:
|
|
|
|
# don't run vty and ctrl tests concurrently so that the ports don't conflict
|
|
|
|
$(MAKE) vty-test
|
|
|
|
$(MAKE) ctrl-test
|
|
|
|
else
|
|
|
|
ext-tests:
|
|
|
|
echo "Not running python-based external tests (determined at configure-time)"
|
|
|
|
endif
|
|
|
|
|
|
|
|
# To update the VTY script from current application behavior,
|
|
|
|
# pass -u to osmo_verify_transcript_vty.py by doing:
|
|
|
|
# make vty-test U=-u
|
add osmo_tdef API, originally adopted from osmo-bsc T_def
Move T_def from osmo-bsc to libosmocore as osmo_tdef. Adjust naming to be more
consistent. Upgrade to first class API:
- add timer grouping
- add generic vty support
- add mising API doc
- add C test
- add VTY transcript tests, also as examples for using the API
From osmo_fsm_inst_state_chg() API doc, cross reference to osmo_tdef API.
The root reason for moving to libosmocore is that I want to use the
mgw_endpoint_fsm in osmo-msc for inter-MSC handover, and hence want to move the
FSM to libosmo-mgcp-client. This FSM uses the T_def from osmo-bsc. Though the
mgw_endpoint_fsm's use of T_def is minimal, I intend to use the osmo_tdef API
in osmo-msc (and probably elsewhere) as well. libosmocore is the most sensible
place for this.
osmo_tdef provides:
- a list of Tnnnn (GSM) timers with description, unit and default value.
- vty UI to allow users to configure non-default timeouts.
- API to tie T timers to osmo_fsm states and set them on state transitions.
- a few standard units (minute, second, millisecond) as well as a custom unit
(which relies on the timer's human readable description to indicate the
meaning of the value).
- conversion for standard units: for example, some GSM timers are defined in
minutes, while our FSM definitions need timeouts in seconds. Conversion is
for convenience only and can be easily avoided via the custom unit.
By keeping separate osmo_tdef arrays, several groups of timers can be kept
separately. The VTY tests in tests/tdef/ showcase different schemes:
- tests/vty/tdef_vty_test_config_root.c:
Keep several timer definitions in separately named groups: showcase the
osmo_tdef_vty_groups*() API. Each timer group exists exactly once.
- tests/vty/tdef_vty_test_config_subnode.c:
Keep a single list of timers without separate grouping.
Put this list on a specific subnode below the CONFIG_NODE.
There could be several separate subnodes with timers like this, i.e.
continuing from this example, sets timers could be separated by placing
timers in specific config subnodes instead of using the global group name.
- tests/vty/tdef_vty_test_dynamic.c:
Dynamically allocate timer definitions per each new created object.
Thus there can be an arbitrary number of independent timer definitions, one
per allocated object.
T_def was introduced during the recent osmo-bsc refactoring for inter-BSC
handover, and has proven useful:
- without osmo_tdef, each invocation of osmo_fsm_inst_state_chg() needs to be
programmed with the right timeout value, for all code paths that invoke this
state change. It is a likely source of errors to get one of them wrong. By
defining a T timer exactly for an FSM state, the caller can merely invoke the
state change and trust on the original state definition to apply the correct
timeout.
- it is helpful to have a standardized config file UI to provide user
configurable timeouts, instead of inventing new VTY commands for each
separate application of T timer numbers.
Change-Id: Ibd6b1ed7f1bd6e1f2e0fde53352055a4468f23e5
2019-01-26 19:36:12 +00:00
|
|
|
|
2023-03-09 04:09:29 +00:00
|
|
|
if ENABLE_GB
|
2023-03-29 19:26:48 +00:00
|
|
|
vty-test-ns2: $(top_builddir)/utils/osmo-ns-dummy
|
2020-12-14 01:36:53 +00:00
|
|
|
$(MAKE) -C $(top_builddir)/utils osmo-ns-dummy
|
|
|
|
osmo_verify_transcript_vty.py -v \
|
|
|
|
-p 42042 \
|
|
|
|
-r "$(top_builddir)/utils/osmo-ns-dummy -p 42042" \
|
|
|
|
$(U) $(srcdir)/gb/gprs_ns2*.vty
|
2021-01-01 18:52:17 +00:00
|
|
|
osmotestvty.py -p $(abs_top_srcdir)/tests/gb -w $(abs_top_builddir)/tests/gb -v
|
|
|
|
osmotestconfig.py -p $(abs_top_srcdir)/tests/gb -w $(abs_top_builddir)/tests/gb -v
|
2023-03-09 04:09:29 +00:00
|
|
|
else
|
|
|
|
vty-test-ns2:
|
|
|
|
echo "Not running vty-test-ns2 because osmo-ns-dummy is not built (--disable-gb)"
|
|
|
|
endif
|
2020-12-14 01:36:53 +00:00
|
|
|
|
2023-03-29 19:26:48 +00:00
|
|
|
vty-test-logging: $(top_builddir)/tests/logging/logging_vty_test
|
2018-09-10 15:18:28 +00:00
|
|
|
osmo_verify_transcript_vty.py -v \
|
|
|
|
-p 42042 \
|
|
|
|
-r "$(top_builddir)/tests/logging/logging_vty_test" \
|
|
|
|
$(U) $(srcdir)/logging/*.vty
|
|
|
|
|
2023-03-29 19:26:48 +00:00
|
|
|
vty-test-vty: $(top_builddir)/tests/vty/vty_transcript_test
|
2019-01-31 08:06:53 +00:00
|
|
|
osmo_verify_transcript_vty.py -v \
|
|
|
|
-p 42042 \
|
|
|
|
-r "$(top_builddir)/tests/vty/vty_transcript_test" \
|
|
|
|
$(U) $(srcdir)/vty/*.vty
|
|
|
|
|
2023-03-29 19:26:48 +00:00
|
|
|
vty-test-tdef: $(top_builddir)/tests/tdef/tdef_vty_config_root_test \
|
|
|
|
$(top_builddir)/tests/tdef/tdef_vty_config_subnode_test \
|
|
|
|
$(top_builddir)/tests/tdef/tdef_vty_dynamic_test
|
add osmo_tdef API, originally adopted from osmo-bsc T_def
Move T_def from osmo-bsc to libosmocore as osmo_tdef. Adjust naming to be more
consistent. Upgrade to first class API:
- add timer grouping
- add generic vty support
- add mising API doc
- add C test
- add VTY transcript tests, also as examples for using the API
From osmo_fsm_inst_state_chg() API doc, cross reference to osmo_tdef API.
The root reason for moving to libosmocore is that I want to use the
mgw_endpoint_fsm in osmo-msc for inter-MSC handover, and hence want to move the
FSM to libosmo-mgcp-client. This FSM uses the T_def from osmo-bsc. Though the
mgw_endpoint_fsm's use of T_def is minimal, I intend to use the osmo_tdef API
in osmo-msc (and probably elsewhere) as well. libosmocore is the most sensible
place for this.
osmo_tdef provides:
- a list of Tnnnn (GSM) timers with description, unit and default value.
- vty UI to allow users to configure non-default timeouts.
- API to tie T timers to osmo_fsm states and set them on state transitions.
- a few standard units (minute, second, millisecond) as well as a custom unit
(which relies on the timer's human readable description to indicate the
meaning of the value).
- conversion for standard units: for example, some GSM timers are defined in
minutes, while our FSM definitions need timeouts in seconds. Conversion is
for convenience only and can be easily avoided via the custom unit.
By keeping separate osmo_tdef arrays, several groups of timers can be kept
separately. The VTY tests in tests/tdef/ showcase different schemes:
- tests/vty/tdef_vty_test_config_root.c:
Keep several timer definitions in separately named groups: showcase the
osmo_tdef_vty_groups*() API. Each timer group exists exactly once.
- tests/vty/tdef_vty_test_config_subnode.c:
Keep a single list of timers without separate grouping.
Put this list on a specific subnode below the CONFIG_NODE.
There could be several separate subnodes with timers like this, i.e.
continuing from this example, sets timers could be separated by placing
timers in specific config subnodes instead of using the global group name.
- tests/vty/tdef_vty_test_dynamic.c:
Dynamically allocate timer definitions per each new created object.
Thus there can be an arbitrary number of independent timer definitions, one
per allocated object.
T_def was introduced during the recent osmo-bsc refactoring for inter-BSC
handover, and has proven useful:
- without osmo_tdef, each invocation of osmo_fsm_inst_state_chg() needs to be
programmed with the right timeout value, for all code paths that invoke this
state change. It is a likely source of errors to get one of them wrong. By
defining a T timer exactly for an FSM state, the caller can merely invoke the
state change and trust on the original state definition to apply the correct
timeout.
- it is helpful to have a standardized config file UI to provide user
configurable timeouts, instead of inventing new VTY commands for each
separate application of T timer numbers.
Change-Id: Ibd6b1ed7f1bd6e1f2e0fde53352055a4468f23e5
2019-01-26 19:36:12 +00:00
|
|
|
osmo_verify_transcript_vty.py -v \
|
|
|
|
-p 42042 \
|
2021-11-16 22:58:03 +00:00
|
|
|
-r "$(top_builddir)/tests/tdef/tdef_vty_config_root_test" \
|
|
|
|
$(U) $(srcdir)/tdef/tdef_vty_config_root_test.vty
|
add osmo_tdef API, originally adopted from osmo-bsc T_def
Move T_def from osmo-bsc to libosmocore as osmo_tdef. Adjust naming to be more
consistent. Upgrade to first class API:
- add timer grouping
- add generic vty support
- add mising API doc
- add C test
- add VTY transcript tests, also as examples for using the API
From osmo_fsm_inst_state_chg() API doc, cross reference to osmo_tdef API.
The root reason for moving to libosmocore is that I want to use the
mgw_endpoint_fsm in osmo-msc for inter-MSC handover, and hence want to move the
FSM to libosmo-mgcp-client. This FSM uses the T_def from osmo-bsc. Though the
mgw_endpoint_fsm's use of T_def is minimal, I intend to use the osmo_tdef API
in osmo-msc (and probably elsewhere) as well. libosmocore is the most sensible
place for this.
osmo_tdef provides:
- a list of Tnnnn (GSM) timers with description, unit and default value.
- vty UI to allow users to configure non-default timeouts.
- API to tie T timers to osmo_fsm states and set them on state transitions.
- a few standard units (minute, second, millisecond) as well as a custom unit
(which relies on the timer's human readable description to indicate the
meaning of the value).
- conversion for standard units: for example, some GSM timers are defined in
minutes, while our FSM definitions need timeouts in seconds. Conversion is
for convenience only and can be easily avoided via the custom unit.
By keeping separate osmo_tdef arrays, several groups of timers can be kept
separately. The VTY tests in tests/tdef/ showcase different schemes:
- tests/vty/tdef_vty_test_config_root.c:
Keep several timer definitions in separately named groups: showcase the
osmo_tdef_vty_groups*() API. Each timer group exists exactly once.
- tests/vty/tdef_vty_test_config_subnode.c:
Keep a single list of timers without separate grouping.
Put this list on a specific subnode below the CONFIG_NODE.
There could be several separate subnodes with timers like this, i.e.
continuing from this example, sets timers could be separated by placing
timers in specific config subnodes instead of using the global group name.
- tests/vty/tdef_vty_test_dynamic.c:
Dynamically allocate timer definitions per each new created object.
Thus there can be an arbitrary number of independent timer definitions, one
per allocated object.
T_def was introduced during the recent osmo-bsc refactoring for inter-BSC
handover, and has proven useful:
- without osmo_tdef, each invocation of osmo_fsm_inst_state_chg() needs to be
programmed with the right timeout value, for all code paths that invoke this
state change. It is a likely source of errors to get one of them wrong. By
defining a T timer exactly for an FSM state, the caller can merely invoke the
state change and trust on the original state definition to apply the correct
timeout.
- it is helpful to have a standardized config file UI to provide user
configurable timeouts, instead of inventing new VTY commands for each
separate application of T timer numbers.
Change-Id: Ibd6b1ed7f1bd6e1f2e0fde53352055a4468f23e5
2019-01-26 19:36:12 +00:00
|
|
|
osmo_verify_transcript_vty.py -v \
|
|
|
|
-p 42042 \
|
2021-11-16 22:58:03 +00:00
|
|
|
-r "$(top_builddir)/tests/tdef/tdef_vty_config_subnode_test" \
|
|
|
|
$(U) $(srcdir)/tdef/tdef_vty_config_subnode_test.vty
|
add osmo_tdef API, originally adopted from osmo-bsc T_def
Move T_def from osmo-bsc to libosmocore as osmo_tdef. Adjust naming to be more
consistent. Upgrade to first class API:
- add timer grouping
- add generic vty support
- add mising API doc
- add C test
- add VTY transcript tests, also as examples for using the API
From osmo_fsm_inst_state_chg() API doc, cross reference to osmo_tdef API.
The root reason for moving to libosmocore is that I want to use the
mgw_endpoint_fsm in osmo-msc for inter-MSC handover, and hence want to move the
FSM to libosmo-mgcp-client. This FSM uses the T_def from osmo-bsc. Though the
mgw_endpoint_fsm's use of T_def is minimal, I intend to use the osmo_tdef API
in osmo-msc (and probably elsewhere) as well. libosmocore is the most sensible
place for this.
osmo_tdef provides:
- a list of Tnnnn (GSM) timers with description, unit and default value.
- vty UI to allow users to configure non-default timeouts.
- API to tie T timers to osmo_fsm states and set them on state transitions.
- a few standard units (minute, second, millisecond) as well as a custom unit
(which relies on the timer's human readable description to indicate the
meaning of the value).
- conversion for standard units: for example, some GSM timers are defined in
minutes, while our FSM definitions need timeouts in seconds. Conversion is
for convenience only and can be easily avoided via the custom unit.
By keeping separate osmo_tdef arrays, several groups of timers can be kept
separately. The VTY tests in tests/tdef/ showcase different schemes:
- tests/vty/tdef_vty_test_config_root.c:
Keep several timer definitions in separately named groups: showcase the
osmo_tdef_vty_groups*() API. Each timer group exists exactly once.
- tests/vty/tdef_vty_test_config_subnode.c:
Keep a single list of timers without separate grouping.
Put this list on a specific subnode below the CONFIG_NODE.
There could be several separate subnodes with timers like this, i.e.
continuing from this example, sets timers could be separated by placing
timers in specific config subnodes instead of using the global group name.
- tests/vty/tdef_vty_test_dynamic.c:
Dynamically allocate timer definitions per each new created object.
Thus there can be an arbitrary number of independent timer definitions, one
per allocated object.
T_def was introduced during the recent osmo-bsc refactoring for inter-BSC
handover, and has proven useful:
- without osmo_tdef, each invocation of osmo_fsm_inst_state_chg() needs to be
programmed with the right timeout value, for all code paths that invoke this
state change. It is a likely source of errors to get one of them wrong. By
defining a T timer exactly for an FSM state, the caller can merely invoke the
state change and trust on the original state definition to apply the correct
timeout.
- it is helpful to have a standardized config file UI to provide user
configurable timeouts, instead of inventing new VTY commands for each
separate application of T timer numbers.
Change-Id: Ibd6b1ed7f1bd6e1f2e0fde53352055a4468f23e5
2019-01-26 19:36:12 +00:00
|
|
|
osmo_verify_transcript_vty.py -v \
|
|
|
|
-p 42042 \
|
2021-11-16 22:58:03 +00:00
|
|
|
-r "$(top_builddir)/tests/tdef/tdef_vty_dynamic_test" \
|
|
|
|
$(U) $(srcdir)/tdef/tdef_vty_dynamic_test.vty
|
add osmo_tdef API, originally adopted from osmo-bsc T_def
Move T_def from osmo-bsc to libosmocore as osmo_tdef. Adjust naming to be more
consistent. Upgrade to first class API:
- add timer grouping
- add generic vty support
- add mising API doc
- add C test
- add VTY transcript tests, also as examples for using the API
From osmo_fsm_inst_state_chg() API doc, cross reference to osmo_tdef API.
The root reason for moving to libosmocore is that I want to use the
mgw_endpoint_fsm in osmo-msc for inter-MSC handover, and hence want to move the
FSM to libosmo-mgcp-client. This FSM uses the T_def from osmo-bsc. Though the
mgw_endpoint_fsm's use of T_def is minimal, I intend to use the osmo_tdef API
in osmo-msc (and probably elsewhere) as well. libosmocore is the most sensible
place for this.
osmo_tdef provides:
- a list of Tnnnn (GSM) timers with description, unit and default value.
- vty UI to allow users to configure non-default timeouts.
- API to tie T timers to osmo_fsm states and set them on state transitions.
- a few standard units (minute, second, millisecond) as well as a custom unit
(which relies on the timer's human readable description to indicate the
meaning of the value).
- conversion for standard units: for example, some GSM timers are defined in
minutes, while our FSM definitions need timeouts in seconds. Conversion is
for convenience only and can be easily avoided via the custom unit.
By keeping separate osmo_tdef arrays, several groups of timers can be kept
separately. The VTY tests in tests/tdef/ showcase different schemes:
- tests/vty/tdef_vty_test_config_root.c:
Keep several timer definitions in separately named groups: showcase the
osmo_tdef_vty_groups*() API. Each timer group exists exactly once.
- tests/vty/tdef_vty_test_config_subnode.c:
Keep a single list of timers without separate grouping.
Put this list on a specific subnode below the CONFIG_NODE.
There could be several separate subnodes with timers like this, i.e.
continuing from this example, sets timers could be separated by placing
timers in specific config subnodes instead of using the global group name.
- tests/vty/tdef_vty_test_dynamic.c:
Dynamically allocate timer definitions per each new created object.
Thus there can be an arbitrary number of independent timer definitions, one
per allocated object.
T_def was introduced during the recent osmo-bsc refactoring for inter-BSC
handover, and has proven useful:
- without osmo_tdef, each invocation of osmo_fsm_inst_state_chg() needs to be
programmed with the right timeout value, for all code paths that invoke this
state change. It is a likely source of errors to get one of them wrong. By
defining a T timer exactly for an FSM state, the caller can merely invoke the
state change and trust on the original state definition to apply the correct
timeout.
- it is helpful to have a standardized config file UI to provide user
configurable timeouts, instead of inventing new VTY commands for each
separate application of T timer numbers.
Change-Id: Ibd6b1ed7f1bd6e1f2e0fde53352055a4468f23e5
2019-01-26 19:36:12 +00:00
|
|
|
|
2023-03-29 19:26:48 +00:00
|
|
|
vty-test-stats: $(top_builddir)/tests/stats/stats_vty_test
|
2021-11-09 00:35:44 +00:00
|
|
|
osmo_verify_transcript_vty.py -v \
|
|
|
|
-p 42042 \
|
|
|
|
-r "$(top_builddir)/tests/stats/stats_vty_test" \
|
|
|
|
$(U) $(srcdir)/stats/*.vty
|
|
|
|
|
add osmo_tdef API, originally adopted from osmo-bsc T_def
Move T_def from osmo-bsc to libosmocore as osmo_tdef. Adjust naming to be more
consistent. Upgrade to first class API:
- add timer grouping
- add generic vty support
- add mising API doc
- add C test
- add VTY transcript tests, also as examples for using the API
From osmo_fsm_inst_state_chg() API doc, cross reference to osmo_tdef API.
The root reason for moving to libosmocore is that I want to use the
mgw_endpoint_fsm in osmo-msc for inter-MSC handover, and hence want to move the
FSM to libosmo-mgcp-client. This FSM uses the T_def from osmo-bsc. Though the
mgw_endpoint_fsm's use of T_def is minimal, I intend to use the osmo_tdef API
in osmo-msc (and probably elsewhere) as well. libosmocore is the most sensible
place for this.
osmo_tdef provides:
- a list of Tnnnn (GSM) timers with description, unit and default value.
- vty UI to allow users to configure non-default timeouts.
- API to tie T timers to osmo_fsm states and set them on state transitions.
- a few standard units (minute, second, millisecond) as well as a custom unit
(which relies on the timer's human readable description to indicate the
meaning of the value).
- conversion for standard units: for example, some GSM timers are defined in
minutes, while our FSM definitions need timeouts in seconds. Conversion is
for convenience only and can be easily avoided via the custom unit.
By keeping separate osmo_tdef arrays, several groups of timers can be kept
separately. The VTY tests in tests/tdef/ showcase different schemes:
- tests/vty/tdef_vty_test_config_root.c:
Keep several timer definitions in separately named groups: showcase the
osmo_tdef_vty_groups*() API. Each timer group exists exactly once.
- tests/vty/tdef_vty_test_config_subnode.c:
Keep a single list of timers without separate grouping.
Put this list on a specific subnode below the CONFIG_NODE.
There could be several separate subnodes with timers like this, i.e.
continuing from this example, sets timers could be separated by placing
timers in specific config subnodes instead of using the global group name.
- tests/vty/tdef_vty_test_dynamic.c:
Dynamically allocate timer definitions per each new created object.
Thus there can be an arbitrary number of independent timer definitions, one
per allocated object.
T_def was introduced during the recent osmo-bsc refactoring for inter-BSC
handover, and has proven useful:
- without osmo_tdef, each invocation of osmo_fsm_inst_state_chg() needs to be
programmed with the right timeout value, for all code paths that invoke this
state change. It is a likely source of errors to get one of them wrong. By
defining a T timer exactly for an FSM state, the caller can merely invoke the
state change and trust on the original state definition to apply the correct
timeout.
- it is helpful to have a standardized config file UI to provide user
configurable timeouts, instead of inventing new VTY commands for each
separate application of T timer numbers.
Change-Id: Ibd6b1ed7f1bd6e1f2e0fde53352055a4468f23e5
2019-01-26 19:36:12 +00:00
|
|
|
# don't run vty tests concurrently so that the ports don't conflict
|
2019-01-31 08:06:53 +00:00
|
|
|
vty-test:
|
|
|
|
$(MAKE) vty-test-logging
|
|
|
|
$(MAKE) vty-test-vty
|
add osmo_tdef API, originally adopted from osmo-bsc T_def
Move T_def from osmo-bsc to libosmocore as osmo_tdef. Adjust naming to be more
consistent. Upgrade to first class API:
- add timer grouping
- add generic vty support
- add mising API doc
- add C test
- add VTY transcript tests, also as examples for using the API
From osmo_fsm_inst_state_chg() API doc, cross reference to osmo_tdef API.
The root reason for moving to libosmocore is that I want to use the
mgw_endpoint_fsm in osmo-msc for inter-MSC handover, and hence want to move the
FSM to libosmo-mgcp-client. This FSM uses the T_def from osmo-bsc. Though the
mgw_endpoint_fsm's use of T_def is minimal, I intend to use the osmo_tdef API
in osmo-msc (and probably elsewhere) as well. libosmocore is the most sensible
place for this.
osmo_tdef provides:
- a list of Tnnnn (GSM) timers with description, unit and default value.
- vty UI to allow users to configure non-default timeouts.
- API to tie T timers to osmo_fsm states and set them on state transitions.
- a few standard units (minute, second, millisecond) as well as a custom unit
(which relies on the timer's human readable description to indicate the
meaning of the value).
- conversion for standard units: for example, some GSM timers are defined in
minutes, while our FSM definitions need timeouts in seconds. Conversion is
for convenience only and can be easily avoided via the custom unit.
By keeping separate osmo_tdef arrays, several groups of timers can be kept
separately. The VTY tests in tests/tdef/ showcase different schemes:
- tests/vty/tdef_vty_test_config_root.c:
Keep several timer definitions in separately named groups: showcase the
osmo_tdef_vty_groups*() API. Each timer group exists exactly once.
- tests/vty/tdef_vty_test_config_subnode.c:
Keep a single list of timers without separate grouping.
Put this list on a specific subnode below the CONFIG_NODE.
There could be several separate subnodes with timers like this, i.e.
continuing from this example, sets timers could be separated by placing
timers in specific config subnodes instead of using the global group name.
- tests/vty/tdef_vty_test_dynamic.c:
Dynamically allocate timer definitions per each new created object.
Thus there can be an arbitrary number of independent timer definitions, one
per allocated object.
T_def was introduced during the recent osmo-bsc refactoring for inter-BSC
handover, and has proven useful:
- without osmo_tdef, each invocation of osmo_fsm_inst_state_chg() needs to be
programmed with the right timeout value, for all code paths that invoke this
state change. It is a likely source of errors to get one of them wrong. By
defining a T timer exactly for an FSM state, the caller can merely invoke the
state change and trust on the original state definition to apply the correct
timeout.
- it is helpful to have a standardized config file UI to provide user
configurable timeouts, instead of inventing new VTY commands for each
separate application of T timer numbers.
Change-Id: Ibd6b1ed7f1bd6e1f2e0fde53352055a4468f23e5
2019-01-26 19:36:12 +00:00
|
|
|
$(MAKE) vty-test-tdef
|
2020-12-14 01:36:53 +00:00
|
|
|
$(MAKE) vty-test-ns2
|
2021-11-09 00:35:44 +00:00
|
|
|
$(MAKE) vty-test-stats
|
2019-01-31 08:06:53 +00:00
|
|
|
|
2018-09-10 15:18:28 +00:00
|
|
|
ctrl-test:
|
|
|
|
echo "No CTRL tests exist currently"
|