rtl_test: refactoring bugfixes