| /tools/perf/util/ |
| A D | stat-display.c | 152 #define json_out(os, format, ...) fprintf((os)->fh, "%s" format, json_sep(os), ##__VA_ARGS__) argument 438 fputs(os->timestamp, os->fh); in __new_line_std_csv() 439 aggr_printout(config, os, os->evsel, os->id, os->aggr_nr); in __new_line_std_csv() 542 json_out(os, "%s", os->timestamp); in new_line_json() 544 aggr_printout(config, os, os->evsel, os->id, os->aggr_nr); in new_line_json() 705 if (os->evsel->cgrp != os->cgrp) in print_metric_header() 876 abs_printout(config, os, os->id, os->aggr_nr, counter, uval, ok); in printout() 886 aggr_printout(config, os, os->evsel, os->id, os->aggr_nr); in printout() 1031 json_out(os, "%s", os->timestamp); in print_counter_aggrdata() 1064 json_out(os, "%s", os->timestamp); in print_metric_begin() [all …]
|
| /tools/testing/selftests/damon/ |
| A D | _damon_sysfs.py | 3 import os 18 if not os.path.exists(sysfs_root): 168 err = write_file(os.path.join( 172 err = write_file(os.path.join( 177 err = write_file(os.path.join( 434 return os.path.join( 486 return os.path.join( 625 nr_targets_file = os.path.join( 639 nr_schemes_file = os.path.join( 703 tried_regions_dir = os.path.join( [all …]
|
| /tools/testing/selftests/tc-testing/ |
| A D | tdc_config_local_template.py | 7 import os 9 ENVIR = os.environ.copy() 11 ENV_LD_LIBRARY_PATH = os.getenv('LD_LIBRARY_PATH', '') 12 ENV_OTHER_LIB = os.getenv('OTHER_LIB', '') 17 EXTRA_NAMES['SOME_BIN'] = os.path.join(os.getenv('OTHER_BIN', ''), 'some_bin')
|
| /tools/testing/selftests/drivers/sdsi/ |
| A D | sdsi_test.py | 9 import os 38 return os.path.isfile(kmemleak) 81 st = os.stat(folder + "guid") 85 st = os.stat(folder + "registers") 89 st = os.stat(folder + "provision_akc") 93 st = os.stat(folder + "provision_cap") 105 st = os.stat(folder + "registers") 108 st = os.stat(folder + "provision_akc") 119 rand_file = bytes(os.urandom(8)) 157 rand_file = bytes(os.urandom(1017)) [all …]
|
| /tools/testing/selftests/devices/probe/ |
| A D | test_discoverable_devices.py | 19 import os 25 this_dir = os.path.dirname(os.path.realpath(__file__)) 41 for path, dirs, _ in os.walk(sysfs_devices): 51 for d in os.scandir(sysfs_usb_devices): 69 sysfs_dev_dir = os.path.dirname(sysfs_dev_dir) 85 sysfs_dev_dir = os.path.dirname(sysfs_dev_dir) 147 dirname = os.path.join( 150 return [os.path.realpath(dirname)] 298 if os.path.exists(platform_compatible_file): 340 if not os.path.exists(args.boards_dir): [all …]
|
| /tools/testing/selftests/bpf/ |
| A D | test_bpftool_synctypes.py | 8 import os, sys 10 LINUX_ROOT = os.path.abspath(os.path.join(__file__, 11 os.pardir, os.pardir, os.pardir, os.pardir, os.pardir)) 12 BPFTOOL_DIR = os.getenv('BPFTOOL_DIR', 13 os.path.join(LINUX_ROOT, 'tools/bpf/bpftool')) 14 BPFTOOL_BASHCOMP_DIR = os.getenv('BPFTOOL_BASHCOMP_DIR', 15 os.path.join(BPFTOOL_DIR, 'bash-completion')) 16 BPFTOOL_DOC_DIR = os.getenv('BPFTOOL_DOC_DIR', 17 os.path.join(BPFTOOL_DIR, 'Documentation')) 18 INCLUDE_DIR = os.getenv('INCLUDE_DIR', [all …]
|
| A D | test_bpftool.py | 7 import os 14 cur_dir = os.path.dirname(os.path.realpath(__file__)) 15 bpftool_dir = os.path.abspath(os.path.join(cur_dir, "..", "..", "..", "..", 17 os.environ["PATH"] = bpftool_dir + ":/usr/local/sbin:" + os.environ["PATH"] 69 if os.getuid() != 0:
|
| /tools/power/x86/amd_pstate_tracer/ |
| A D | amd_pstate_trace.py | 24 import os 33 sys.path.append(os.path.join(os.path.dirname(__file__), "..", "intel_pstate_tracer")) 68 if os.path.exists(file_name): 179 os.remove('cpu.csv') 277 location = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))) 303 os.mkdir('results') 306 os.chdir('results') 307 if os.path.exists(test_name): 310 os.mkdir(test_name) 312 os.chdir(test_name) [all …]
|
| /tools/testing/selftests/net/packetdrill/ |
| A D | set_sysctls.py | 16 import os 20 filename = '/tmp/sysctl_restore_%s.sh' % os.environ['PACKETDRILL_PID'] 36 os.system(cmd) 38 os.system('chmod u+x %s' % filename)
|
| /tools/cgroup/ |
| A D | memcg_shrinker.py | 6 import os 13 for root, subdirs, _ in os.walk(cgroup_root): 15 path = os.path.join(root, cgroup) 16 ino = os.stat(path).st_ino 26 for root, subdirs, _ in os.walk(shrinker_debugfs): 28 count_path = os.path.join(root, shrinker, "count")
|
| A D | iocost_coef_gen.py | 25 import os 64 devname = os.path.basename(devname).decode('utf-8').strip() 69 devname = os.path.basename(os.path.dirname(parents[0])) 70 rdev = os.stat(f'/dev/{devname}').st_rdev 76 if os.path.isfile(path) and os.stat(path).st_size == size: 127 devname = os.path.basename(args.testdev) 128 rdev = os.stat(f'/dev/{devname}').st_rdev
|
| /tools/tracing/rtla/sample/ |
| A D | timerlat_load.py | 25 import os 34 os.sched_setaffinity(0, affinity_mask) 41 param = os.sched_param(args.prio) 42 os.sched_setscheduler(0, os.SCHED_FIFO, param)
|
| /tools/power/x86/intel_pstate_tracer/ |
| A D | intel_pstate_tracer.py | 29 import os 104 if os.path.exists(file_name): 125 if os.path.exists(file_name): 144 if os.path.exists(file_name): 366 os.remove('cpu.csv') 524 location = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))) 550 os.mkdir('results') 554 os.chdir('results') 558 os.mkdir(testname) 561 os.chdir(testname) [all …]
|
| /tools/testing/kunit/ |
| A D | kunit_kernel.py | 13 import os 32 ABS_TOOL_PATH = os.path.abspath(os.path.dirname(__file__)) 176 if not os.path.exists(path): 183 if os.path.isdir(path): 185 if not os.path.exists(path): 201 if os.path.isfile(config_path): 225 module_path = '.' + os.path.join(os.path.basename(QEMU_CONFIGS_DIR), os.path.basename(config_path)) 298 os.mkdir(build_dir) 310 if os.path.exists(old_path): 317 if not os.path.exists(old_path): [all …]
|
| /tools/verification/rvgen/rvgen/ |
| A D | generator.py | 9 import os 19 os.path.join(os.path.dirname(__file__), "templates", self.template_dir) 30 if os.path.exists(self.rv_dir): 34 kernel_path = os.path.join("../..", self.rv_dir) 36 if os.path.exists(kernel_path): 47 if os.path.exists(os.path.join(kernel_path, "rv_trace.h")): 66 path = os.path.join(self.abs_template_dir, file) 142 file_to_patch = os.path.join(self.rv_dir, file) 199 path = os.path.join(self.rv_dir, "monitors", path) 201 os.mkdir(path) [all …]
|
| /tools/testing/selftests/x86/bugs/ |
| A D | its_ret_alignment.py | 22 import os, sys, argparse 25 this_dir = os.path.dirname(os.path.realpath(__file__)) 43 if len(os.sys.argv) > 1: 44 arg_vmlinux = os.sys.argv[1] 45 if not os.path.exists(arg_vmlinux): 48 os.makedirs(f"/usr/lib/debug/lib/modules/{os.uname().release}", exist_ok=True) 49 os.system(f'cp {arg_vmlinux} /usr/lib/debug/lib/modules/$(uname -r)/vmlinux') 52 if not os.path.exists(vmlinux):
|
| A D | its_indirect_alignment.py | 22 import os, sys, argparse 25 this_dir = os.path.dirname(os.path.realpath(__file__)) 48 if len(os.sys.argv) > 1: 49 arg_vmlinux = os.sys.argv[1] 50 if not os.path.exists(arg_vmlinux): 53 os.makedirs(f"/usr/lib/debug/lib/modules/{os.uname().release}", exist_ok=True) 54 os.system(f'cp {arg_vmlinux} /usr/lib/debug/lib/modules/$(uname -r)/vmlinux') 57 if not os.path.exists(vmlinux):
|
| /tools/testing/selftests/devices/error_logs/ |
| A D | test_device_error_logs.py | 15 import os 20 this_dir = os.path.dirname(os.path.realpath(__file__)) 21 sys.path.append(os.path.join(this_dir, "../../kselftest/")) 42 os.set_blocking(f.fileno(), False)
|
| /tools/testing/kunit/qemu_configs/ |
| A D | riscv.py | 2 import os 3 import os.path 9 if not os.path.isfile(OPENSBI_PATH):
|
| /tools/testing/selftests/drivers/net/lib/py/ |
| A D | remote_ssh.py | 3 import os 33 file_name = self._tmpdir + "/" + self._mktmp() + os.path.basename(what) 35 if not os.path.isabs(what): 36 what = os.path.abspath(self.dir_path + "/" + what)
|
| A D | remote_netns.py | 3 import os 19 if os.path.isabs(what): 21 return os.path.abspath(self.dir_path + "/" + what)
|
| /tools/net/ynl/pyynl/ |
| A D | cli.py | 6 import os 18 script_dir = os.path.dirname(os.path.abspath(__file__)) 19 schema_dir = os.path.abspath(f"{script_dir}/{relative_schema_dir}") 20 if not os.path.isdir(schema_dir): 22 if not os.path.isdir(schema_dir): 28 if not os.path.isdir(spec_dir): 100 for filename in sorted(os.listdir(spec_dir())): 120 if not os.path.isfile(spec):
|
| /tools/testing/selftests/drivers/net/hw/ |
| A D | pp_alloc_fail.py | 6 import os 21 if not os.path.exists("/sys/kernel/debug/fail_function"): 24 if not os.path.exists("/sys/kernel/debug/fail_function/page_pool_alloc_netmems"): 37 if not os.path.exists("/sys/kernel/debug/fail_function"): 40 if os.path.exists("/sys/kernel/debug/fail_function/page_pool_alloc_netmems"):
|
| /tools/testing/selftests/exec/ |
| A D | binfmt_script.py | 6 import os, subprocess 65 os.makedirs(dirpath, mode=0o755, exist_ok=True) 67 os.chmod(binary, 0o755) 75 os.chmod(script, 0o755) 101 os.unlink(script) 104 os.unlink(binary) 107 os.rmdir("/".join(elements))
|
| /tools/net/sunrpc/xdrgen/generators/ |
| A D | header_top.py | 6 import os.path 29 mtime=time.ctime(os.path.getmtime(filename)), 40 mtime=time.ctime(os.path.getmtime(filename)),
|