tests: prefer dynamically allocated buffers