Hi Thomas, thank you for your remarks!
>> +int main(int argc, char **argv) >> +{ >> + int ret; >> + >> + g_test_init(&argc, &argv, NULL); >> + >> + global_qtest = qtest_initf("-machine microbit"); >> + >> + qtest_add_func("/microbit/nrf51/nvmc", test_nrf51_nvmc); >> + >> + ret = g_test_run(); >> + >> + qtest_quit(global_qtest); >> + return ret; >> +} > > If you could do me a big favour, then please try to write new qtests > without the global_qtest variable. I.e. move the qtest_initf into the > test_nrf51_nvmc function and pass around the local test state variable > there to qtest_writel() and friends. I just started yet another clean up > attempt for some other files, e.g. see here: > > https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg02196.html > > (but if this is too much cumbersome right now for you, I also won't > object this patch in the current shape - we can still clean this up later) > I would like to leave the test like this at the moment. We will add additional devices in the future and i would like to postpone refactoring of the test until the current patch series is merged. Best, Steffen