Test semaphores