proj: copy smalloc in tests