Home
last modified time | relevance | path

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

12345678910>>...56

/openbmc/qemu/tests/functional/
H A Dtest_s390x_topology.py
H A Dtest_mem_addr_space.py
H A Dtest_aarch64_smmu.py
H A Dtest_ppc_74xx.py
H A Dtest_ppc64_powernv.py
H A Dtest_x86_64_kvm_xen.py
H A Dtest_intel_iommu.py
/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/openbmc/poky/bitbake/lib/bb/tests/
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 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 Dfetch.py49 def __init__(self, seconds): argument
50 self.seconds = seconds
52 def handle_timeout(self, signum, frame): argument
55 def __enter__(self): argument
56 signal.signal(signal.SIGALRM, self.handle_timeout)
57 signal.alarm(self.seconds)
59 def __exit__(self, exc_type, exc_val, exc_tb): argument
361 def test_uri(self): argument
362 for test_uri, ref in self.test_uris.items():
365 self.assertEqual(str(uri), ref['uri'])
[all …]
/openbmc/qemu/tests/qemu-iotests/
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 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 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 …]
/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/openbmc/poky/scripts/pybootchartgui/pybootchartgui/
H A Dsamples.py18 def __init__(self, time): argument
19 self.time = time
20 self.diskdata = [0, 0, 0]
21 def add_diskdata(self, new_diskdata): argument
22 self.diskdata = [ a + b for a, b in zip(self.diskdata, new_diskdata) ]
25 def __init__(self, time, user, sys, io = 0.0, swap = 0.0): argument
26 self.time = time
27 self.user = user
28 self.sys = sys
29 self.io = io
[all …]
H A Dgui.py47 def __init__(self, trace, options, xscale): argument
48 gtk.DrawingArea.__init__(self)
50 self.trace = trace
51 self.options = options
53 self.set_can_focus(True)
55 self.add_events(Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK)
56 self.connect("button-press-event", self.on_area_button_press)
57 self.connect("button-release-event", self.on_area_button_release)
58self.add_events(Gdk.EventMask.POINTER_MOTION_MASK | Gdk.EventMask.POINTER_MOTION_HINT_MASK | Gdk.E…
59 self.connect("motion-notify-event", self.on_area_motion_notify)
[all …]
/openbmc/qemu/scripts/
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/u-boot/test/py/
H A Dmultiplexed_log.py21 def __init__(self, logfile, name, chained_file): argument
34 self.logfile = logfile
35 self.name = name
36 self.chained_file = chained_file
38 def close(self): argument
50 def write(self, data, implicit=False): argument
65 self.logfile.write(self, data, implicit)
66 if self.chained_file:
67 self.chained_file.write(data)
69 def flush(self): argument
[all …]
/openbmc/openbmc/poky/bitbake/lib/layerindexlib/tests/
H A Dlayerindexobj.py10 def setUp(self): argument
13 LayersTest.setUp(self)
15 self.index = LayerIndexObj()
25 self.index.branches = {}
26 self.index.layerItems = {}
27 self.index.layerBranches = {}
28 self.index.layerDependencies = {}
29 self.index.recipes = {}
30 self.index.machines = {}
31 self.index.distros = {}
[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 …]

12345678910>>...56