Patch from oftest-tools.

commit afd5fd3.