diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-12-17 21:48:47 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-12-19 17:53:13 +0000 |
commit | d9956d91ba1504deae248b3e1978de5e584f275f (patch) | |
tree | 70264d70b10c321b1faba6e6749c587555b4ab98 /tests | |
parent | f8dc5262070585e9c1b0166cc8b17fc6ada208a1 (diff) |
Remove dead code left over from NITB split
There still is a lot of dead code that we inherited from the NITB
days, let's remove more of it.
libtrau will be re-introduced as part of osmo-mgw later.
Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rw-r--r-- | tests/abis/Makefile.am | 1 | ||||
-rw-r--r-- | tests/bsc-nat-trie/Makefile.am | 1 | ||||
-rw-r--r-- | tests/bsc-nat/Makefile.am | 1 | ||||
-rw-r--r-- | tests/bsc/Makefile.am | 1 | ||||
-rw-r--r-- | tests/bsc/bsc_test.c | 1 | ||||
-rw-r--r-- | tests/bssap/Makefile.am | 1 | ||||
-rw-r--r-- | tests/bssap/bssap_test.c | 2 | ||||
-rw-r--r-- | tests/channel/channel_test.c | 3 | ||||
-rw-r--r-- | tests/gsm0408/Makefile.am | 1 | ||||
-rw-r--r-- | tests/gsm0408/gsm0408_test.c | 4 | ||||
-rw-r--r-- | tests/nanobts_omlattr/Makefile.am | 1 | ||||
-rw-r--r-- | tests/subscr/Makefile.am | 1 | ||||
-rw-r--r-- | tests/testsuite.at | 6 | ||||
-rw-r--r-- | tests/trau/Makefile.am | 43 | ||||
-rw-r--r-- | tests/trau/trau_test.c | 84 | ||||
-rw-r--r-- | tests/trau/trau_test.ok | 10 |
17 files changed, 4 insertions, 158 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 7b4656b24..9207434f0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,7 +3,6 @@ SUBDIRS = \ gsm0408 \ channel \ abis \ - trau \ subscr \ nanobts_omlattr \ bsc-nat \ diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am index 8dc624890..137321cb4 100644 --- a/tests/abis/Makefile.am +++ b/tests/abis/Makefile.am @@ -28,7 +28,6 @@ abis_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc-nat-trie/Makefile.am b/tests/bsc-nat-trie/Makefile.am index 6663897bf..d20bd0a5a 100644 --- a/tests/bsc-nat-trie/Makefile.am +++ b/tests/bsc-nat-trie/Makefile.am @@ -11,7 +11,6 @@ noinst_PROGRAMS = bsc_nat_trie_test bsc_nat_trie_test_SOURCES = bsc_nat_trie_test.c \ $(top_srcdir)/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c bsc_nat_trie_test_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) -lrt \ $(LIBOSMOSCCP_LIBS) $(LIBOSMOVTY_LIBS) \ diff --git a/tests/bsc-nat/Makefile.am b/tests/bsc-nat/Makefile.am index 74838a984..7f6730e26 100644 --- a/tests/bsc-nat/Makefile.am +++ b/tests/bsc-nat/Makefile.am @@ -46,7 +46,6 @@ bsc_nat_test_LDADD = \ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am index 90bbb4ac7..96f87f5a0 100644 --- a/tests/bsc/Makefile.am +++ b/tests/bsc/Makefile.am @@ -34,7 +34,6 @@ bsc_test_SOURCES = \ bsc_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index aedc018db..1d7baa1cb 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -30,7 +30,6 @@ #include <osmocom/bsc/osmo_bsc.h> #include <osmocom/bsc/bsc_msc_data.h> #include <osmocom/bsc/gsm_04_80.h> -#include <osmocom/bsc/gsm_subscriber.h> #include <osmocom/core/application.h> #include <osmocom/core/backtrace.h> diff --git a/tests/bssap/Makefile.am b/tests/bssap/Makefile.am index 4bbe9eab5..77309c983 100644 --- a/tests/bssap/Makefile.am +++ b/tests/bssap/Makefile.am @@ -36,7 +36,6 @@ bssap_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/bssap/bssap_test.c b/tests/bssap/bssap_test.c index 2b154c100..579cae237 100644 --- a/tests/bssap/bssap_test.c +++ b/tests/bssap/bssap_test.c @@ -82,7 +82,7 @@ void test_cell_identifier() struct gsm_network *net; struct bsc_msc_data *msc; - net = bsc_network_init(NULL, 1, 1, NULL); + net = bsc_network_init(NULL, 1, 1); net->bsc_data->rf_ctrl = talloc_zero(NULL, struct osmo_bsc_rf); net->bsc_data->rf_ctrl->policy = S_RF_ON; diff --git a/tests/channel/channel_test.c b/tests/channel/channel_test.c index ec2927e66..7957b14a7 100644 --- a/tests/channel/channel_test.c +++ b/tests/channel/channel_test.c @@ -28,7 +28,6 @@ #include <osmocom/bsc/common_bsc.h> #include <osmocom/bsc/abis_rsl.h> #include <osmocom/bsc/debug.h> -#include <osmocom/bsc/gsm_subscriber.h> void test_bts_debug_print(void) { @@ -39,7 +38,7 @@ void test_bts_debug_print(void) printf("Testing the lchan printing:"); /* Create a dummy network */ - network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + network = bsc_network_init(tall_bsc_ctx, 1, 1); if (!network) exit(1); /* Add a BTS with some reasonanbly non-zero id */ diff --git a/tests/gsm0408/Makefile.am b/tests/gsm0408/Makefile.am index 3bf4a22aa..c5ae061f5 100644 --- a/tests/gsm0408/Makefile.am +++ b/tests/gsm0408/Makefile.am @@ -25,7 +25,6 @@ gsm0408_test_SOURCES = \ gsm0408_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index d2085a9d9..784c3e995 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -25,7 +25,7 @@ #include <arpa/inet.h> #include <osmocom/bsc/common_bsc.h> -#include <osmocom/bsc/gsm_subscriber.h> +#include <osmocom/bsc/gsm_data.h> #include <osmocom/bsc/gsm_data_shared.h> #include <osmocom/bsc/debug.h> #include <osmocom/bsc/arfcn_range_encode.h> @@ -715,7 +715,7 @@ int main(int argc, char **argv) osmo_init_logging(&log_info); log_set_log_level(osmo_stderr_target, LOGL_INFO); - net = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + net = bsc_network_init(tall_bsc_ctx, 1, 1); if (!net) { printf("Network init failure.\n"); return EXIT_FAILURE; diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am index 4b4951806..336ccaf03 100644 --- a/tests/nanobts_omlattr/Makefile.am +++ b/tests/nanobts_omlattr/Makefile.am @@ -24,7 +24,6 @@ nanobts_omlattr_test_SOURCES = \ nanobts_omlattr_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(LIBOSMOCORE_LIBS) \ diff --git a/tests/subscr/Makefile.am b/tests/subscr/Makefile.am index 5b770bcb2..b743063fc 100644 --- a/tests/subscr/Makefile.am +++ b/tests/subscr/Makefile.am @@ -33,7 +33,6 @@ bsc_subscr_test_SOURCES = \ bsc_subscr_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/testsuite.at b/tests/testsuite.at index 13f54e119..6ef3f2910 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -39,12 +39,6 @@ cat $abs_srcdir/bsc/bsc_test.ok > expout AT_CHECK([$abs_top_builddir/tests/bsc/bsc_test], [], [expout], [ignore]) AT_CLEANUP -AT_SETUP([trau]) -AT_KEYWORDS([trau]) -cat $abs_srcdir/trau/trau_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/trau/trau_test], [], [expout], [ignore]) -AT_CLEANUP - AT_SETUP([nanobts_omlattr]) AT_KEYWORDS([nanobts_omlattr]) cat $abs_srcdir/nanobts_omlattr/nanobts_omlattr_test.ok > expout diff --git a/tests/trau/Makefile.am b/tests/trau/Makefile.am deleted file mode 100644 index b51c18452..000000000 --- a/tests/trau/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - -I$(top_srcdir)/include \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - -ggdb3 \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBSMPP34_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - $(NULL) - -AM_LDFLAGS = \ - $(COVERAGE_LDFLAGS) \ - $(NULL) - -EXTRA_DIST = \ - trau_test.ok \ - $(NULL) - -noinst_PROGRAMS = \ - trau_test \ - $(NULL) - -trau_test_SOURCES = \ - trau_test.c \ - $(NULL) - -trau_test_LDADD = \ - $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ - $(top_builddir)/src/libcommon/libcommon.a \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOABIS_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBSMPP34_LIBS) \ - $(LIBOSMOVTY_LIBS) \ - $(LIBRARY_DL) \ - $(NULL) diff --git a/tests/trau/trau_test.c b/tests/trau/trau_test.c deleted file mode 100644 index c8c9a5ef0..000000000 --- a/tests/trau/trau_test.c +++ /dev/null @@ -1,84 +0,0 @@ -/* (C) 2013 by Andreas Eversberg <jolly@eversberg.eu> - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ - -#include <osmocom/abis/trau_frame.h> -#include <osmocom/bsc/trau_mux.h> -#include <osmocom/core/msgb.h> - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> - -void test_trau_fr_efr(unsigned char *data) -{ - struct decoded_trau_frame tf; - struct msgb *msg; - struct gsm_data_frame *frame; - - printf("Testing TRAU FR transcoding.\n"); - data[0] = 0xd0; - trau_encode_fr(&tf, data); - tf.c_bits[11] = 0; /* clear BFI */ - msg = trau_decode_fr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_TCHF_FRAME); - OSMO_ASSERT(!memcmp(frame->data, data, 33)); - msgb_free(msg); - - printf("Testing TRAU EFR transcoding.\n"); - data[0] = 0xc0; - trau_encode_efr(&tf, data); - OSMO_ASSERT(tf.d_bits[0] == 1); /* spare bit must be 1 */ - tf.c_bits[11] = 0; /* clear BFI */ - msg = trau_decode_efr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_TCHF_FRAME_EFR); - OSMO_ASSERT(!memcmp(frame->data, data, 31)); - - printf("Testing TRAU EFR decoding with CRC error.\n"); - tf.d_bits[0] = 0; /* spare bit must be included */ - msg = trau_decode_efr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_BAD_FRAME); - msgb_free(msg); -} - -int main() -{ - unsigned char data[33]; - int i; - - msgb_talloc_ctx_init(NULL, 0); - - memset(data, 0x00, sizeof(data)); - test_trau_fr_efr(data); - memset(data, 0xff, sizeof(data)); - test_trau_fr_efr(data); - srandom(42); - for (i = 0; i < sizeof(data); i++) - data[i] = random(); - test_trau_fr_efr(data); - printf("Done\n"); - return 0; -} - -/* stubs */ -void vty_out() {} diff --git a/tests/trau/trau_test.ok b/tests/trau/trau_test.ok deleted file mode 100644 index ef7123073..000000000 --- a/tests/trau/trau_test.ok +++ /dev/null @@ -1,10 +0,0 @@ -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Done |