From 27a86005f34e5ccc2f31aadefec916ffb4476d17 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Thu, 6 Sep 2018 17:21:02 +0200 Subject: measurement: fix unit-test test_lchan_meas_process_measurement The unit test that tests lchan_meas_process_measurement() only inputs test data to lchan_meas_process_measurement() but it is not checked if the interval end could be detected or not. - Add a return code to lchan_meas_process_measurement() - Ensure that the return code is checked in the unit-test Change-Id: I9e00ce683e8c44528804f65181dbfed9e85e3aed Related: OS#2975 --- src/common/measurement.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common') diff --git a/src/common/measurement.c b/src/common/measurement.c index 8d1babd3..33b1c115 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -706,10 +706,10 @@ int lchan_meas_check_compute(struct gsm_lchan *lchan, uint32_t fn) * l1sap.c every time a measurement indication is received. It collects the * measurement samples and automatically detects the end of the measurement * interval. */ -void lchan_meas_process_measurement(struct gsm_lchan *lchan, struct bts_ul_meas *ulm, uint32_t fn) +int lchan_meas_process_measurement(struct gsm_lchan *lchan, struct bts_ul_meas *ulm, uint32_t fn) { lchan_new_ul_meas(lchan, ulm, fn); - lchan_meas_check_compute(lchan, fn); + return lchan_meas_check_compute(lchan, fn); } /* Reset all measurement related struct members to their initial values. This -- cgit v1.2.3