Add tests for protected mode.
Add tests for protected mode.

With noted exception where we don't correctly test for ownership
by user `singularity`, this should cover the new features.

Trophime/singularity,Trophime/singularity,Trophime/singularity,Trophime/singularity