Home
last modified time | relevance | path

Searched refs:cls (Results 1 – 12 of 12) sorted by relevance

/kernel/tests/net/test/
Dmultinetwork_base.py127 def UidRangeForNetid(cls, netid): argument
129 cls.UID_RANGE_SIZE * netid,
130 cls.UID_RANGE_SIZE * (netid + 1) - 1
134 def UidForNetid(cls, netid): argument
137 return random.randint(*cls.UidRangeForNetid(netid))
140 def _TableForNetid(cls, netid): argument
141 if cls.AUTOCONF_TABLE_OFFSET and netid in cls.ifindices:
142 return cls.ifindices[netid] + (-cls.AUTOCONF_TABLE_OFFSET)
168 def _MyIPv4Address(cls, netid): argument
172 def _MyIPv6Address(cls, netid): argument
[all …]
Dutil.py19 def InjectParameterizedTest(cls, param_list, name_generator): argument
33 param_test_names = [name for name in dir(cls) if name.startswith("ParamTest")]
42 func = getattr(cls, test_name)
52 setattr(cls, new_name, _GetTestClosure(func, params))
Dremoved_feature_test.py29 def loadKernelConfig(cls): argument
30 cls.KCONFIG = {}
38 cls.KCONFIG[parts[0]] = parts[1]
41 def setUpClass(cls): argument
42 cls.loadKernelConfig()
Dtun_twister.py148 def DecodePacket(cls, bytes_in): argument
150 return cls._DecodeIpPacket(bytes_in)
153 def TwistPacket(cls, packet): argument
204 def DecodePacket(cls, bytes_in): argument
208 def TwistPacket(cls, packet): argument
212 twisted_ip_layer = super(TapTwister, cls).TwistPacket(ip_layer)
Dparameterization_test.py40 def InjectTests(cls): argument
46 util.InjectParameterizedTest(cls, param_list, cls.NameGenerator)
Dresilient_rs_test.py65 def setUpClass(cls): argument
72 def tearDownClass(cls): argument
79 def isIPv6RouterSolicitation(cls, packet): argument
85 (ord(packet[14 + 40]) == cls.ROUTER_SOLICIT))
Dcstruct.py97 def __len__(cls): argument
98 return cls._length
100 def __init__(cls, unused_name, unused_bases, namespace): argument
102 type.__init__(cls, namespace["_name"], unused_bases, namespace)
225 def __len__(cls): argument
226 return cls._length
Dping6_test.py216 def WaitForReplyThreads(cls): argument
224 for netid in cls.NETIDS:
225 if all(thread.IsStarted() for thread in list(cls.reply_threads.values())):
233 def StopReplyThreads(cls): argument
234 for thread in list(cls.reply_threads.values()):
238 def setUpClass(cls): argument
239 super(Ping6Test, cls).setUpClass()
240 cls.reply_threads = {}
241 for netid in cls.NETIDS:
242 cls.reply_threads[netid] = PingReplyThread(
[all …]
Dbpf_test.py470 def setUpClass(cls): argument
471 super(BpfCgroupTest, cls).setUpClass()
472 cls._cg_dir = tempfile.mkdtemp(prefix="cg_bpf-")
473 cmd = "mount -t cgroup2 cg_bpf %s" % cls._cg_dir
479 os.rmdir(cls._cg_dir)
481 cls._cg_fd = os.open(cls._cg_dir, os.O_DIRECTORY | os.O_RDONLY)
484 def tearDownClass(cls): argument
485 os.close(cls._cg_fd)
486 subprocess.call(("umount %s" % cls._cg_dir).split())
487 os.rmdir(cls._cg_dir)
[all …]
Dneighbour_test.py64 def setUpClass(cls): argument
65 super(NeighbourTest, cls).setUpClass()
66 for netid in cls.tuns:
67 iface = cls.GetInterfaceName(netid)
70 cls.SetSysctl(
72 cls.DELAY_TIME_MS / 1000)
73 cls.SetSysctl(
75 cls.RETRANS_TIME_MS)
Dtcp_fastopen_test.py36 def setUpClass(cls): argument
37 super(TcpFastOpenTest, cls).setUpClass()
38 cls.tcp_metrics = tcp_metrics.TcpMetrics()
Dxfrm_algorithm_test.py166 def InjectTests(cls): argument
173 util.InjectParameterizedTest(cls, param_list, cls.TestNameGenerator)
177 util.InjectParameterizedTest(cls, param_list, cls.TestNameGenerator)