[PATCH v2] dmime/tests: Break out of loop if we fail to get segment pointer