Added test cases for sid allocation.

This revealed a few bugs:
* when sid allocator is full, then uhub will loop indefinitely when allocating one more (unlikely to occur).
* looking up a user object based on a sid that is out of range (off by one) returns invalid memory.
This commit is contained in:
Jan Vidar Krey
2010-02-18 16:02:13 +01:00
parent 963416ad73
commit 59ed268f4d
3 changed files with 154 additions and 7 deletions

View File

@@ -167,16 +167,17 @@ adcrush_SOURCES := src/tools/adcrush.c
admin_SOURCES := src/tools/admin.c
autotest_SOURCES := \
autotest/test_message.tcc \
autotest/test_eventqueue.tcc \
autotest/test_hub.tcc \
autotest/test_inf.tcc \
autotest/test_ipfilter.tcc \
autotest/test_list.tcc \
autotest/test_memory.tcc \
autotest/test_ipfilter.tcc \
autotest/test_inf.tcc \
autotest/test_hub.tcc \
autotest/test_message.tcc \
autotest/test_misc.tcc \
autotest/test_sid.tcc \
autotest/test_tiger.tcc \
autotest/test_usermanager.tcc \
autotest/test_eventqueue.tcc
autotest/test_usermanager.tcc
autotest_OBJECTS = autotest.o