test refactoring: introduce a new 'wait' arg for get_test_subprocess() so that we avoid to explicitly call wait_for_pid() every time; also, use a more robust approach to synchronize the whole process: instead of waiting for the PID to appear in the list of process PIDs, have the test subprocess create a file and wait until that gets written on disk.
test refactoring: introduce a new 'wait' arg for get_test_subprocess() so that we avoid to explicitly call wait_for_pid() every time; also, use a more robust approach to synchronize the whole process: instead of waiting for the PID to appear in the list of process PIDs, have the test subprocess create a file and wait until that gets written on disk.

ztop/psutil,ztop/psutil,ztop/psutil,ztop/psutil