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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/20655 ) Change subject: tests/power_test: do not assert in apply_power_test() ...................................................................... tests/power_test: do not assert in apply_power_test() Instead, print the actual vs expected values. Change-Id: Ie88e275ba78cef7a9ba20d34c269881216fb0ce3 Related: SYS#4916 --- M tests/power/power_test.c M tests/power/power_test.ok 2 files changed, 57 insertions(+), 28 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/tests/power/power_test.c b/tests/power/power_test.c index 0d3457a..c3bfdf9 100644 --- a/tests/power/power_test.c +++ b/tests/power/power_test.c @@ -55,11 +55,16 @@ static inline void apply_power_test(struct gsm_lchan *lchan, int rxlev, int exp_ret, uint8_t exp_current) { - int ret = lchan_ms_pwr_ctrl(lchan, lchan->ms_power_ctrl.current, rxlev); + uint8_t old; + int ret; - printf("power control [%d]: MS current power %u\n", ret, lchan->ms_power_ctrl.current); - OSMO_ASSERT(ret == exp_ret); - OSMO_ASSERT(lchan->ms_power_ctrl.current == exp_current); + old = lchan->ms_power_ctrl.current; + ret = lchan_ms_pwr_ctrl(lchan, lchan->ms_power_ctrl.current, rxlev); + + printf("lchan_ms_pwr_ctrl(RxLvl=%d dBm) returns %d (expected %d)\n", + rxlev, ret, exp_ret); + printf("\tMS current power %u -> %u (expected %u)\n", + old, lchan->ms_power_ctrl.current, exp_current); } static void test_power_loop(void) diff --git a/tests/power/power_test.ok b/tests/power/power_test.ok index e325bb7..6b7a0d4 100644 --- a/tests/power/power_test.ok +++ b/tests/power/power_test.ok @@ -1,28 +1,52 @@ Testing power loop... Starting test case 'test_power_loop' -power control [0]: MS current power 15 -power control [1]: MS current power 13 -power control [1]: MS current power 11 -power control [1]: MS current power 9 -power control [1]: MS current power 7 -power control [1]: MS current power 5 -power control [0]: MS current power 5 -power control [1]: MS current power 3 -power control [1]: MS current power 2 -power control [0]: MS current power 2 -power control [1]: MS current power 0 -power control [0]: MS current power 0 -power control [1]: MS current power 30 -power control [1]: MS current power 29 -power control [0]: MS current power 29 -power control [0]: MS current power 29 -power control [1]: MS current power 1 -power control [1]: MS current power 5 -power control [1]: MS current power 9 -power control [1]: MS current power 10 -power control [1]: MS current power 9 -power control [1]: MS current power 14 -power control [0]: MS current power 14 -power control [1]: MS current power 15 +lchan_ms_pwr_ctrl(RxLvl=-60 dBm) returns 0 (expected 0) + MS current power 15 -> 15 (expected 15) +lchan_ms_pwr_ctrl(RxLvl=-90 dBm) returns 1 (expected 1) + MS current power 15 -> 13 (expected 13) +lchan_ms_pwr_ctrl(RxLvl=-90 dBm) returns 1 (expected 1) + MS current power 13 -> 11 (expected 11) +lchan_ms_pwr_ctrl(RxLvl=-90 dBm) returns 1 (expected 1) + MS current power 11 -> 9 (expected 9) +lchan_ms_pwr_ctrl(RxLvl=-90 dBm) returns 1 (expected 1) + MS current power 9 -> 7 (expected 7) +lchan_ms_pwr_ctrl(RxLvl=-90 dBm) returns 1 (expected 1) + MS current power 7 -> 5 (expected 5) +lchan_ms_pwr_ctrl(RxLvl=-75 dBm) returns 0 (expected 0) + MS current power 5 -> 5 (expected 5) +lchan_ms_pwr_ctrl(RxLvl=-90 dBm) returns 1 (expected 1) + MS current power 5 -> 3 (expected 3) +lchan_ms_pwr_ctrl(RxLvl=-90 dBm) returns 1 (expected 1) + MS current power 3 -> 2 (expected 2) +lchan_ms_pwr_ctrl(RxLvl=-90 dBm) returns 0 (expected 0) + MS current power 2 -> 2 (expected 2) +lchan_ms_pwr_ctrl(RxLvl=-90 dBm) returns 1 (expected 1) + MS current power 2 -> 0 (expected 0) +lchan_ms_pwr_ctrl(RxLvl=-90 dBm) returns 0 (expected 0) + MS current power 0 -> 0 (expected 0) +lchan_ms_pwr_ctrl(RxLvl=-90 dBm) returns 1 (expected 1) + MS current power 0 -> 30 (expected 30) +lchan_ms_pwr_ctrl(RxLvl=-90 dBm) returns 1 (expected 1) + MS current power 30 -> 29 (expected 29) +lchan_ms_pwr_ctrl(RxLvl=-90 dBm) returns 0 (expected 0) + MS current power 29 -> 29 (expected 29) +lchan_ms_pwr_ctrl(RxLvl=-75 dBm) returns 0 (expected 0) + MS current power 29 -> 29 (expected 29) +lchan_ms_pwr_ctrl(RxLvl=-45 dBm) returns 1 (expected 1) + MS current power 29 -> 1 (expected 1) +lchan_ms_pwr_ctrl(RxLvl=-45 dBm) returns 1 (expected 1) + MS current power 1 -> 5 (expected 5) +lchan_ms_pwr_ctrl(RxLvl=-45 dBm) returns 1 (expected 1) + MS current power 5 -> 9 (expected 9) +lchan_ms_pwr_ctrl(RxLvl=-73 dBm) returns 1 (expected 1) + MS current power 9 -> 10 (expected 10) +lchan_ms_pwr_ctrl(RxLvl=-77 dBm) returns 1 (expected 1) + MS current power 10 -> 9 (expected 9) +lchan_ms_pwr_ctrl(RxLvl=-73 dBm) returns 1 (expected 1) + MS current power 9 -> 14 (expected 14) +lchan_ms_pwr_ctrl(RxLvl=-60 dBm) returns 0 (expected 0) + MS current power 14 -> 14 (expected 14) +lchan_ms_pwr_ctrl(RxLvl=-40 dBm) returns 1 (expected 1) + MS current power 14 -> 15 (expected 15) Power loop test OK -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/20655 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ie88e275ba78cef7a9ba20d34c269881216fb0ce3 Gerrit-Change-Number: 20655 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201015/c55e518b/attachment.htm>