Searched refs:self (Results 1 - 25 of 664) 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/testing/selftests/net/lib/py/
H A Dnetns.py9 def __init__(self, name=None):
11 self.name = name
13 self.name = ''.join(random.choice(string.ascii_lowercase) for _ in range(8))
14 ip('netns add ' + self.name)
16 def __del__(self):
17 if self.name:
18 ip('netns del ' + self.name)
19 self.name = None
21 def __enter__(self):
22 return 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/testing/selftests/drivers/net/lib/py/
H A Denv.py39 def __init__(self, src_path, **kwargs):
40 self._ns = None
42 self.env = _load_env_file(src_path)
44 if 'NETIF' in self.env:
45 self.dev = ip("link show dev " + self.env['NETIF'], json=True)[0]
47 self._ns = NetdevSimDev(**kwargs)
48 self.dev = self._ns.nsims[0].dev
49 self
[all...]
H A Dremote_ssh.py12 def __init__(self, name, dir_path):
13 self.name = name
14 self.dir_path = dir_path
15 self._tmpdir = None
17 def __del__(self):
18 if self._tmpdir:
19 cmd("rm -rf " + self._tmpdir, host=self)
20 self._tmpdir = None
22 def cmd(self, com
[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...]
/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/drivers/gpu/drm/msm/registers/
H A Dgen_header.py16 def __init__(self, message):
17 self.message = message
20 def __init__(self, name):
21 self.name = name
22 self.values = []
24 def has_name(self, name):
25 for (n, value) in self.values:
30 def names(self):
31 return [n for (n, value) in self.values]
33 def dump(self)
[all...]
/linux-master/tools/testing/selftests/hid/tests/
H A Dbase_device.py44 def __init__(self, path):
45 self.path = path
47 def __set_value(self, value):
48 with open(self.path, "w") as f:
51 def __get_value(self):
52 with open(self.path) as f:
56 def int_value(self) -> int:
57 return int(self.__get_value())
60 def int_value(self, v: int) -> None:
61 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...]

Completed in 431 milliseconds

1234567891011>>