aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/gsm0408
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/tests/gsm0408')
-rw-r--r--openbsc/tests/gsm0408/Makefile.am3
-rw-r--r--openbsc/tests/gsm0408/gsm0408_test.c8
2 files changed, 8 insertions, 3 deletions
diff --git a/openbsc/tests/gsm0408/Makefile.am b/openbsc/tests/gsm0408/Makefile.am
index ff8caf999..f98c673ea 100644
--- a/openbsc/tests/gsm0408/Makefile.am
+++ b/openbsc/tests/gsm0408/Makefile.am
@@ -1,5 +1,6 @@
INCLUDES = $(all_includes) -I$(top_srcdir)/include
+AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS)
noinst_PROGRAMS = gsm0408_test
gsm0408_test_SOURCES = gsm0408_test.c
-gsm0408_test_LDADD = $(top_builddir)/src/libbsc.a $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a -ldbi
+gsm0408_test_LDADD = $(top_builddir)/src/libbsc.a $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a $(LIBOSMOCORE_LIBS) -ldbi
diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c
index bbf812965..287d4ee99 100644
--- a/openbsc/tests/gsm0408/gsm0408_test.c
+++ b/openbsc/tests/gsm0408/gsm0408_test.c
@@ -23,6 +23,8 @@
#include <stdio.h>
#include <stdlib.h>
+#include <arpa/inet.h>
+
#include <openbsc/gsm_04_08.h>
#include <openbsc/gsm_subscriber.h>
#include <openbsc/debug.h>
@@ -52,13 +54,13 @@ static void test_location_area_identifier(void)
* Test the default/test setup. Coming from
* bsc_hack.c dumps
*/
- gsm0408_generate_lai(&lai48, 1, 1, 1);
+ gsm48_generate_lai(&lai48, 1, 1, 1);
COMPARE(lai48.digits[0], ==, 0x00);
COMPARE(lai48.digits[1], ==, 0xF1);
COMPARE(lai48.digits[2], ==, 0x10);
COMPARE(lai48.lac, ==, htons(0x0001));
- gsm0408_generate_lai(&lai48, 602, 1, 15);
+ gsm48_generate_lai(&lai48, 602, 1, 15);
COMPARE(lai48.digits[0], ==, 0x06);
COMPARE(lai48.digits[1], ==, 0xF2);
COMPARE(lai48.digits[2], ==, 0x10);
@@ -97,6 +99,8 @@ int main(int argc, char** argv)
{
test_location_area_identifier();
test_mi_functionality();
+
+ exit(0);
}