qa: add O_TRUNC test

From: Yan, Zheng <yan.zheng@intel.com>

Simple reproducer for #5453, modified to run for a finite number of
iterations.

Signed-off-by: Sage Weil <sage@inktank.com>