4 from tests.init.base import InitSystemBase as InitSystemBase
7 class TestInitSystemNone(InitSystemBase):
8 config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
11 # BR2_TARGET_ROOTFS_TAR is not set
12 BR2_TARGET_ROOTFS_SQUASHFS=y
16 self.startEmulator(fs_type="squashfs", init="/bin/sh")
17 index = self.emulator.qemu.expect(["/bin/sh: can't access tty; job control turned off", pexpect.TIMEOUT], timeout=60)
19 self.emulator.logfile.write("==> System does not boot")
20 raise SystemError("System does not boot")
21 index = self.emulator.qemu.expect(["#", pexpect.TIMEOUT], timeout=60)
23 self.emulator.logfile.write("==> System does not boot")
24 raise SystemError("System does not boot")
26 out, exit_code = self.emulator.run("sh -c 'echo $PPID'")
27 self.assertEqual(exit_code, 0)
28 self.assertEqual(out[0], "1")
30 _, exit_code = self.emulator.run("mount -t proc none /proc")
31 self.assertEqual(exit_code, 0)
33 self.checkInit("/bin/sh")