[PATCH 03/11] dssenh/tests: move test loop out of sub function