Home
last modified time | relevance | path

Searched refs:self (Results 1 – 25 of 2069) sorted by relevance

12345678910>>...83

/openbmc/qemu/scripts/
H A Dminikconf.py38 def __init__(self, msg): argument
39 self.msg = msg
41 def __str__(self): argument
42 return self.msg
51 def __and__(self, rhs): argument
52 return KconfigData.AND(self, rhs)
53 def __or__(self, rhs): argument
54 return KconfigData.OR(self, rhs)
55 def __invert__(self): argument
56 return KconfigData.NOT(self)
[all …]
H A Danalyze-migration.py36 def __init__(self, filename): argument
37 self.filename = filename
38 self.file = open(self.filename, "rb")
40 def read64(self): argument
41 return int.from_bytes(self.file.read(8), byteorder='big', signed=False)
43 def read32(self): argument
44 return int.from_bytes(self.file.read(4), byteorder='big', signed=False)
46 def read16(self): argument
47 return int.from_bytes(self.file.read(2), byteorder='big', signed=False)
49 def read8(self): argument
[all …]
/openbmc/openbmc/poky/bitbake/lib/bb/tests/
H A Ddata.py18 def __enter__(self): argument
21 def emit(self, record): argument
25 self.handler = handler
28 def __exit__(self, type, value, traceback): argument
30 logger.removeHandler(self.handler)
41 def setUp(self): argument
42 self.d = bb.data.init()
43 self.d["foo"] = "value_of_foo"
44 self.d["bar"] = "value_of_bar"
45 self.d["value_of_foo"] = "value_of_'value_of_foo'"
[all …]
H A Dcodeparser.py22 def setUp(self): argument
23 self.d = bb.data.init()
25 def setEmptyVars(self, varlist): argument
27 self.d.setVar(k, "")
29 def setValues(self, values): argument
31 self.d.setVar(k, v)
33 def assertReferences(self, refs): argument
34 self.assertEqual(self.references, refs)
36 def assertExecs(self, execs): argument
37 self.assertEqual(self.execs, execs)
[all …]
H A Dfetch.py33 def __init__(self, seconds): argument
34 self.seconds = seconds
36 def handle_timeout(self, signum, frame): argument
39 def __enter__(self): argument
40 signal.signal(signal.SIGALRM, self.handle_timeout)
41 signal.alarm(self.seconds)
43 def __exit__(self, exc_type, exc_val, exc_tb): argument
330 def test_uri(self): argument
331 for test_uri, ref in self.test_uris.items():
334 self.assertEqual(str(uri), ref['uri'])
[all …]
/openbmc/qemu/tests/functional/
H A Dtest_s390x_topology.py61 def wait_until_booted(self): argument
62 wait_for_console_pattern(self, 'no job control',
66 def check_topology(self, c, s, b, d, e, t): argument
67 res = self.vm.qmp('query-cpus-fast')
77 self.assertEqual(drawer, d)
78 self.assertEqual(book, b)
79 self.assertEqual(socket, s)
80 self.assertEqual(entitlement, e)
81 self.assertEqual(dedicated, t)
83 def kernel_init(self): argument
[all …]
H A Dtest_x86_cpu_model_versions.py32 def validate_aliases(self, cpus): argument
36 self.assertIn(c['alias-of'], cpus,
39 self.assertNotIn('alias-of', cpus[c['alias-of']],
43 self.assertFalse(c['static'])
45 def validate_variant_aliases(self, cpus): argument
48 self.assertNotIn("Haswell-noTSX-v1", cpus,
50 self.assertNotIn("Broadwell-noTSX-v1", cpus,
52 self.assertNotIn("Nehalem-IBRS-v1", cpus,
54 self.assertNotIn("Westmere-IBRS-v1", cpus,
56 self.assertNotIn("SandyBridge-IBRS-v1", cpus,
[all …]
H A Dtest_mem_addr_space.py25 def test_phybits_low_pse36(self): argument
41 self.vm.add_args('-S', '-machine', 'q35', '-m',
46 self.vm.set_qmp_monitor(enabled=False)
47 self.vm.launch()
48 self.vm.wait()
49 self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be 1")
50 self.assertRegex(self.vm.get_log(), r'phys-bits too low')
52 def test_phybits_low_pae(self): argument
58 self.vm.add_args('-S', '-machine', 'q35', '-m',
63 self.vm.set_qmp_monitor(enabled=False)
[all …]
H A Dtest_ppc_74xx.py17 def test_ppc_7400(self): argument
18 self.require_accelerator("tcg")
19 self.set_machine('g3beige')
20 self.vm.set_console()
21 self.vm.add_args('-cpu', '7400')
22 self.vm.launch()
23 wait_for_console_pattern(self, '>> OpenBIOS')
24 wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
26 def test_ppc_7410(self): argument
27 self.require_accelerator("tcg")
[all …]
/openbmc/qemu/tests/qemu-iotests/
H A D11848 def process_events(self): argument
49 for event in self.vm.get_qmp_events(wait=False):
52 event['data']['id'] == self.device_name)):
54 self.has_closed = True
56 self.has_opened = True
58 def wait_for_open(self): argument
59 if not self.has_real_tray:
63 while not self.has_opened:
64 self.process_events()
66 def wait_for_close(self): argument
[all …]
H A D04039 def wait_for_complete(self, need_ready=False): argument
43 for event in self.vm.get_qmp_events(wait=True):
45 self.assert_qmp_absent(event, 'data/error')
46 self.assert_qmp(event, 'data/type', 'commit')
47 self.assert_qmp(event, 'data/device', 'drive0')
48 self.assert_qmp(event, 'data/offset', event['data']['len'])
50 self.assertTrue(ready, "Expecting BLOCK_JOB_COMPLETED event")
54 self.assert_qmp(event, 'data/type', 'commit')
55 self.assert_qmp(event, 'data/device', 'drive0')
56 self.vm.qmp('block-job-complete', device='drive0')
[all …]
H A D30041 def setUp(self) -> None: argument
42 self.vm_a = iotests.VM(path_suffix='-a')
43 self.vm_a.add_blockdev(f'node-name={self.src_node_name},'
45 self.vm_a.launch()
47 self.vm_b = iotests.VM(path_suffix='-b')
48 self.vm_b.add_blockdev(f'node-name={self.dst_node_name},'
50 self.vm_b.add_incoming(f'unix:{mig_sock}')
51 self.vm_b.launch()
53 self.vm_a.cmd('block-dirty-bitmap-add',
54 node=self.src_node_name,
[all …]
H A D24548 def setUp(self): argument
56 self.vm = iotests.VM()
57 self.vm.launch()
59 def tearDown(self): argument
60 self.vm.shutdown()
61 self.check_qemu_io_errors()
70 def run_qemu_io(self, img, cmd): argument
71 result = self.vm.hmp_qemu_io(img, cmd)
72 self.assert_qmp(result, 'return', '')
73 self.total_io_cmds += 1
[all …]
H A D03035 def setUp(self): argument
45 self.vm = iotests.VM().add_drive("blkdebug::" + test_img,
48 self.vm.launch()
50 def tearDown(self): argument
51 self.vm.shutdown()
56 def test_stream(self): argument
57 self.assert_no_active_block_jobs()
59 self.vm.cmd('block-stream', device='drive0')
61 self.wait_until_completed()
63 self.assert_no_active_block_jobs()
[all …]
H A D04147 def setUp(self): argument
48 iotests.create_image(backing_img, self.image_len)
51 self.vm = iotests.VM().add_drive(test_img, "node-name=top,backing.node-name=base")
53 self.vm.add_drive(None, 'media=cdrom', 'ide')
54 self.vm.launch()
56 def tearDown(self): argument
57 self.vm.shutdown()
65 def test_complete(self): argument
66 self.assert_no_active_block_jobs()
68 self.vm.cmd(self.qmp_cmd, device='drive0', sync='full',
[all …]
/openbmc/openbmc/poky/bitbake/lib/hashserv/
H A Dtests.py44 …def start_server(self, dbpath=None, upstream=None, read_only=False, prefunc=server_prefunc, anon_p… argument
45 self.server_index += 1
47 dbpath = self.make_dbpath()
56 server = create_server(self.get_server_addr(self.server_index),
65 server.serve_as_process(prefunc=prefunc, args=(self.server_index,))
66 self.addCleanup(cleanup_server, server)
70 def make_dbpath(self): argument
71 return os.path.join(self.temp_dir.name, "db%d.sqlite" % self.server_index)
73 def start_client(self, server_address, username=None, password=None): argument
78 self.addCleanup(cleanup_client, client)
[all …]
/openbmc/openbmc/poky/bitbake/lib/
H A Dcodegen.py87 def __init__(self, indent_with, add_line_information=False): argument
88 self.result = []
89 self.indent_with = indent_with
90 self.add_line_information = add_line_information
91 self.indentation = 0
92 self.new_lines = 0
94 def write(self, x): argument
95 if self.new_lines:
96 if self.result:
97 self.result.append('\n' * self.new_lines)
[all …]
/openbmc/qemu/tests/vm/
H A Dnetbsd85 def build_image(self, img): argument
86 cimg = self._download_with_cache(self.link, sha512sum=self.csum)
90 self.print_step("Preparing iso and disk image")
92 self.exec_qemu_img("create", "-f", "qcow2", img_tmp, self.size)
94 self.print_step("Booting installer")
95 self.boot(img_tmp, extra_args = [
99 self.console_init()
100 self.console_wait_send("3. Drop to boot prompt", "3")
101 self.console_wait_send("> ", "consdev com0\n")
102 self.console_wait_send("> ", "boot\n")
[all …]
H A Dopenbsd78 def build_image(self, img): argument
79 self.print_step("Downloading install iso")
80 cimg = self._download_with_cache(self.link, sha256sum=self.csum)
84 self.print_step("Preparing iso and disk image")
86 self.exec_qemu_img("create", "-f", "qcow2", img_tmp, self.size)
88 self.print_step("Booting installer")
89 self.boot(img_tmp, extra_args = [
94 self.console_init()
95 self.console_wait_send("boot>", "set tty com0\n")
96 self.console_wait_send("boot>", "\n")
[all …]
/openbmc/linux/tools/perf/scripts/python/
H A Dexported-sql-viewer.py194 def __init__(self, task, param=None, parent=None): argument
195 super(Thread, self).__init__(parent)
196 self.task = task
197 self.param = param
199 def run(self): argument
201 if self.param is None:
202 done, result = self.task()
204 done, result = self.task(self.param)
205 self.done.emit(result)
213 def __init__(self, glb, params, parent=None): argument
[all …]
/openbmc/linux/scripts/gdb/linux/
H A Dmm.py24 def __init__(self): argument
28 self.ops = aarch64_page_ops()
33 def __init__(self): argument
34 self.SUBSECTION_SHIFT = 21
35 self.SEBSECTION_SIZE = 1 << self.SUBSECTION_SHIFT
36 self.MODULES_VSIZE = 128 * 1024 * 1024
39 self.SECTION_SIZE_BITS = 29
41 self.SECTION_SIZE_BITS = 27
42 self.MAX_PHYSMEM_BITS = constants.LX_CONFIG_ARM64_VA_BITS
44 self.PAGE_SHIFT = constants.LX_CONFIG_ARM64_PAGE_SHIFT
[all …]
/openbmc/openbmc/poky/scripts/esdk-tools/
H A Drunqemu29 def __init__(self, message): argument
133 def __init__(self): argument
135 self.d = {'QB_KERNEL_ROOT': '/dev/vda'}
139 self.env_vars = ('MACHINE',
151 self.qemu_opt = ''
152 self.qemu_opt_script = ''
153 self.qemuparams = ''
154 self.nfs_server = ''
155 self.rootfs = ''
160 self.ovmf_bios = []
[all …]
/openbmc/openbmc/poky/scripts/
H A Drunqemu29 def __init__(self, message): argument
133 def __init__(self): argument
135 self.d = {'QB_KERNEL_ROOT': '/dev/vda'}
139 self.env_vars = ('MACHINE',
151 self.qemu_opt = ''
152 self.qemu_opt_script = ''
153 self.qemuparams = ''
154 self.nfs_server = ''
155 self.rootfs = ''
160 self.ovmf_bios = []
[all …]
/openbmc/qemu/python/qemu/machine/
H A Dmachine.py76 def __init__(self, exitcode: Optional[int], argument
79 self.exitcode = exitcode
80 self.command = command
81 self.output = output
83 def __str__(self) -> str: argument
85 if self.__cause__ is not None:
86 name = type(self.__cause__).__name__
87 reason = str(self.__cause__)
94 if self.exitcode is not None:
123 def __init__(self, argument
[all …]
/openbmc/openbmc/poky/bitbake/lib/bb/pysh/
H A Dpyshlex.py129 def __init__(self, heredoc = False): argument
131 self._buffer = []
134 self._stack = []
135 self._escapable = None
137 self._heredoc = heredoc
139 def add(self, data, eof=False): argument
145 self._buffer += list(data)
146 self._parse(eof)
148 result = self._stack[0]
149 remaining = ''.join(self._buffer)
[all …]

12345678910>>...83