alloc_algo_b: Select TRX with least assigned TFIs during TBF alloc

Before this patch, it would always allocate all TBFs on the first TRX
until all TFIs were filled, then second, and so on. But it would
actually fail around 8th MS requesting an UL TBF because despite a TFI
was successfuly assigned, because all USFs were already exhausted for
that PDCH.

Related: OS#1775
Change-Id: Iccfc8acfbfdc258ed16cc5af01f12b376fe73b72
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index d1fdfba..d4a5618 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -197,6 +197,7 @@
 	tfi = the_bts->tfi_find_free(GPRS_RLCMAC_DL_TBF, &trx_no, -1);
 	OSMO_ASSERT(tfi >= 0);
 	dl_tbf = tbf_alloc_dl_tbf(bts, ms, trx_no, true);
+	OSMO_ASSERT(dl_tbf);
 	dl_tbf->set_ta(0);
 	check_tbf(dl_tbf);