Searched refs:self (Results 1 - 25 of 645) sorted by relevance

1234567891011>>

/linux-master/tools/testing/selftests/tc-testing/
H A DTdcPlugin.py4 def __init__(self):
6 print(' -- {}.__init__'.format(self.sub_class))
8 def pre_suite(self, testcount, testlist):
10 self.testcount = testcount
11 self.testlist = testlist
12 if self.args.verbose > 1:
13 print(' -- {}.pre_suite'.format(self.sub_class))
15 def post_suite(self, index):
18 if self.args.verbose > 1:
19 print(' -- {}.post_suite'.format(self
[all...]
H A DTdcResults.py12 def __init__(self, test_id="", test_name=""):
13 self.test_id = test_id
14 self.test_name = test_name
15 self.result = ResultState.noresult
16 self.failmsg = ""
17 self.errormsg = ""
18 self.steps = []
20 def set_result(self, result):
22 self.result = result
27 def get_result(self)
[all...]
/linux-master/tools/bpf/bpftool/
H A Djson_writer.c29 static void jsonw_indent(json_writer_t *self) argument
32 for (i = 0; i < self->depth; ++i)
33 fputs(" ", self->out);
37 static void jsonw_eol(json_writer_t *self) argument
39 if (!self->pretty)
42 putc('\n', self->out);
43 jsonw_indent(self);
47 static void jsonw_eor(json_writer_t *self) argument
49 if (self->sep != '\0')
50 putc(self
57 jsonw_puts(json_writer_t *self, const char *str) argument
92 json_writer_t *self = malloc(sizeof(*self)); local
105 json_writer_t *self = *self_p; local
114 jsonw_pretty(json_writer_t *self, bool on) argument
119 jsonw_reset(json_writer_t *self) argument
126 jsonw_begin(json_writer_t *self, int c) argument
134 jsonw_end(json_writer_t *self, int c) argument
147 jsonw_name(json_writer_t *self, const char *name) argument
158 jsonw_vprintf_enquote(json_writer_t *self, const char *fmt, va_list ap) argument
166 jsonw_printf(json_writer_t *self, const char *fmt, ...) argument
177 jsonw_start_object(json_writer_t *self) argument
182 jsonw_end_object(json_writer_t *self) argument
187 jsonw_start_array(json_writer_t *self) argument
192 jsonw_end_array(json_writer_t *self) argument
198 jsonw_string(json_writer_t *self, const char *value) argument
204 jsonw_bool(json_writer_t *self, bool val) argument
209 jsonw_null(json_writer_t *self) argument
214 jsonw_float_fmt(json_writer_t *self, const char *fmt, double num) argument
220 jsonw_float(json_writer_t *self, double num) argument
226 jsonw_hu(json_writer_t *self, unsigned short num) argument
231 jsonw_uint(json_writer_t *self, uint64_t num) argument
236 jsonw_lluint(json_writer_t *self, unsigned long long int num) argument
241 jsonw_int(json_writer_t *self, int64_t num) argument
247 jsonw_string_field(json_writer_t *self, const char *prop, const char *val) argument
253 jsonw_bool_field(json_writer_t *self, const char *prop, bool val) argument
260 jsonw_float_field(json_writer_t *self, const char *prop, double val) argument
267 jsonw_float_field_fmt(json_writer_t *self, const char *prop, const char *fmt, double val) argument
276 jsonw_uint_field(json_writer_t *self, const char *prop, uint64_t num) argument
282 jsonw_hu_field(json_writer_t *self, const char *prop, unsigned short num) argument
288 jsonw_lluint_field(json_writer_t *self, const char *prop, unsigned long long int num) argument
296 jsonw_int_field(json_writer_t *self, const char *prop, int64_t num) argument
302 jsonw_null_field(json_writer_t *self, const char *prop) argument
[all...]
H A Djson_writer.h29 void jsonw_pretty(json_writer_t *self, bool on);
32 void jsonw_reset(json_writer_t *self);
35 void jsonw_name(json_writer_t *self, const char *name);
38 void __printf(2, 0) jsonw_vprintf_enquote(json_writer_t *self, const char *fmt,
40 void __printf(2, 3) jsonw_printf(json_writer_t *self, const char *fmt, ...);
41 void jsonw_string(json_writer_t *self, const char *value);
42 void jsonw_bool(json_writer_t *self, bool value);
43 void jsonw_float(json_writer_t *self, double number);
44 void jsonw_float_fmt(json_writer_t *self, const char *fmt, double num);
45 void jsonw_uint(json_writer_t *self, uint64_
[all...]
/linux-master/tools/testing/selftests/bpf/
H A Djson_writer.c29 static void jsonw_indent(json_writer_t *self) argument
32 for (i = 0; i < self->depth; ++i)
33 fputs(" ", self->out);
37 static void jsonw_eol(json_writer_t *self) argument
39 if (!self->pretty)
42 putc('\n', self->out);
43 jsonw_indent(self);
47 static void jsonw_eor(json_writer_t *self) argument
49 if (self->sep != '\0')
50 putc(self
57 jsonw_puts(json_writer_t *self, const char *str) argument
92 json_writer_t *self = malloc(sizeof(*self)); local
105 json_writer_t *self = *self_p; local
114 jsonw_pretty(json_writer_t *self, bool on) argument
119 jsonw_reset(json_writer_t *self) argument
126 jsonw_begin(json_writer_t *self, int c) argument
134 jsonw_end(json_writer_t *self, int c) argument
147 jsonw_name(json_writer_t *self, const char *name) argument
158 jsonw_vprintf_enquote(json_writer_t *self, const char *fmt, va_list ap) argument
166 jsonw_printf(json_writer_t *self, const char *fmt, ...) argument
177 jsonw_start_object(json_writer_t *self) argument
182 jsonw_end_object(json_writer_t *self) argument
187 jsonw_start_array(json_writer_t *self) argument
192 jsonw_end_array(json_writer_t *self) argument
198 jsonw_string(json_writer_t *self, const char *value) argument
204 jsonw_bool(json_writer_t *self, bool val) argument
209 jsonw_null(json_writer_t *self) argument
214 jsonw_float_fmt(json_writer_t *self, const char *fmt, double num) argument
220 jsonw_float(json_writer_t *self, double num) argument
226 jsonw_hu(json_writer_t *self, unsigned short num) argument
231 jsonw_uint(json_writer_t *self, uint64_t num) argument
236 jsonw_lluint(json_writer_t *self, unsigned long long int num) argument
241 jsonw_int(json_writer_t *self, int64_t num) argument
247 jsonw_string_field(json_writer_t *self, const char *prop, const char *val) argument
253 jsonw_bool_field(json_writer_t *self, const char *prop, bool val) argument
260 jsonw_float_field(json_writer_t *self, const char *prop, double val) argument
267 jsonw_float_field_fmt(json_writer_t *self, const char *prop, const char *fmt, double val) argument
276 jsonw_uint_field(json_writer_t *self, const char *prop, uint64_t num) argument
282 jsonw_hu_field(json_writer_t *self, const char *prop, unsigned short num) argument
288 jsonw_lluint_field(json_writer_t *self, const char *prop, unsigned long long int num) argument
296 jsonw_int_field(json_writer_t *self, const char *prop, int64_t num) argument
302 jsonw_null_field(json_writer_t *self, const char *prop) argument
[all...]
H A Djson_writer.h29 void jsonw_pretty(json_writer_t *self, bool on);
32 void jsonw_reset(json_writer_t *self);
35 void jsonw_name(json_writer_t *self, const char *name);
38 void __printf(2, 0) jsonw_vprintf_enquote(json_writer_t *self, const char *fmt,
40 void __printf(2, 3) jsonw_printf(json_writer_t *self, const char *fmt, ...);
41 void jsonw_string(json_writer_t *self, const char *value);
42 void jsonw_bool(json_writer_t *self, bool value);
43 void jsonw_float(json_writer_t *self, double number);
44 void jsonw_float_fmt(json_writer_t *self, const char *fmt, double num);
45 void jsonw_uint(json_writer_t *self, uint64_
[all...]
/linux-master/tools/crypto/ccp/
H A Dtest_dbc.py34 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...]
/linux-master/tools/perf/scripts/python/
H A Dlibxed.py32 def __init__(self, libxed):
35 self.xedd = xedd_t()
36 self.xedp = addressof(self.xedd)
37 libxed.xed_decoded_inst_zero(self.xedp)
38 self.state = xed_state_t()
39 self.statep = addressof(self.state)
41 self.buffer = create_string_buffer(256)
42 self
[all...]
H A Dexported-sql-viewer.py194 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...]
/linux-master/tools/verification/dot2/
H A Ddot2k.py20 def __init__(self, file_path, MonitorType):
23 self.monitor_type = self.monitor_types.get(MonitorType)
24 if self.monitor_type == None:
27 self.monitor_type = MonitorType
28 self.__fill_rv_templates_dir()
29 self.main_c = self.__open_file(self.monitor_templates_dir + "main_" + MonitorType + ".c")
30 self
[all...]
H A Ddot2c.py25 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...]
H A Dautomata.py22 def __init__(self, file_path):
23 self.__dot_path = file_path
24 self.name = self.__get_model_name()
25 self.__dot_lines = self.__open_dot()
26 self.states, self.initial_state, self.final_states = self
[all...]
/linux-master/scripts/
H A Drust_is_available_test.py98 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...]
/linux-master/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/
H A DSchedGui.py23 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...]
H A DEventClass.py38 def __init__(self, name, comm, dso, symbol, raw_buf, ev_type=EVTYPE_GENERIC):
39 self.name = name
40 self.comm = comm
41 self.dso = dso
42 self.symbol = symbol
43 self.raw_buf = raw_buf
44 self.ev_type = ev_type
47 def show(self):
49 (self.name, self
[all...]
/linux-master/scripts/gdb/linux/
H A Dmm.py24 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...]
/linux-master/tools/net/ynl/lib/
H A Dnlspec.py31 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...]
/linux-master/tools/testing/selftests/damon/
H A D_damon_sysfs.py32 def __init__(self, size=None, nr_accesses=None, age=None):
33 self.size = size
34 self.nr_accesses = nr_accesses
35 self.age = age
37 if self.size == None:
38 self.size = [0, 2**64 - 1]
39 if self.nr_accesses == None:
40 self.nr_accesses = [0, 2**64 - 1]
41 if self.age == None:
42 self
[all...]
/linux-master/drivers/net/ethernet/aquantia/atlantic/
H A Daq_vec.c30 struct aq_vec_s *self = container_of(napi, struct aq_vec_s, napi); local
38 if (!self) {
41 for (i = 0U; self->tx_rings > i; ++i) {
42 ring = self->ring[i];
46 if (self->aq_hw_ops->hw_ring_tx_head_update) {
47 err = self->aq_hw_ops->hw_ring_tx_head_update(
48 self->aq_hw,
60 err = self->aq_hw_ops->hw_ring_rx_receive(self->aq_hw,
80 err = self
105 struct aq_vec_s *self = NULL; local
128 aq_vec_ring_alloc(struct aq_vec_s *self, struct aq_nic_s *aq_nic, unsigned int idx, struct aq_nic_cfg_s *aq_nic_cfg) argument
180 aq_vec_init(struct aq_vec_s *self, const struct aq_hw_ops *aq_hw_ops, struct aq_hw_s *aq_hw) argument
226 aq_vec_start(struct aq_vec_s *self) argument
251 aq_vec_stop(struct aq_vec_s *self) argument
268 aq_vec_deinit(struct aq_vec_s *self) argument
285 aq_vec_free(struct aq_vec_s *self) argument
297 aq_vec_ring_free(struct aq_vec_s *self) argument
321 struct aq_vec_s *self = private; local
336 struct aq_vec_s *self = private; local
358 aq_vec_get_affinity_mask(struct aq_vec_s *self) argument
363 aq_vec_is_valid_tc(struct aq_vec_s *self, const unsigned int tc) argument
368 aq_vec_get_sw_stats(struct aq_vec_s *self, const unsigned int tc, u64 *data) argument
[all...]
/linux-master/tools/perf/pmu-events/
H A Dmetric.py13 def ToPerfJson(self) -> str:
17 def ToPython(self) -> str:
21 def Simplify(self):
22 """Returns a simplified version of self."""
25 def Equals(self, other) -> bool:
29 def Substitute(self, name: str, expression: 'Expression') -> 'Expression':
32 def __str__(self) -> str:
33 return self.ToPerfJson()
35 def __or__(self, other: Union[int, float, 'Expression']) -> 'Operator':
36 return Operator('|', self, othe
[all...]
/linux-master/drivers/net/wireless/st/cw1200/
H A Dhwbus.h20 int (*hwbus_memcpy_fromio)(struct hwbus_priv *self, unsigned int addr,
22 int (*hwbus_memcpy_toio)(struct hwbus_priv *self, unsigned int addr,
24 void (*lock)(struct hwbus_priv *self);
25 void (*unlock)(struct hwbus_priv *self);
26 size_t (*align_size)(struct hwbus_priv *self, size_t size);
27 int (*power_mgmt)(struct hwbus_priv *self, bool suspend);
/linux-master/tools/testing/selftests/tc-testing/plugin-lib/
H A DnsPlugin.py21 def __init__(self):
22 self.sub_class = 'ns/SubPlugin'
25 def pre_suite(self, testcount, testlist):
28 def prepare_test(self, test):
36 self._nl_ns_create()
38 self._ipr2_ns_create()
45 self._proc_check()
47 ns = self.args.NAMES['NS']
56 def pre_case(self, test, test_skip):
57 if self
[all...]
/linux-master/drivers/net/ethernet/aquantia/atlantic/hw_atl2/
H A Dhw_atl2_utils.c33 int hw_atl2_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops) argument
37 self->fw_ver_actual = hw_atl2_utils_get_fw_version(self);
39 if (hw_atl_utils_ver_match(HW_ATL2_FW_VER_1X, self->fw_ver_actual)) {
43 self->fw_ver_actual);
46 aq_pr_trace("Detect ATL2FW %x\n", self->fw_ver_actual);
47 self->aq_fw_ops = *fw_ops;
48 err = self->aq_fw_ops->init(self);
50 self
55 hw_atl2_mcp_boot_complete(struct aq_hw_s *self) argument
70 hw_atl2_utils_soft_reset(struct aq_hw_s *self) argument
[all...]
/linux-master/tools/testing/selftests/drivers/s390x/uvdevice/
H A Dtest_uvdevice.c40 self->uv_fd = open(UV_PATH, O_ACCMODE);
42 self->uvio_ioctl.argument_addr = (__u64)self->buffer;
43 self->uvio_ioctl.argument_len = variant->arg_size;
44 self->fault_page =
50 if (self->uv_fd)
51 close(self->uv_fd);
52 munmap((void *)self->fault_page, (size_t)getpagesize());
59 rc = ioctl(self->uv_fd, variant->ioctl_cmd, NULL);
64 rc = ioctl(self
186 att_inval_sizes_test(uint32_t *size, uint32_t max_size, bool test_zero, struct __test_metadata *_metadata, FIXTURE_DATA(attest_fixture) *self) argument
234 att_inval_addr_test(__u64 *addr, struct __test_metadata *_metadata, FIXTURE_DATA(attest_fixture) *self) argument
[all...]
/linux-master/tools/testing/kunit/
H A Dkunit_printer.py18 def __init__(self, output: typing.IO[str]):
19 self._output = output
20 self._use_color = output.isatty()
22 def print(self, message: str) -> None:
23 print(message, file=self._output)
25 def print_with_timestamp(self, message: str) -> None:
27 self.print(f'[{ts}] {message}')
29 def _color(self, code: str, text: str) -> str:
30 if not self._use_color:
34 def red(self, tex
[all...]

Completed in 227 milliseconds

1234567891011>>