Add semaphore tests