(cherry picked from commit 1f14705938)
1f14705938
This test runs only under root, which is required for the user-switch `-u` option to work. Closes #537.