summaryrefslogtreecommitdiffstats
path: root/tests/sms/sms_test.c
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2014-03-07 20:42:03 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-03-20 22:02:46 +0100
commite4c50d5a43f129aa4bdfaf62a7238c4db671974b (patch)
tree2709bc405851df439a77d11b1c15a0b71e3124d7 /tests/sms/sms_test.c
parent1512ea6452c123fbf7da325422b4378d64b90087 (diff)
sms_test: Do not crash on logging.
Diffstat (limited to 'tests/sms/sms_test.c')
-rw-r--r--tests/sms/sms_test.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/sms/sms_test.c b/tests/sms/sms_test.c
index 755b3213..cdd41585 100644
--- a/tests/sms/sms_test.c
+++ b/tests/sms/sms_test.c
@@ -31,6 +31,11 @@
#include <osmocom/core/msgb.h>
#include <osmocom/core/utils.h>
+#include <osmocom/core/logging.h>
+#include <osmocom/core/application.h>
+
+struct log_info fake_log_info = {};
+
struct test_case {
const uint8_t *input;
const uint16_t input_length;
@@ -278,6 +283,9 @@ int main(int argc, char** argv)
int nchars;
char result[256];
+ /* Fake logging. */
+ osmo_init_logging(&fake_log_info);
+
/* test 7-bit encoding */
for (i = 0; i < ARRAY_SIZE(test_encode); ++i) {
/* Test legacy function (return value only) */