diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-26 13:35:15 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-26 13:35:15 +0200 |
commit | ce397dee70eb03358da6eb1c1ca19ed7cf155a62 (patch) | |
tree | 365cb05b7dda0fcfe098bd211128371b87ca0ec2 /tests/lapd | |
parent | 9e1cd5a5a5a431f30d4b418ef8f688d992814141 (diff) |
lapd: Extend the test to check if lapdm_channel_exit is idempotent
I have a crash with an older libosmocore and the sysmobts. I
am not sure how we can have a release for a channel where the
lapdm_channel has not gone through lapdm_channel_init. But to
prevent the crash we can promise lapdm_channel_exit to be idempotent.
It has been idempotent since f5a079f739c57d8be7c59149fd45475c402a45fc
Diffstat (limited to 'tests/lapd')
-rw-r--r-- | tests/lapd/lapd_test.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lapd/lapd_test.c b/tests/lapd/lapd_test.c index 1f986bc8..37c0db8d 100644 --- a/tests/lapd/lapd_test.c +++ b/tests/lapd/lapd_test.c @@ -344,6 +344,10 @@ static void test_lapdm_polling() /* clean up */ lapdm_channel_exit(&bts_to_ms_channel); lapdm_channel_exit(&ms_to_bts_channel); + + /* Check if exit is idempotent */ + lapdm_channel_exit(&bts_to_ms_channel); + lapdm_channel_exit(&ms_to_bts_channel); } static void test_lapdm_early_release() @@ -372,6 +376,9 @@ static void test_lapdm_early_release() /* clean up */ lapdm_channel_exit(&bts_to_ms_channel); + + /* Check if exit is idempotent */ + lapdm_channel_exit(&bts_to_ms_channel); } static void test_lapdm_contention_resolution() @@ -415,6 +422,9 @@ static void test_lapdm_contention_resolution() /* clean up */ lapdm_channel_exit(&bts_to_ms_channel); + + /* idempotent */ + lapdm_channel_exit(&bts_to_ms_channel); } int main(int argc, char **argv) |