test semaphore