Home
last modified time | relevance | path

Searched refs:b (Results 1 – 25 of 29) sorted by relevance

12

/kernel/tests/net/test/
Dcstruct_test.py30 def CheckEquals(self, a, b): argument
31 self.assertEqual(a, b)
32 self.assertEqual(b, a)
33 assert a == b
34 assert b == a
35 assert not (a != b) # pylint: disable=g-comparison-negation,superfluous-parens
36 assert not (b != a) # pylint: disable=g-comparison-negation,superfluous-parens
38 def CheckNotEquals(self, a, b): argument
39 self.assertNotEqual(a, b)
40 self.assertNotEqual(b, a)
[all …]
Dparameterization_test.py36 def NameGenerator(a, b, c): argument
37 return str(a) + "_" + str(b) + "_" + str(c)
48 def ParamTestDummyFunc(self, a, b, c): argument
50 "testDummyFunc_" + ParmeterizationTest.NameGenerator(a, b, c))
Dnamespace.py93 libc.umount2(b'/proc', MNT_DETACH) # Ignore failure: might not be mounted
98 libc.umount2(b'/sys/fs/cgroup', MNT_DETACH) # Ign. fail: might not be mounted
99 libc.umount2(b'/sys/fs/bpf', MNT_DETACH) # Ignore fail: might not be mounted
100 libc.umount2(b'/sys', MNT_DETACH) # Ignore fail: might not be mounted
172 matches = sd.DumpAllInetSockets(socket.IPPROTO_TCP, b'',
Dcsocket_test.py48 s.sendto(b"foo", addr)
50 self.assertEqual(b"foo", data)
80 s.sendto(b"foo", addr)
82 self.assertEqual(b"foo", data)
Dxfrm.py125 XFRM_EALG_CBC_AES = b"cbc(aes)"
126 XFRM_EALG_CTR_AES = b"rfc3686(ctr(aes))"
127 XFRM_AALG_HMAC_MD5 = b"hmac(md5)"
128 XFRM_AALG_HMAC_SHA1 = b"hmac(sha1)"
129 XFRM_AALG_HMAC_SHA256 = b"hmac(sha256)"
130 XFRM_AALG_HMAC_SHA384 = b"hmac(sha384)"
131 XFRM_AALG_HMAC_SHA512 = b"hmac(sha512)"
132 XFRM_AALG_AUTH_XCBC_AES = b"xcbc(aes)"
133 XFRM_AEAD_GCM_AES = b"rfc4106(gcm(aes))"
134 XFRM_AEAD_CHACHA20_POLY1305 = b"rfc7539esp(chacha20,poly1305)"
[all …]
Dsock_diag.py136 data = nla_data.strip(b"\x00")
174 return InetDiagSockId((b"\x00" * len(InetDiagSockId)))
226 arg = b""
229 arg = b"\x00\x00" + struct.pack("=H", arg)
254 packed = b""
352 padded += b"\x00" * (16 - len(padded))
374 sock_id = InetDiagSockId((sport, dport, src, dst, iface, b"\x00" * 8))
390 results = self.Dump(req, b"")
430 diag_msgs = n.DumpAllInetSockets(IPPROTO_TCP, b"",
Dxfrm_algorithm_test.py149 crypt = xfrm.XfrmAlgo((b"ecb(cipher_null)", 0))
156 auth = xfrm.XfrmAlgoAuth((b"digest_null", 0, 0))
351 self.assertEqual(b"hello request", data)
352 accepted.send(b"hello response")
367 self.assertEqual(b"hello request", data)
368 sock.sendto(b"hello response", peer)
397 sock_left.send(b"hello request")
399 self.assertEqual(b"hello response", data)
Dtcp_nuke_addr_test.py28 LOOPBACK_DEV = b"lo"
88 data = b"foo"
Dsock_diag_test.py40 NO_BYTECODE = b""
259 b"0208500000000000"
260 b"050848000000ffff"
261 b"071c20000a800000ffffffff00000000000000000000000000000001"
262 b"01041c00"
263 b"0718200002200000ffffffff7f000001"
264 b"0508100000006566"
265 b"00040400"
674 req.id.cookie = b"\x00" * 8
751 self.assertRaisesErrno(ECONNABORTED, self.s.send, b"foo")
[all …]
Dxfrm_test.py248 htons(4500), 16 * b"\x00"))
424 htons(4500), 16 * b"\x00"))
443 data = 19 * b"a"
454 data = b"" # Empty UDP payload
611 b"input hello")
618 self.assertEqual(b"input hello", msg)
622 sock.sendto(b"output hello", (remote_addr, remote_port))
627 self.assertEqual(output_pkt[scapy.UDP].len, len(b"output_hello") + 8)
631 self.assertEqual(b"output hello", bytes(output_pkt[scapy.UDP].payload))
676 b"input hello")
[all …]
Dnet_test.py69 IPV4_PING = b"\x08\x00\x00\x00\x0a\xce\x00\x03"
70 IPV6_PING = b"\x80\x00\x00\x00\x0a\xce\x00\x03"
154 def ByteToHex(b): argument
155 return "%02x" % (ord(b) if isinstance(b, str) else b)
399 pad = b"\x00" * 4
Dcstruct.py91 elements = struct.unpack(fmt, b"\x00" * size)
169 numfields = len(struct.unpack(_format, b"\x00" * _length))
201 self._Parse(b"\x00" * len(self))
277 value = value.rstrip(b"\x00").decode(errors="ignore")
Dxfrm_base.py33 _ALGO_AUTH_NULL = (xfrm.XfrmAlgoAuth((b"digest_null", 0, 0)), b"")
37 _ALGO_CRYPT_NULL = (xfrm.XfrmAlgo((b"ecb(cipher_null)", 0)), b"")
Dping6_test.py279 self.assertTrue(data.startswith(b"\x08\x00"), "Not an IPv4 echo request")
281 self.assertTrue(data.startswith(b"\x80\x00"), "Not an IPv6 echo request")
289 self.assertTrue(rcvd.startswith(b"\x00\x00"), "Not an IPv4 echo reply")
293 self.assertTrue(rcvd.startswith(b"\x81\x00"), "Not an IPv6 echo reply")
349 data = net_test.IPV4_PING + b"foobarbaz"
450 b"\x00" * (len(csocket.SockaddrIn6) - len(csocket.SockaddrIn)))
648 self.assertEqual(b"\xf9\x76", s.recv(32768)[4:6])
654 self.assertEqual(b"\x0a\xce", s.recv(32768)[4:6])
785 data = net_test.IPV4_PING + 20000 * b"a"
793 data = net_test.IPV6_PING + b"\x01" + 19994 * b"\x00" + b"aaaaa"
[all …]
Dpackets.py35 PING_PAYLOAD = b"foobarbaz"
110 def ACK(version, srcaddr, dstaddr, packet, payload=b""):
192 last3bytes = tuple([net_test.ByteToHex(b) for b in solicited[-3:]])
Dnetlink.py81 padding = b"\x00" * util.GetPadLength(NLA_ALIGNTO, datalen)
273 def _Dump(self, command, msg, msgtype, attrs=b""):
288 msg = b"" if msg is None else msg.Pack()
Dleak_test.py46 self.assertEqual(b"", data)
Dbpf.py277 def BpfProgLoad(prog_type, instructions, prog_license=b"GPL"):
278 bpf_prog = b"".join(instructions)
281 log_buf = ctypes.create_string_buffer(b"", LOG_SIZE)
Dbpf_test.py126 sock.sendto(b"foo", addr)
128 assert b"foo" == data
358 b"Apache 2.0")
384 b"Apache 2.0")
407 b"Apache 2.0")
Dgenetlink.py104 data = nla_data.strip(b"\x00")
Diproute.py287 return self._NlAttr(nla_type, interface.encode() + b"\x00")
381 data = nla_data.strip(b"\x00")
676 if len(lladdr) != 6 or any (len(b) not in range(1, 3) for b in lladdr):
699 attrs = self._NlAttrU32(NDA_IFINDEX, ifindex) if ifindex else b""
Dmultinetwork_test.py277 nonce = b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c"
278 dstopts = b"".join([
279 b"\x11\x02", # Next header=UDP, 24 bytes of options.
280 b"\x01\x06", b"\x00" * 6, # PadN, 6 bytes of padding.
281 b"\x8b\x0c", # ILNP nonce, 12 bytes.
1146 payload = self.PAYLOAD_SIZE * b"a"
1423 s.sendto, b"foo", (remoteaddr, 53))
1425 self.assertEqual(len(b"foo"), s.sendto(b"foo", (remoteaddr, 53)))
Dcsocket.py150 msg_control = b""
164 padding = b"\x00" * util.GetPadLength(CMSG_ALIGNTO, datalen)
Dtun_twister.py97 os.write(self._signal_write, b"bye")
/kernel/tests/net/test/rootfs/
Dbullseye-rockpi.sh32 -b /boot/dtb/rockchip/rk3399-rock-pi-4b.dtb /boot/boot.fit
170 mw.b ${loadaddr} 0 0x400000

12