I noticed this in timestamp_abort/main.c but it likely applies to other test programs as well. The call to testutil_cleanup will unconditionally remove the database home directory unless opts->preserve is set.
This is a problem when there is an error and the erroneous database is removed.