idmapped-mounts: split out run_test() function