Change in ...osmo-msc[master]: tests: share stubs.h from msc_vlr_test as stubs.c

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Jun 3 15:05:42 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-msc/+/14352 )

Change subject: tests: share stubs.h from msc_vlr_test as stubs.c
......................................................................

tests: share stubs.h from msc_vlr_test as stubs.c

We also need stubs for the upcoming db_sms tests.

Due to a known bug of automake [1], we cannot use 'subdir-objects',
so as a side effect this change introduces some autoreconf warnings.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752993

Change-Id: I8846c940f2695fd33e1007fecac83e73f508bb34
---
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_ss.c
M tests/msc_vlr/msc_vlr_test_umts_authen.c
R tests/stubs.c
14 files changed, 17 insertions(+), 13 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am
index f9a9224..0e15036 100644
--- a/tests/msc_vlr/Makefile.am
+++ b/tests/msc_vlr/Makefile.am
@@ -13,6 +13,7 @@
 	$(LIBOSMOABIS_CFLAGS) \
 	$(LIBOSMOSIGTRAN_CFLAGS) \
 	$(LIBOSMORANAP_CFLAGS) \
+	$(LIBOSMONETIF_CFLAGS) \
 	$(LIBASN1C_CFLAGS) \
 	$(LIBOSMOMGCPCLIENT_CFLAGS) \
 	$(LIBOSMOGSUPCLIENT_CFLAGS) \
@@ -46,7 +47,6 @@
 
 noinst_HEADERS = \
 	msc_vlr_tests.h \
-	stubs.h \
 	$(NULL)
 
 EXTRA_DIST = \
@@ -94,61 +94,73 @@
 msc_vlr_test_no_authen_SOURCES = \
 	msc_vlr_test_no_authen.c \
 	msc_vlr_tests.c \
+	$(srcdir)/../stubs.c \
 	$(NULL)
 
 msc_vlr_test_gsm_authen_SOURCES = \
 	msc_vlr_test_gsm_authen.c \
 	msc_vlr_tests.c \
+	$(srcdir)/../stubs.c \
 	$(NULL)
 
 msc_vlr_test_gsm_ciph_SOURCES = \
 	msc_vlr_test_gsm_ciph.c \
 	msc_vlr_tests.c \
+	$(srcdir)/../stubs.c \
 	$(NULL)
 
 msc_vlr_test_umts_authen_SOURCES = \
 	msc_vlr_test_umts_authen.c \
 	msc_vlr_tests.c \
+	$(srcdir)/../stubs.c \
 	$(NULL)
 
 msc_vlr_test_authen_reuse_SOURCES = \
 	msc_vlr_test_authen_reuse.c \
 	msc_vlr_tests.c \
+	$(srcdir)/../stubs.c \
 	$(NULL)
 
 msc_vlr_test_hlr_reject_SOURCES = \
 	msc_vlr_test_hlr_reject.c \
 	msc_vlr_tests.c \
+	$(srcdir)/../stubs.c \
 	$(NULL)
 
 msc_vlr_test_hlr_timeout_SOURCES = \
 	msc_vlr_test_hlr_timeout.c \
 	msc_vlr_tests.c \
+	$(srcdir)/../stubs.c \
 	$(NULL)
 
 msc_vlr_test_ms_timeout_SOURCES = \
 	msc_vlr_test_ms_timeout.c \
 	msc_vlr_tests.c \
+	$(srcdir)/../stubs.c \
 	$(NULL)
 
 msc_vlr_test_reject_concurrency_SOURCES = \
 	msc_vlr_test_reject_concurrency.c \
 	msc_vlr_tests.c \
+	$(srcdir)/../stubs.c \
 	$(NULL)
 
 msc_vlr_test_call_SOURCES = \
 	msc_vlr_test_call.c \
 	msc_vlr_tests.c \
+	$(srcdir)/../stubs.c \
 	$(NULL)
 
 msc_vlr_test_rest_SOURCES = \
 	msc_vlr_test_rest.c \
 	msc_vlr_tests.c \
+	$(srcdir)/../stubs.c \
 	$(NULL)
 
 msc_vlr_test_ss_SOURCES = \
 	msc_vlr_test_ss.c \
 	msc_vlr_tests.c \
+	$(srcdir)/../stubs.c \
 	$(NULL)
 
 .PHONY: update_exp
diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.c b/tests/msc_vlr/msc_vlr_test_authen_reuse.c
index 9eadec7..d73a5f8 100644
--- a/tests/msc_vlr/msc_vlr_test_authen_reuse.c
+++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.c
@@ -24,7 +24,6 @@
 /* NOTE that further auth re-use tests exist in msc_vlr_test_hlr_reject.c */
 
 #include "msc_vlr_tests.h"
