test_shm_mq: Improve regression tests.

Per discussion with Tom Lane.