/qemu/roms/ |
H A D | edk2-build.py | 7 import os 26 if os.path.isfile(gitdir): 30 if not os.path.exists(f'{gitdir}/rebase-merge/msgnum'): 46 return os.path.abspath(cfg['global']['core']) 47 return os.getcwd() 64 if os.environ.get('RPM_PACKAGE_NAME'): 65 version = os.environ.get('RPM_PACKAGE_NAME') 66 version += '-' + os.environ.get('RPM_PACKAGE_VERSION') 67 version += '-' + os.environ.get('RPM_PACKAGE_RELEASE') 72 if os.path.exists(coredir + '/.git'): [all …]
|
/qemu/tests/functional/ |
H A D | test_acpi_bits.py | 34 import os 70 name = "qemu-bits-%d" % os.getpid() 83 'file,path=%s,id=debugcon' %os.path.join(self.base_temp_dir, 138 self.assertTrue(os.path.exists(bits_config_file)) 139 self.assertTrue(os.path.exists(target_config_dir)) 151 self.assertTrue(os.path.exists(bits_test_dir)) 152 self.assertTrue(os.path.exists(target_test_dir)) 154 for filename in os.listdir(bits_test_dir): 155 if os.path.isfile(os.path.join(bits_test_dir, filename)) and \ 163 newfilename = os.path.splitext(filename)[0] + '.py' [all …]
|
H A D | test_arm_bpim2u.py | 8 import os 57 os.remove(kernel_path) 58 os.remove(dtb_path) 89 os.remove(kernel_path) 90 os.remove(dtb_path) 91 os.remove(initrd_path) 136 os.remove(kernel_path) 137 os.remove(dtb_path) 138 os.remove(rootfs_path) 177 os.remove(image_path)
|
/qemu/tests/qemu-iotests/ |
H A D | testenv.py | 19 import os 38 return os.path.isfile(path) and os.access(path, os.X_OK) 95 os_env = os.environ.copy() 119 self.pythonpath = os.pathsep.join(filter(None, ( 122 os.getenv('PYTHONPATH'), 125 self.test_dir = os.getenv('TEST_DIR', 126 os.path.join(os.getcwd(), 'scratch')) 130 self.sock_dir = os.environ['SOCK_DIR'] 137 self.sample_img_dir = os.getenv('SAMPLE_IMG_DIR', 138 os.path.join(self.source_iotests, [all …]
|
H A D | 040 | 26 import os 32 backing_img = os.path.join(iotests.test_dir, 'backing.img') 33 mid_img = os.path.join(iotests.test_dir, 'mid.img') 34 test_img = os.path.join(iotests.test_dir, 'test.img') 98 os.remove(test_img) 99 os.remove(mid_img) 100 os.remove(backing_img) 287 test_img = os.path.join(iotests.test_dir, dir3, 'test.img') 291 backing_img_abs = os.path.join(iotests.test_dir, dir1, 'backing.img') 292 mid_img_abs = os.path.join(iotests.test_dir, dir2, 'mid.img') [all …]
|
H A D | 298 | 21 import os 25 disk = os.path.join(iotests.test_dir, 'disk') 26 overlay = os.path.join(iotests.test_dir, 'overlay') 27 refdisk = os.path.join(iotests.test_dir, 'refdisk') 45 os.remove(disk) 48 self.assertTrue(os.path.getsize(disk) > 100 * MiB) 51 self.assertTrue(os.path.getsize(disk) < 10 * MiB) 116 self.assertTrue(os.path.getsize(disk) == 25 * MiB) 125 os.remove(disk) 126 os.remove(refdisk) [all …]
|
H A D | check | 19 import os 34 if os.path.islink(sys.argv[0]): 36 return os.path.dirname(os.readlink(sys.argv[0])) 38 return os.path.dirname(os.path.abspath(sys.argv[0])) 40 return os.getcwd() 162 os.chdir(exec_path.parent) 163 os.execve(cmd[0], cmd, full_env) 170 group_local = os.path.join(env.source_iotests, 'group.local') 171 if os.path.isfile(group_local): 188 print('\n'.join([os.path.basename(t) for t in tests])) [all …]
|
H A D | 045 | 22 import os 26 image0 = os.path.join(iotests.test_dir, 'image0') 27 image1 = os.path.join(iotests.test_dir, 'image1') 28 image2 = os.path.join(iotests.test_dir, 'image2') 29 image3 = os.path.join(iotests.test_dir, 'image3') 30 image4 = os.path.join(iotests.test_dir, 'image4') 61 os.remove(image0) 62 os.remove(image1) 63 os.remove(image2) 64 os.remove(image3) [all …]
|
H A D | iotests.py | 26 import os 56 qemu_img_args = [os.environ.get('QEMU_IMG_PROG', 'qemu-img')] 57 if os.environ.get('QEMU_IMG_OPTIONS'): 58 qemu_img_args += os.environ['QEMU_IMG_OPTIONS'].strip().split(' ') 60 qemu_io_args = [os.environ.get('QEMU_IO_PROG', 'qemu-io')] 61 if os.environ.get('QEMU_IO_OPTIONS'): 62 qemu_io_args += os.environ['QEMU_IO_OPTIONS'].strip().split(' ') 64 qemu_io_args_no_fmt = [os.environ.get('QEMU_IO_PROG', 'qemu-io')] 65 if os.environ.get('QEMU_IO_OPTIONS_NO_FMT'): 67 os.environ['QEMU_IO_OPTIONS_NO_FMT'].strip().split(' ') [all …]
|
H A D | 281 | 22 import os 31 drive0_img = os.path.join(iotests.test_dir, 'drive0.img') 56 os.remove(self.images[name]) 69 nbd_sock = os.path.join(iotests.sock_dir, 'nbd.sock') 70 drive0_img = os.path.join(iotests.test_dir, 'drive0.img') 71 mirror_img = os.path.join(iotests.test_dir, 'mirror.img') 103 os.remove(self.images[name]) 135 drive0_img = os.path.join(iotests.test_dir, 'drive0.img') 136 snapshot_img = os.path.join(iotests.test_dir, 'snapshot.img') 157 os.remove(self.images[name]) [all …]
|
/qemu/scripts/ |
H A D | nsis.py | 9 import os 16 cmd = os.environ.get("SIGNCODE") 33 dll = os.path.join(search_path, dep) 34 if not os.path.exists(dll): 56 prefix = os.path.splitdrive(args.prefix)[1] 61 os.path.join(destdir + prefix, "system-emulations.nsh"), "w" 63 os.path.join(destdir + prefix, "system-mui-text.nsh"), "w" 66 os.path.join(destdir + prefix, "qemu-system-*.exe") 68 exe = os.path.basename(exe) 92 dlldir = os.path.join(destdir + prefix, "dll") [all …]
|
H A D | qemu-trace-stap | 23 import os.path 30 dirname, filename = os.path.split(binary) 35 for path in os.environ["PATH"].split(os.pathsep): 36 if os.path.exists(os.path.join(path, binary)): 37 return os.path.join(path, binary) 44 dirname, filename = os.path.split(binary) 48 thisfile = os.path.realpath(binary) 49 if not os.path.exists(thisfile): 53 basedir = os.path.split(thisfile)[0] 54 tapset = os.path.join(basedir, "..", "share", "systemtap", "tapset") [all …]
|
H A D | symlink-install-tree.py | 6 import os 17 introspect = os.environ.get('MESONINTROSPECT') 22 path = os.path.dirname(bundle_dest) 24 os.makedirs(path, exist_ok=True) 29 os.symlink(source, bundle_dest) 32 if os.name == 'nt':
|
H A D | qcow2-to-stdout.py | 30 import os 75 data_from = os.lseek(fd, data_to, os.SEEK_DATA) 76 data_to = align_up(os.lseek(fd, data_from, os.SEEK_HOLE), cluster_size) 94 pid_file = os.path.join(temp_dir, "pid") 95 raw_file = os.path.join(temp_dir, "raw") 115 if os.path.exists(pid_file): 118 os.kill(pid, signal.SIGTERM) 119 while os.path.exists(pid_file): 121 os.unlink(raw_file) 122 os.rmdir(temp_dir) [all …]
|
/qemu/tests/vm/ |
H A D | basevm.py | 14 import os 35 SSH_KEY_FILE = os.path.join(os.path.dirname(__file__), 37 SSH_PUB_KEY_FILE = os.path.join(os.path.dirname(__file__), 111 self._tmpdir = os.path.realpath(tempfile.mkdtemp(prefix="vm-test-", 121 self._ssh_tmp_key_file = os.path.join(self._tmpdir, "id_rsa") 125 self._ssh_tmp_pub_key_file = os.path.join(self._tmpdir, "id_rsa.pub") 133 os.path.join(os.path.expanduser("~/.cache/qemu-vm"), 136 self._devnull = open(os.devnull, "w") 181 not os.path.exists(self._config['ssh_key_file']): 184 not os.path.exists(self._config['ssh_pub_key_file']): [all …]
|
/qemu/tests/functional/qemu_test/ |
H A D | uncompress.py | 12 import os 22 if os.path.exists(output_path): 29 os.remove(output_path) 33 if os.path.exists(output_path): 40 os.remove(output_path) 45 if os.path.exists(output_path): 52 os.remove(output_path) 58 os.chmod(output_path, stat.S_IRUSR | stat.S_IWUSR) 99 (name, ext) = os.path.splitext(compressed)
|
H A D | cmd.py | 15 import os 16 import os.path 23 paths=os.getenv('PATH') 24 for p in paths.split(os.path.pathsep): 25 p = os.path.join(p, tool) 26 if os.access(p, os.X_OK): 31 return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK) 197 if os.path.exists(qemu_img):
|
H A D | config.py | 14 import os 24 root = os.getenv('QEMU_BUILD_ROOT') 28 if os.path.exists('Makefile.mtest'): 29 return Path(os.getcwd()) 31 root = os.path.join(_source_dir(), 'build') 32 if os.path.exists(root):
|
H A D | ports.py | 11 import os 22 PORTS_START = 49152 + ((os.getpid() * PORTS_RANGE_SIZE) % 16384) 26 lock_file = os.path.join(BUILD_DIR, "tests", "functional", "port_lock") 27 self.lock_fh = os.open(lock_file, os.O_CREAT) 33 os.close(self.lock_fh)
|
/qemu/tests/qemu-iotests/tests/ |
H A D | vvfat | 23 import os 29 filesystem = os.path.join(iotests.test_dir, "filesystem") 40 if os.path.exists(filesystem): 41 if os.path.isdir(filesystem): 46 os.mkdir(filesystem) 50 with open(os.path.join(filesystem, f"file{i}.txt"), 55 with open(os.path.join(filesystem, "large1.txt"), "wb") as f: 60 with open(os.path.join(filesystem, "large2.txt"), "wb") as f: 141 temp_file = os.path.join(iotests.test_dir, "temp.bin") 149 os.remove(temp_file) [all …]
|
H A D | migrate-during-backup | 20 import os 25 disk_a = os.path.join(iotests.test_dir, 'disk_a') 26 disk_b = os.path.join(iotests.test_dir, 'disk_b') 28 mig_file = os.path.join(iotests.test_dir, 'mig_file') 35 os.remove(disk_a) 36 os.remove(disk_b) 37 os.remove(mig_file)
|
/qemu/tests/docker/ |
H A D | docker.py | 14 import os 36 DEVNULL = open(os.devnull, 'wb') 98 dest_dir = os.path.normpath("%s/%s" % (root_dir, sub_path)) 100 os.makedirs(dest_dir) 105 dest_file = "%s/%s" % (dest_dir, name if name else os.path.basename(src)) 150 _copy_with_mkdir(src, dest_dir, os.path.dirname(bin_dest)) 157 so_path = os.path.dirname(l) 158 name = os.path.basename(l) 159 real_l = os.path.realpath(l) 175 binary = os.path.basename(executable) [all …]
|
/qemu/tests/migration-stress/guestperf/ |
H A D | engine.py | 21 import os 30 sys.path.append(os.path.join(os.path.dirname(__file__), 58 jiffies_per_sec = os.sysconf(os.sysconf_names['SC_CLK_TCK']) 72 jiffies_per_sec = os.sysconf(os.sysconf_names['SC_CLK_TCK']) 323 _, _, _, _, machine = os.uname() 449 def run(self, hardware, scenario, result_dir=os.getcwd()): 450 abs_result_dir = os.path.join(result_dir, scenario._name) 460 uri = "unix:/var/tmp/qemu-migrate-%d.migrate" % os.getpid() 462 os.remove(uri[5:]) 463 os.remove(monaddr) [all …]
|
/qemu/scripts/qapi/ |
H A D | gen.py | 15 import os 79 pathname = os.path.join(output_dir, self.fname) 80 odir = os.path.dirname(pathname) 83 os.makedirs(odir, exist_ok=True) 85 # use os.open for O_CREAT to create and read a non-existent file 86 fd = os.open(pathname, os.O_RDWR | os.O_CREAT, 0o666) 87 with os.fdopen(fd, 'r+', encoding='utf-8') as fp: 179 tool=os.path.basename(sys.argv[0]), 203 + os.path.basename(sys.argv[0]) 293 return os.path.dirname(name) [all …]
|
/qemu/scripts/simplebench/ |
H A D | bench_write_req.py | 26 import os 71 if not os.path.isfile(qemu_img): 75 image_dir = os.path.dirname(os.path.abspath(image_name)) 76 if not os.path.isdir(image_dir): 96 os.remove(image_name) 102 os.remove(image_name) 105 os.remove(image_name) 118 program = os.path.basename(sys.argv[0])
|