diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-07-16 18:28:22 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-07-16 19:24:16 +0200 |
commit | 7b3675bf7a6203467e6a72e255544365cefc3b06 (patch) | |
tree | 86f917be33a13d6dcfc2e6c94b741e1f00a44f9f /tests | |
parent | 0f352a6f2293534fa31bfe81cf85ea7dbe317481 (diff) |
alloc/test: Fix trx_no assertion
Currently the value of trx_no2 is used in the assertion, even if the
call to tfi_find_free has failed.
This commit fixes the asserted expression to only compare the trx_no
values if the function call has succeeded.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'tests')
-rw-r--r-- | tests/alloc/AllocTest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index ac67ce95..429f588a 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -633,7 +633,8 @@ static unsigned alloc_many_tbfs(BTS *the_bts, unsigned min_class, tfi2 = the_bts->tfi_find_free(dir, &trx_no2, ms->current_trx()->trx_no); OSMO_ASSERT(tfi != tfi2); - OSMO_ASSERT(trx_no2 == ms->current_trx()->trx_no); + OSMO_ASSERT(tfi2 < 0 || + trx_no2 == ms->current_trx()->trx_no); } ms_class += 1; |