This part never runs with the current implementation because the setresuid call currently aborts (as intended).
At this point, we can only abort the process because we have already switched credentials on other threads. Returning an error would still leave the process in an inconsistent state. The new xtest needs root privileges to run.