Extend test to support gadget mode as well.