userenv/tests: Rewrite the test to cope with multiple blocks of tests.