[PATCH 2/3] reg/tests: Give 'query' tests some structure