-#include "stubs.h"
 
 static void _test_auth_reuse(enum osmo_rat_type via_ran,
 			     int set_max_reuse_count,
diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c
index b31239e..6805f1a 100644
--- a/tests/msc_vlr/msc_vlr_test_call.c
+++ b/tests/msc_vlr/msc_vlr_test_call.c
@@ -22,7 +22,6 @@
  */
 
 #include "msc_vlr_tests.h"
-#include "stubs.h"
 
 #include <osmocom/msc/gsm_04_08.h>
 
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
index 805ae64..8776e03 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
@@ -22,7 +22,6 @@
  */
 
 #include "msc_vlr_tests.h"
-#include "stubs.h"
 
 static void test_gsm_authen()
 {
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
index ceb17a5..c76cba4 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
+++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
@@ -22,7 +22,6 @@
  */
 
 #include "msc_vlr_tests.h"
-#include "stubs.h"
 
 static const struct osmo_gsm48_classmark classmark = {
 	// TODO
diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.c b/tests/msc_vlr/msc_vlr_test_hlr_reject.c
index 1134d89..45aaa8c 100644
--- a/tests/msc_vlr/msc_vlr_test_hlr_reject.c
+++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.c
@@ -22,7 +22,6 @@
  */
 
 #include "msc_vlr_tests.h"
-#include "stubs.h"
 
 static void test_hlr_rej_auth_info_unknown_imsi()
 {
diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.c b/tests/msc_vlr/msc_vlr_test_hlr_timeout.c
index af5441b..abc7c5b 100644
--- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.c
+++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.c
@@ -22,7 +22,6 @@
  */
 
 #include "msc_vlr_tests.h"
-#include "stubs.h"
 
 #include <osmocom/core/logging.h>
 
diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.c b/tests/msc_vlr/msc_vlr_test_ms_timeout.c
index 450909f..91f00ef 100644
--- a/tests/msc_vlr/msc_vlr_test_ms_timeout.c
+++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.c
@@ -22,7 +22,6 @@
  */
 
 #include "msc_vlr_tests.h"
-#include "stubs.h"
 
 static void test_ms_timeout_lu_auth_resp()
 {
diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.c b/tests/msc_vlr/msc_vlr_test_no_authen.c
index b3289f3..ae77252 100644
--- a/tests/msc_vlr/msc_vlr_test_no_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_no_authen.c
@@ -22,7 +22,6 @@
  */
 
 #include "msc_vlr_tests.h"
-#include "stubs.h"
 
 static void test_no_authen()
 {
diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.c b/tests/msc_vlr/msc_vlr_test_reject_concurrency.c
index 7eaedb2..fe53469 100644
--- a/tests/msc_vlr/msc_vlr_test_reject_concurrency.c
+++ b/tests/msc_vlr/msc_vlr_test_reject_concurrency.c
@@ -22,7 +22,6 @@
  */
 
 #include "msc_vlr_tests.h"
-#include "stubs.h"
 
 static void test_reject_2nd_conn()
 {
diff --git a/tests/msc_vlr/msc_vlr_test_rest.c b/tests/msc_vlr/msc_vlr_test_rest.c
index 620652c..1b998ad 100644
--- a/tests/msc_vlr/msc_vlr_test_rest.c
+++ b/tests/msc_vlr/msc_vlr_test_rest.c
@@ -22,7 +22,7 @@
  */
 
 #include "msc_vlr_tests.h"
-#include "stubs.h"
+
 #include <osmocom/msc/vlr.h>
 
 #if 0
diff --git a/tests/msc_vlr/msc_vlr_test_ss.c b/tests/msc_vlr/msc_vlr_test_ss.c
index e4b3a4e..978ceae 100644
--- a/tests/msc_vlr/msc_vlr_test_ss.c
+++ b/tests/msc_vlr/msc_vlr_test_ss.c
@@ -21,7 +21,6 @@
  */
 
 #include "msc_vlr_tests.h"
-#include "stubs.h"
 
 #define IMSI "901700000004620"
 
diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.c b/tests/msc_vlr/msc_vlr_test_umts_authen.c
index cb8a032..a89b0d1 100644
--- a/tests/msc_vlr/msc_vlr_test_umts_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_umts_authen.c
@@ -22,7 +22,6 @@
  */
 
 #include "msc_vlr_tests.h"
-#include "stubs.h"
 
 static void _test_umts_authen(enum osmo_rat_type via_ran)
 {
diff --git a/tests/msc_vlr/stubs.h b/tests/stubs.c
similarity index 96%
rename from tests/msc_vlr/stubs.h
rename to tests/stubs.c
index bf55baa..d011a31 100644
--- a/tests/msc_vlr/stubs.h
+++ b/tests/stubs.c
@@ -18,6 +18,9 @@
  *
  */
 
+#include <osmocom/core/linuxlist.h>
+#include <osmocom/netif/stream.h>
+
 void osmo_stream_srv_link_set_data(struct osmo_stream_srv_link *link, void *data) {}
 struct osmo_fd *osmo_stream_srv_get_ofd(struct osmo_stream_srv *srv) { return NULL; }
 void osmo_stream_srv_destroy(struct osmo_stream_srv *conn) {}

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/14352
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I8846c940f2695fd33e1007fecac83e73f508bb34
Gerrit-Change-Number: 14352
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190603/9de44716/attachment.htm>


More information about the gerrit-log mailing list