/kernel/linux/linux-6.6/scripts/gdb/linux/ |
H A D | mm.py | 24 def __init__(self): 28 self.ops = aarch64_page_ops() 33 def __init__(self): 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 [all...] |
/test/testfwk/xdevice/plugins/devicetest/core/ |
H A D | variables.py | 70 def __init__(self, _log): 72 self.log = _log 73 self.step_total = 0 # tests 数 74 self.run_section = "" # RunSection.SETUP 75 self.case_result = RunResult.PASSED # 当前用例执行结果 76 self.name = '' # 类方法名,即:用例名case_id 77 self.suite_name = "" # 用例对应哪个测试套 78 self.error_msg = '' # 用例失败信息 79 self.case_screenshot_dir = None # 当前用例失败截图的图片保存路径 80 self [all...] |
H A D | exception.py | 24 def __init__(self, error_msg): 25 super(TestAssertionError, self).__init__(error_msg) 26 self.error_msg = error_msg 28 def __str__(self): 29 return str(self.error_msg) 33 def __init__(self, error_msg): 34 super(RPCException, self).__init__(error_msg) 35 self.error_msg = error_msg 37 def __str__(self): 38 return str(self [all...] |
/foundation/ability/idl_tool/test/hdi_unittest/base/ |
H A D | test_base.py | 28 def __init__(self): 29 self.name = self.__class__.__name__ 30 self._file_name = self.get_file_name() 31 self.working_dir = self.get_working_dir() 32 self._package_path = self.working_dir 33 self [all...] |
/base/startup/hvb/tools/ |
H A D | hvbtool.py | 53 def __init__(self, sig_algo, hash_algo, bit_length, sig_bytes, hash_bytes, pubkey_bytes): 54 self.sig_algo = sig_algo 55 self.hash_algo = hash_algo 56 self.bit_length = bit_length 57 self.sig_bytes = sig_bytes 58 self.hash_bytes = hash_bytes 59 self.pubkey_bytes = pubkey_bytes 76 def __init__(self, footer=None): 77 self.foot = footer 78 if self [all...] |
/kernel/linux/linux-6.6/tools/crypto/ccp/ |
H A D | test_dbc.py | 34 def __init__(self, data) -> None: 35 self.d = None 36 self.signature = b"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" 37 self.uid = b"1111111111111111" 40 def setUp(self) -> None: 41 self.d = open(DEVICE_NODE) 44 def tearDown(self) -> None: 45 if self.d: 46 self.d.close() 51 def setUp(self) [all...] |
/kernel/linux/linux-6.6/tools/net/ynl/lib/ |
H A D | nlspec.py | 31 def __init__(self, family, yaml): 32 self.yaml = yaml 33 self.family = family 35 if 'name' in self.yaml: 36 self.name = self.yaml['name'] 37 self.ident_name = self.name.replace('-', '_') 39 self._super_resolved = False 40 family.add_unresolved(self) [all...] |
/kernel/linux/linux-6.6/tools/verification/dot2/ |
H A D | dot2c.py | 25 def __init__(self, file_path): 27 self.line_length = 100 29 def __buff_to_string(self, buff): 38 def __get_enum_states_content(self): 40 buff.append("\t%s%s = 0," % (self.initial_state, self.enum_suffix)) 41 for state in self.states: 42 if state != self.initial_state: 43 buff.append("\t%s%s," % (state, self.enum_suffix)) 44 buff.append("\tstate_max%s" % (self [all...] |
/kernel/linux/linux-5.10/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/ |
H A D | SchedGui.py | 23 def __init__(self, sched_tracer, title, parent = None, id = -1): 24 wx.Frame.__init__(self, parent, id, title) 26 (self.screen_width, self.screen_height) = wx.GetDisplaySize() 27 self.screen_width -= 10 28 self.screen_height -= 10 29 self.zoom = 0.5 30 self.scroll_scale = 20 31 self.sched_tracer = sched_tracer 32 self [all...] |
/kernel/linux/linux-6.6/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/ |
H A D | SchedGui.py | 23 def __init__(self, sched_tracer, title, parent = None, id = -1): 24 wx.Frame.__init__(self, parent, id, title) 26 (self.screen_width, self.screen_height) = wx.GetDisplaySize() 27 self.screen_width -= 10 28 self.screen_height -= 10 29 self.zoom = 0.5 30 self.scroll_scale = 20 31 self.sched_tracer = sched_tracer 32 self [all...] |
/base/sensors/miscdevice/utils/tools/haptic_format_converter/tests/ |
H A D | test_converter.py | 38 def setUp(self): 39 self.schema_dir = Path('converter/schemas') 40 self.test_data_dir = Path('tests/test_data') 41 self.output_dir = Path('converter/output_dir') 42 self.output_dir.mkdir(parents=True, exist_ok=True) 44 def read_json(self, file_path): 48 def test_oh_to_he_v1(self): 49 input_data = self.read_json(self.test_data_dir / 'oh_sample.json') 50 expected_output = self [all...] |
/kernel/linux/linux-6.6/scripts/ |
H A D | rust_is_available_test.py | 98 def run_script(self, expected, override_env): 100 "RUSTC": self.default_rustc, 101 "BINDGEN": self.default_bindgen, 102 "CC": self.default_cc, 114 self.assertEqual(result.stdout, b"") 116 if expected == self.Expected.SUCCESS: 119 self.assertEqual(result.returncode, 0) 120 self.assertEqual(result.stderr, b"") 121 elif expected == self.Expected.SUCCESS_WITH_EXTRA_OUTPUT: 126 self [all...] |
/test/testfwk/xdevice/plugins/devicetest/core/suite/ |
H A D | test_suite.py | 58 def __init__(self, configs, path): 59 self.configs = configs 60 self.devices = [] 61 self.device1 = None 62 self.device2 = None 64 self.pass_through = Variables.config.pass_through 65 self.set_devices(self.configs["devices"]) 66 self.path = path 67 self [all...] |
/foundation/ability/idl_tool/test/sa_test/ |
H A D | test_base.py | 29 def __init__(self): 30 self.name = self.__class__.__name__ 31 self._file_name = self.get_file_name() 32 self.working_dir = self.get_working_dir() 33 self.idl_file = os.path.join(self.working_dir, "foo", "IFoo.idl") 34 self [all...] |
/foundation/arkui/ui_lite/tools/server/ |
H A D | tcp_server.py | 55 def __init__(self):
56 threading.Thread.__init__(self)
58 self.tcp_server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
59 self.tcp_server_socket.bind((self.IP, self.PORT))
60 self.tcp_server_socket.listen(128)
62 self.config = self.read_data_from_json(self [all...] |
/kernel/linux/linux-5.10/tools/perf/scripts/python/ |
H A D | exported-sql-viewer.py | 193 def __init__(self, task, param=None, parent=None): 194 super(Thread, self).__init__(parent) 195 self.task = task 196 self.param = param 198 def run(self): 200 if self.param is None: 201 done, result = self.task() 203 done, result = self.task(self.param) 204 self [all...] |
/kernel/uniproton/ |
H A D | build.py | 39 def get_config(self, cpu_type, cpu_plat): 40 self.compile_mode = get_compile_mode() 41 self.lib_type, self.plam_type, self.hcc_path, self.kconf_dir, self.system, self.core = get_cpu_info(cpu_type, cpu_plat, self.build_machine_platform) 42 if not self [all...] |
/kernel/linux/linux-6.6/tools/perf/scripts/python/ |
H A D | exported-sql-viewer.py | 194 def __init__(self, task, param=None, parent=None): 195 super(Thread, self).__init__(parent) 196 self.task = task 197 self.param = param 199 def run(self): 201 if self.param is None: 202 done, result = self.task() 204 done, result = self.task(self.param) 205 self [all...] |
/kernel/linux/linux-5.10/tools/bpf/bpftool/ |
H A D | json_writer.c | 29 static void jsonw_indent(json_writer_t *self) in jsonw_indent() argument 32 for (i = 0; i < self->depth; ++i) in jsonw_indent() 33 fputs(" ", self->out); in jsonw_indent() 37 static void jsonw_eol(json_writer_t *self) in jsonw_eol() argument 39 if (!self->pretty) in jsonw_eol() 42 putc('\n', self->out); in jsonw_eol() 43 jsonw_indent(self); in jsonw_eol() 47 static void jsonw_eor(json_writer_t *self) in jsonw_eor() argument 49 if (self->sep != '\0') in jsonw_eor() 50 putc(self in jsonw_eor() 57 jsonw_puts(json_writer_t *self, const char *str) jsonw_puts() argument 92 json_writer_t *self = malloc(sizeof(*self)); jsonw_new() local 105 json_writer_t *self = *self_p; jsonw_destroy() local 114 jsonw_pretty(json_writer_t *self, bool on) jsonw_pretty() argument 119 jsonw_reset(json_writer_t *self) jsonw_reset() argument 126 jsonw_begin(json_writer_t *self, int c) jsonw_begin() argument 134 jsonw_end(json_writer_t *self, int c) jsonw_end() argument 147 jsonw_name(json_writer_t *self, const char *name) jsonw_name() argument 158 jsonw_vprintf_enquote(json_writer_t *self, const char *fmt, va_list ap) jsonw_vprintf_enquote() argument 166 jsonw_printf(json_writer_t *self, const char *fmt, ...) jsonw_printf() argument 177 jsonw_start_object(json_writer_t *self) jsonw_start_object() argument 182 jsonw_end_object(json_writer_t *self) jsonw_end_object() argument 187 jsonw_start_array(json_writer_t *self) jsonw_start_array() argument 192 jsonw_end_array(json_writer_t *self) jsonw_end_array() argument 198 jsonw_string(json_writer_t *self, const char *value) jsonw_string() argument 204 jsonw_bool(json_writer_t *self, bool val) jsonw_bool() argument 209 jsonw_null(json_writer_t *self) jsonw_null() argument 214 jsonw_float_fmt(json_writer_t *self, const char *fmt, double num) jsonw_float_fmt() argument 220 jsonw_float(json_writer_t *self, double num) jsonw_float() argument 226 jsonw_hu(json_writer_t *self, unsigned short num) jsonw_hu() argument 231 jsonw_uint(json_writer_t *self, uint64_t num) jsonw_uint() argument 236 jsonw_lluint(json_writer_t *self, unsigned long long int num) jsonw_lluint() argument 241 jsonw_int(json_writer_t *self, int64_t num) jsonw_int() argument 247 jsonw_string_field(json_writer_t *self, const char *prop, const char *val) jsonw_string_field() argument 253 jsonw_bool_field(json_writer_t *self, const char *prop, bool val) jsonw_bool_field() argument 260 jsonw_float_field(json_writer_t *self, const char *prop, double val) jsonw_float_field() argument 267 jsonw_float_field_fmt(json_writer_t *self, const char *prop, const char *fmt, double val) jsonw_float_field_fmt() argument 276 jsonw_uint_field(json_writer_t *self, const char *prop, uint64_t num) jsonw_uint_field() argument 282 jsonw_hu_field(json_writer_t *self, const char *prop, unsigned short num) jsonw_hu_field() argument 288 jsonw_lluint_field(json_writer_t *self, const char *prop, unsigned long long int num) jsonw_lluint_field() argument 296 jsonw_int_field(json_writer_t *self, const char *prop, int64_t num) jsonw_int_field() argument 302 jsonw_null_field(json_writer_t *self, const char *prop) jsonw_null_field() argument [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/ |
H A D | json_writer.c | 29 static void jsonw_indent(json_writer_t *self) in jsonw_indent() argument 32 for (i = 0; i < self->depth; ++i) in jsonw_indent() 33 fputs(" ", self->out); in jsonw_indent() 37 static void jsonw_eol(json_writer_t *self) in jsonw_eol() argument 39 if (!self->pretty) in jsonw_eol() 42 putc('\n', self->out); in jsonw_eol() 43 jsonw_indent(self); in jsonw_eol() 47 static void jsonw_eor(json_writer_t *self) in jsonw_eor() argument 49 if (self->sep != '\0') in jsonw_eor() 50 putc(self in jsonw_eor() 57 jsonw_puts(json_writer_t *self, const char *str) jsonw_puts() argument 92 json_writer_t *self = malloc(sizeof(*self)); jsonw_new() local 105 json_writer_t *self = *self_p; jsonw_destroy() local 114 jsonw_pretty(json_writer_t *self, bool on) jsonw_pretty() argument 119 jsonw_reset(json_writer_t *self) jsonw_reset() argument 126 jsonw_begin(json_writer_t *self, int c) jsonw_begin() argument 134 jsonw_end(json_writer_t *self, int c) jsonw_end() argument 147 jsonw_name(json_writer_t *self, const char *name) jsonw_name() argument 158 jsonw_vprintf_enquote(json_writer_t *self, const char *fmt, va_list ap) jsonw_vprintf_enquote() argument 166 jsonw_printf(json_writer_t *self, const char *fmt, ...) jsonw_printf() argument 177 jsonw_start_object(json_writer_t *self) jsonw_start_object() argument 182 jsonw_end_object(json_writer_t *self) jsonw_end_object() argument 187 jsonw_start_array(json_writer_t *self) jsonw_start_array() argument 192 jsonw_end_array(json_writer_t *self) jsonw_end_array() argument 198 jsonw_string(json_writer_t *self, const char *value) jsonw_string() argument 204 jsonw_bool(json_writer_t *self, bool val) jsonw_bool() argument 209 jsonw_null(json_writer_t *self) jsonw_null() argument 214 jsonw_float_fmt(json_writer_t *self, const char *fmt, double num) jsonw_float_fmt() argument 220 jsonw_float(json_writer_t *self, double num) jsonw_float() argument 226 jsonw_hu(json_writer_t *self, unsigned short num) jsonw_hu() argument 231 jsonw_uint(json_writer_t *self, uint64_t num) jsonw_uint() argument 236 jsonw_lluint(json_writer_t *self, unsigned long long int num) jsonw_lluint() argument 241 jsonw_int(json_writer_t *self, int64_t num) jsonw_int() argument 247 jsonw_string_field(json_writer_t *self, const char *prop, const char *val) jsonw_string_field() argument 253 jsonw_bool_field(json_writer_t *self, const char *prop, bool val) jsonw_bool_field() argument 260 jsonw_float_field(json_writer_t *self, const char *prop, double val) jsonw_float_field() argument 267 jsonw_float_field_fmt(json_writer_t *self, const char *prop, const char *fmt, double val) jsonw_float_field_fmt() argument 276 jsonw_uint_field(json_writer_t *self, const char *prop, uint64_t num) jsonw_uint_field() argument 282 jsonw_hu_field(json_writer_t *self, const char *prop, unsigned short num) jsonw_hu_field() argument 288 jsonw_lluint_field(json_writer_t *self, const char *prop, unsigned long long int num) jsonw_lluint_field() argument 296 jsonw_int_field(json_writer_t *self, const char *prop, int64_t num) jsonw_int_field() argument 302 jsonw_null_field(json_writer_t *self, const char *prop) jsonw_null_field() argument [all...] |
/kernel/linux/linux-6.6/tools/bpf/bpftool/ |
H A D | json_writer.c | 29 static void jsonw_indent(json_writer_t *self) in jsonw_indent() argument 32 for (i = 0; i < self->depth; ++i) in jsonw_indent() 33 fputs(" ", self->out); in jsonw_indent() 37 static void jsonw_eol(json_writer_t *self) in jsonw_eol() argument 39 if (!self->pretty) in jsonw_eol() 42 putc('\n', self->out); in jsonw_eol() 43 jsonw_indent(self); in jsonw_eol() 47 static void jsonw_eor(json_writer_t *self) in jsonw_eor() argument 49 if (self->sep != '\0') in jsonw_eor() 50 putc(self in jsonw_eor() 57 jsonw_puts(json_writer_t *self, const char *str) jsonw_puts() argument 92 json_writer_t *self = malloc(sizeof(*self)); jsonw_new() local 105 json_writer_t *self = *self_p; jsonw_destroy() local 114 jsonw_pretty(json_writer_t *self, bool on) jsonw_pretty() argument 119 jsonw_reset(json_writer_t *self) jsonw_reset() argument 126 jsonw_begin(json_writer_t *self, int c) jsonw_begin() argument 134 jsonw_end(json_writer_t *self, int c) jsonw_end() argument 147 jsonw_name(json_writer_t *self, const char *name) jsonw_name() argument 158 jsonw_vprintf_enquote(json_writer_t *self, const char *fmt, va_list ap) jsonw_vprintf_enquote() argument 166 jsonw_printf(json_writer_t *self, const char *fmt, ...) jsonw_printf() argument 177 jsonw_start_object(json_writer_t *self) jsonw_start_object() argument 182 jsonw_end_object(json_writer_t *self) jsonw_end_object() argument 187 jsonw_start_array(json_writer_t *self) jsonw_start_array() argument 192 jsonw_end_array(json_writer_t *self) jsonw_end_array() argument 198 jsonw_string(json_writer_t *self, const char *value) jsonw_string() argument 204 jsonw_bool(json_writer_t *self, bool val) jsonw_bool() argument 209 jsonw_null(json_writer_t *self) jsonw_null() argument 214 jsonw_float_fmt(json_writer_t *self, const char *fmt, double num) jsonw_float_fmt() argument 220 jsonw_float(json_writer_t *self, double num) jsonw_float() argument 226 jsonw_hu(json_writer_t *self, unsigned short num) jsonw_hu() argument 231 jsonw_uint(json_writer_t *self, uint64_t num) jsonw_uint() argument 236 jsonw_lluint(json_writer_t *self, unsigned long long int num) jsonw_lluint() argument 241 jsonw_int(json_writer_t *self, int64_t num) jsonw_int() argument 247 jsonw_string_field(json_writer_t *self, const char *prop, const char *val) jsonw_string_field() argument 253 jsonw_bool_field(json_writer_t *self, const char *prop, bool val) jsonw_bool_field() argument 260 jsonw_float_field(json_writer_t *self, const char *prop, double val) jsonw_float_field() argument 267 jsonw_float_field_fmt(json_writer_t *self, const char *prop, const char *fmt, double val) jsonw_float_field_fmt() argument 276 jsonw_uint_field(json_writer_t *self, const char *prop, uint64_t num) jsonw_uint_field() argument 282 jsonw_hu_field(json_writer_t *self, const char *prop, unsigned short num) jsonw_hu_field() argument 288 jsonw_lluint_field(json_writer_t *self, const char *prop, unsigned long long int num) jsonw_lluint_field() argument 296 jsonw_int_field(json_writer_t *self, const char *prop, int64_t num) jsonw_int_field() argument 302 jsonw_null_field(json_writer_t *self, const char *prop) jsonw_null_field() argument [all...] |
/test/testfwk/xdevice/plugins/ohos/src/ohos/environment/ |
H A D | device.py | 102 def device_action(self, *args, **kwargs): 103 if not self.get_recover_state(): 104 LOG.debug("Device {} {} is false".format(self.device_sn, 110 result = func(self, *args, **kwargs) 118 result = func(self, *args, **kwargs) 121 self.log.exception("Generate report error!", exc_info=False) 126 self.log.error("error type: {}, error: {}".format 131 HdcHelper.CONNECTOR_NAME, self.device_sn, ConfigConst.recover_state)) 132 self.set_recover_state(False) 133 callback_to_outer(self, "recove [all...] |
/base/startup/init/services/modules/seccomp/scripts/ |
H A D | generate_code_from_policy.py | 69 def __init__(self, msg): 183 def __init__(self, arch, function_name_nr_table, is_debug): 184 self.arch = arch 185 self.priority = set() 186 self.allow_list = set() 187 self.blocklist = set() 188 self.priority_with_args = set() 189 self.allow_list_with_args = set() 190 self.head_files = set() 191 self [all...] |
/test/testfwk/developer_test/src/core/driver/ |
H A D | openharmony.py | 88 def __init__(self, config): 89 self.arg_list = {} 90 self.suites_name = None 91 self.config = config 92 self.rerun_attemp = 3 93 self.suite_recorder = {} 94 self.finished = False 95 self.expect_tests_dict = dict() 96 self.finished_observer = None 97 self [all...] |
/test/testfwk/xdevice/plugins/devicetest/runner/ |
H A D | test_runner.py | 65 def __init__(self): 66 self.run_mode = RunnerMode.PIPELINE 67 self.run_list = None 68 self.no_run_list = None 69 self.running = None 70 self.configs = None 71 self.devices = None 72 self.log = Log 73 self.start_time = None 74 self [all...] |