test/event: replace sprintf with snprintf