Adjust tests to work in gadget mode as well.