added test when_get_buffer_from_ring.c