Refactored tests into smaller pieces as I chase failures.

The failures on OpenBSD are elusive, so I am splitting things
up into smaller tests.