Small refactor of tests for mysqlctl.