5 class TestDropbear(infra.basetest.BRTest):
6 config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
8 BR2_TARGET_GENERIC_ROOT_PASSWD="testpwd"
10 BR2_PACKAGE_DROPBEAR=y
11 BR2_TARGET_ROOTFS_CPIO=y
12 # BR2_TARGET_ROOTFS_TAR is not set
16 img = os.path.join(self.builddir, "images", "rootfs.cpio")
17 self.emulator.boot(arch="armv5",
19 options=["-initrd", img,
21 "-net", "user,hostfwd=tcp::2222-:22"])
22 self.emulator.login("testpwd")
23 cmd = "netstat -ltn 2>/dev/null | grep 0.0.0.0:22"
24 _, exit_code = self.emulator.run(cmd)
25 self.assertEqual(exit_code, 0)
26 # Would be useful to try to login through SSH here, through
27 # localhost:2222, though it is not easy to pass the ssh
28 # password on the command line.