Home
last modified time | relevance | path

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

12345678910>>...57

/openbmc/qemu/tests/functional/
H A Dtest_s390x_topology.py57 def wait_until_booted(self): argument
58 wait_for_console_pattern(self, 'no job control',
62 def check_topology(self, c, s, b, d, e, t): argument
63 res = self.vm.qmp('query-cpus-fast')
73 self.assertEqual(drawer, d)
74 self.assertEqual(book, b)
75 self.assertEqual(socket, s)
76 self.assertEqual(entitlement, e)
77 self.assertEqual(dedicated, t)
79 def kernel_init(self): argument
[all …]
H A Dtest_mem_addr_space.py25 def ensure_64bit_binary(self): argument
26 with open(self.qemu_bin, "rb") as fh:
40 self.skipTest("64-bit build host is required")
44 def test_phybits_low_pse36(self): argument
60 self.ensure_64bit_binary()
61 self.set_machine('q35')
62 self.vm.add_args('-S', '-m', '512,slots=1,maxmem=59.6G',
66 self.vm.set_qmp_monitor(enabled=False)
67 self.vm.launch()
68 self.vm.wait()
[all …]
H A Dtest_aarch64_smmu.py35 def set_up_boot(self, path): argument
36 self.vm.add_args('-device', 'virtio-blk-pci,bus=pcie.0,' +
38 'werror=stop,rerror=stop' + self.IOMMU_ADDON)
39 self.vm.add_args('-drive',
42 self.vm.add_args('-netdev',
44 self.GUEST_PORT)
45 self.vm.add_args('-device', 'virtio-net,netdev=n1' + self.IOMMU_ADDON)
47 def common_vm_setup(self, kernel, initrd, disk): argument
48 if hvf_available(self.qemu_bin):
50 elif kvm_available(self.qemu_bin):
[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 …]
H A Dtest_ppc64_powernv.py25 def do_test_linux_boot(self, command_line = KERNEL_COMMON_COMMAND_LINE): argument
26 self.require_accelerator("tcg")
27 kernel_path = self.ASSET_KERNEL.fetch()
29 self.vm.set_console()
30 self.vm.add_args('-kernel', kernel_path,
32 self.vm.launch()
34 def test_linux_boot(self): argument
35 self.set_machine('powernv')
36 self.do_test_linux_boot()
38 wait_for_console_pattern(self, console_pattern, self.panic_message)
[all …]
H A Dtest_x86_64_kvm_xen.py32 def common_vm_setup(self): argument
34 self.require_accelerator("kvm")
35 self.require_netdev('user')
37 self.vm.set_console()
39 self.vm.add_args("-accel", "kvm,xen-version=0x4000a,kernel-irqchip=split")
40 self.vm.add_args("-smp", "2")
42 self.kernel_path = self.ASSET_KERNEL.fetch()
43 self.rootfs = self.ASSET_ROOTFS.fetch()
45 def run_and_check(self): argument
46 self.vm.add_args('-kernel', self.kernel_path,
[all …]
H A Dtest_intel_iommu.py41 def add_common_args(self, path): argument
42 self.vm.add_args('-drive', f'file={path},if=none,id=drv0,snapshot=on')
43 self.vm.add_args('-device', 'virtio-blk-pci,bus=pcie.0,' +
45 'werror=stop,rerror=stop' + self.IOMMU_ADDON)
46 self.vm.add_args('-device', 'virtio-gpu-pci' + self.IOMMU_ADDON)
48 self.vm.add_args('-netdev',
50 self.GUEST_PORT)
51 self.vm.add_args('-device',
52 'virtio-net-pci,netdev=n1' + self.IOMMU_ADDON)
54 self.vm.add_args('-device', 'virtio-rng-pci,rng=rng0')
[all …]
/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/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/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 …]

12345678910>>...57