aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-16 01:56:37 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-10-14 01:23:28 +0200
commit21142f789812553b56f493d79184f5a31ab7b1cd (patch)
tree9de38f96dff4c80008c04460db5a00053c1a5412 /tests
parentb058778df1c1ef3476aefd574c7278d11d385ade (diff)
msgb ctx: use new msgb_talloc_ctx_init() in various main()s
Diffstat (limited to 'tests')
-rw-r--r--tests/agch/agch_test.c5
-rw-r--r--tests/cipher/cipher_test.c5
-rw-r--r--tests/handover/handover_test.c4
-rw-r--r--tests/paging/paging_test.c5
4 files changed, 4 insertions, 15 deletions
diff --git a/tests/agch/agch_test.c b/tests/agch/agch_test.c
index 4175bdd6..e275c644 100644
--- a/tests/agch/agch_test.c
+++ b/tests/agch/agch_test.c
@@ -224,11 +224,8 @@ static void test_agch_queue_length_computation(void)
int main(int argc, char **argv)
{
- void *tall_msgb_ctx;
-
tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context");
- tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb");
- msgb_set_talloc_ctx(tall_msgb_ctx);
+ msgb_talloc_ctx_init(tall_bts_ctx, 0);
bts_log_init(NULL);
diff --git a/tests/cipher/cipher_test.c b/tests/cipher/cipher_test.c
index a175012f..c913925e 100644
--- a/tests/cipher/cipher_test.c
+++ b/tests/cipher/cipher_test.c
@@ -66,11 +66,8 @@ static void test_cipher_parsing(void)
int main(int argc, char **argv)
{
- void *tall_msgb_ctx;
-
tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context");
- tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb");
- msgb_set_talloc_ctx(tall_msgb_ctx);
+ msgb_talloc_ctx_init(tall_bts_ctx, 0);
bts_log_init(NULL);
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index e1f4d86d..d1dc34ad 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -58,7 +58,6 @@ int main(int argc, char **argv)
{
struct gsm_bts_role_bts *btsb;
void *tall_bts_ctx;
- void *tall_msgb_ctx;
struct e1inp_line *line;
struct gsm_lchan *lchan;
struct osmo_phsap_prim nl1sap;
@@ -67,8 +66,7 @@ int main(int argc, char **argv)
int i;
tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context");
- tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb");
- msgb_set_talloc_ctx(tall_msgb_ctx);
+ msgb_talloc_ctx_init(tall_bts_ctx, 0);
bts_log_init(NULL);
osmo_stderr_target->categories[DHO].loglevel = LOGL_DEBUG;
diff --git a/tests/paging/paging_test.c b/tests/paging/paging_test.c
index de839e47..1d5f2162 100644
--- a/tests/paging/paging_test.c
+++ b/tests/paging/paging_test.c
@@ -112,11 +112,8 @@ static void test_paging_sleep(void)
int main(int argc, char **argv)
{
- void *tall_msgb_ctx;
-
tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context");
- tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb");
- msgb_set_talloc_ctx(tall_msgb_ctx);
+ msgb_talloc_ctx_init(tall_bts_ctx, 0);
bts_log_init(NULL);