Add lockless ring buffer test code