/freebsd/sys/contrib/openzfs/contrib/pyzfs/libzfs_core/test/ |
H A D | test_nvlist.py | 8 # http://www.apache.org/licenses/LICENSE-2.0 37 def _dict_to_nvlist_to_dict(self, props): argument 44 def _assertIntDictsEqual(self, dict1, dict2): argument 45 self.assertEqual( 49 self.assertEqual(int(dict1[key]), int(dict2[key])) 51 def _assertIntArrayDictsEqual(self, dict1, dict2): argument 52 self.assertEqual( 58 self.assertEqual( 61 self.assertEqual(int(x), int(y)) 63 def test_empty(self): argument [all …]
|
H A D | test_libzfs_core.py | 8 # http://www.apache.org/licenses/LICENSE-2.0 68 mount_cmd = ['mount', '-F', 'zfs', fs, mntdir] 70 mount_cmd = ['mount', '-t', 'zfs', fs, mntdir] 71 unmount_cmd = ['umount', '-f', mntdir] 259 platform.system() != 'Linux', 'snapshot is not auto-unmounted') 305 def setUp(self): argument 308 def tearDown(self): argument 312 def assertExists(self, name): argument 313 self.assertTrue( 316 def assertNotExists(self, name): argument [all …]
|
/freebsd/tools/sched/ |
H A D | schedgraph.py | 3 # Copyright (c) 2002-2003, 2009, Jeffrey Roberson <jeff@freebsd.org> 37 # - Install the ports/x11-toolkits/py-tkinter package; e.g. 38 # pkg install x11-toolkits/py-tkinter 39 # - Add KTR_SCHED to KTR_COMPILE and KTR_MASK in your KERNCONF; e.g. 44 # - It is encouraged to increase KTR_ENTRIES size to gather enough 49 # - Rebuild kernel with proper changes to KERNCONF and boot new kernel. 50 # - Run your workload to be profiled. 51 # - While the workload is continuing (i.e. before it finishes), disable 58 # - Dump the trace to a file: 'ktrdump -ct > ktr.out' 59 # - Alternatively, use schedgraph.d script in this directory for getting [all …]
|
/freebsd/tools/tools/shlib-compat/ |
H A D | shlib-compat.py | 2 #- 56 def init(self, outname): argument 57 if outname and outname != '-': 58 self.out = open(outname, "w") 86 def __init__(self): argument 87 self.exclude = [] 88 self.include = [] 90 def compile(self): argument 91 self.re_exclude = [ re.compile(x) for x in self.exclude ] 92 self.re_include = [ re.compile(x) for x in self.include ] [all …]
|
/freebsd/sys/tools/syscalls/core/ |
H A D | syscall.lua | 1 -- 2 -- SPDX-License-Identifier: BSD-2-Clause 3 -- 4 -- Copyright (c) 2024 Tyler Baxter <agge@FreeBSD.org> 5 -- Copyright (c) 2023 Warner Losh <imp@bsdimp.com> 6 -- Copyright (c) 2019 Kyle Evans <kevans@FreeBSD.org> 7 -- 28 -- flags beyond this point are modifiers 35 -- Native is an arbitrarily large number to have a constant and not 36 -- interfere with compat numbers. [all …]
|
H A D | scarg.lua | 1 -- 2 -- SPDX-License-Identifier: BSD-2-Clause 3 -- 4 -- Copyright (c) 2021-2024 SRI International 5 -- Copyright (c) 2024 Tyler Baxter <agge@FreeBSD.org> 6 -- Copyright (c) 2023 Warner Losh <imp@bsdimp.com> 7 -- Copyright (c) 2019 Kyle Evans <kevans@FreeBSD.org> 8 -- 17 -- Check this argument against config for ABI changes from native. Return TRUE 18 -- if there are. [all …]
|
/freebsd/contrib/ntp/sntp/libevent/ |
H A D | event_rpcgen.py | 3 # Copyright (c) 2005-2007 Niels Provos <provos@citi.umich.edu> 4 # Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 9 # pylint: disable=too-many-lines 10 # pylint: disable=too-many-branches 11 # pylint: disable=too-many-public-methods 12 # pylint: disable=too-many-statements 13 # pylint: disable=global-statement 35 STRUCT_REF_RE = re.compile(r"^struct\[(?P<name>[a-zA-Z_][a-zA-Z0-9_]*)\]$") 36 STRUCT_DEF_RE = re.compile(r"^struct +[a-zA-Z_][a-zA-Z0-9_]* *{$") 57 def __init__(self, why): # pylint: disable=super-init-not-called argument [all …]
|
/freebsd/contrib/libevent/ |
H A D | event_rpcgen.py | 3 # Copyright (c) 2005-2007 Niels Provos <provos@citi.umich.edu> 4 # Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 9 # pylint: disable=too-many-lines 10 # pylint: disable=too-many-branches 11 # pylint: disable=too-many-public-methods 12 # pylint: disable=too-many-statements 13 # pylint: disable=global-statement 35 STRUCT_REF_RE = re.compile(r"^struct\[(?P<name>[a-zA-Z_][a-zA-Z0-9_]*)\]$") 36 STRUCT_DEF_RE = re.compile(r"^struct +[a-zA-Z_][a-zA-Z0-9_]* *{$") 57 def __init__(self, why): # pylint: disable=super-init-not-called argument [all …]
|
/freebsd/contrib/lib9p/pytest/ |
H A D | p9conn.py | 4 handle plan9 server <-> client connections 35 # namedtuple so that we can create instances with all-None 53 from the Rerror reply, or from converting the errno in a dot-L 54 or dot-u Rerror reply. The error number may be None if the 56 None or empty string if a non-None errno supplies the error 59 def __init__(self, client, op, msg, etype, errno): argument 60 self.client = str(client) 61 self.op = op 62 self.msg = msg 63 self.etype = etype # 'Rerror' or 'Rlerror' [all …]
|
/freebsd/crypto/openssl/util/perl/TLSProxy/ |
H A D | ClientHello.pm | 24 my $self = $class->SUPER::new( 32 $self->{client_version} = 0; 33 $self->{random} = []; 34 $self->{session_id_len} = 0; 35 $self->{session} = ""; 36 $self->{ciphersuite_len} = 0; 37 $self->{ciphersuites} = []; 38 $self->{comp_meth_len} = 0; 39 $self->{comp_meths} = []; 40 $self->{extensions_len} = 0; [all …]
|
H A D | Proxy.pm | 1 # Copyright 2016-2024 The OpenSSL Project Authors. All Rights Reserved. 40 my $s = IO::Socket::INET6->new( 46 $s->close(); 49 $IP_factory = sub { IO::Socket::INET6->new(Domain => AF_INET6, @_); }; 54 my $s = IO::Socket::IP->new( 60 $s->close(); 63 $IP_factory = sub { IO::Socket::IP->new(@_); }; 66 $IP_factory = sub { IO::Socket::INET->new(@_); }; 83 my $self = { 103 ciphers => "AES128-SHA", [all …]
|
H A D | ServerKeyExchange.pm | 24 my $self = $class->SUPER::new( 33 $self->{p} = ""; 34 $self->{g} = ""; 35 $self->{pub_key} = ""; 36 $self->{sigalg} = -1; 37 $self->{sig} = ""; 39 return $self; 44 my $self = shift; 45 my $sigalg = -1; 48 return if TLSProxy::Proxy->ciphersuite() [all …]
|
/freebsd/sys/contrib/openzfs/tests/test-runner/bin/ |
H A D | test-runner.py.in | 68 return t.tv_sec + t.tv_nsec * 1e-9 75 def __init__(self): argument 76 self.starttime = None 77 self.returncode = None 78 self.runtime = '' 79 self.stdout = [] 80 self.stderr = [] 81 self.kmemleak = '' 82 self.result = '' 84 def done(self, proc, killed, reran): argument [all …]
|
/freebsd/tests/atf_python/sys/netlink/ |
H A D | attrs.py | 12 def __init__(self, nla_type, data): argument 14 self._nla_type = nla_type.value 15 self._enum = nla_type 17 self._nla_type = nla_type 18 self._enum = None 19 self.nla_list = [] 20 self._data = data 23 def nla_type(self): argument 24 return self._nla_type & 0x3FFF 27 def nla_len(self): argument [all …]
|
H A D | message.py | 36 def __init__(self, helper, nlmsg_type): argument 37 self.nlmsg_type = enum_or_int(nlmsg_type) 38 self.nla_list = [] 39 self._orig_data = None 40 self.helper = helper 41 self.nl_hdr = Nlmsghdr( 42 nlmsg_type=self.nlmsg_type, nlmsg_seq=helper.get_seq(), nlmsg_pid=helper.pid 44 self.base_hdr = None 46 def set_request(self, need_ack=True): argument 47 self.add_nlflags([NlmBaseFlags.NLM_F_REQUEST]) [all …]
|
/freebsd/contrib/llvm-project/lldb/bindings/python/ |
H A D | python-extensions.swig | 3 def __eq__(self, rhs): 4 if not isinstance(rhs, type(self)): 7 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs) 9 def __ne__(self, rhs): 10 if not isinstance(rhs, type(self)): 13 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs) 19 def __eq__(self, rhs): 20 if not isinstance(rhs, type(self)) [all...] |
/freebsd/contrib/ntp/scripts/monitoring/ |
H A D | lr.pl | 10 ;# Friedrich-Alexander Universitaet Erlangen-Nuernberg 13 ;# Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> 23 ## B = (n * Sum(xy) - Sum(x) * Sum(y)) / (n * Sum(x^2) - Sum(x)^2) 25 ## A = (Sum(y) - B * Sum(x)) / n 45 my $self = shift; 47 $self->{n} = 0; 48 $self->{sx} = 0.0; 49 $self->{sx2} = 0.0; 50 $self->{sxy} = 0.0; 51 $self->{sy} = 0.0; [all …]
|
/freebsd/libexec/nuageinit/ |
H A D | yaml.lua | 1 --- 2 -- SPDX-License-Identifier: MIT 3 -- 4 -- Copyright (c) 2017 Dominic Letz dominicletz@exosite.com 43 rep = rep .. string.rep(" ", indent) -- indent it 69 return s:gsub("^[" .. what .. "]*(.-)["..what.."]*$", "%1") 92 function Parser.new (self, tokens) 93 self.tokens = tokens 94 self.parse_stack = {} 95 self.refs = {} [all …]
|
/freebsd/contrib/bmake/mk/ |
H A D | meta2deps.py | 26 'W' files opened for write or read-write, 39 SPDX-License-Identifier: BSD-2-Clause 44 Copyright (c) 2011-2020, Simon J. Gerraty 45 Copyright (c) 2011-2017, Juniper Networks, Inc. 83 path = path[0:-2] 88 print("skipping non-existent:", path, file=debug_out) 103 p = '/'.join(dw[:- 198 __init__(self, name, conf={}) global() argument 323 reset(self) global() argument 330 dirdeps(self, sep='n') global() argument 334 src_dirdeps(self, sep='n') global() argument 338 file_depends(self, out=None) global() argument 349 seenit(self, dir) global() argument 353 add(self, list, data, clue='') global() argument 360 find_top(self, path, list) global() argument 369 find_obj(self, objroot, dir, path, input) global() argument 403 try_parse(self, name=None, file=None) global() argument 412 parse(self, name=None, file=None) global() argument 570 is_src(self, base, dir, rdir) global() argument 585 parse_path(self, path, cwd, op=None, w=[]) global() argument [all...] |
/freebsd/share/mk/ |
H A D | meta2deps.py | 26 'W' files opened for write or read-write, 39 SPDX-License-Identifier: BSD-2-Clause 44 Copyright (c) 2011-2020, Simon J. Gerraty 45 Copyright (c) 2011-2017, Juniper Networks, Inc. 83 path = path[0:-2] 88 print("skipping non-existent:", path, file=debug_out) 103 p = '/'.join(dw[:- 198 __init__(self, name, conf={}) global() argument 323 reset(self) global() argument 330 dirdeps(self, sep='n') global() argument 334 src_dirdeps(self, sep='n') global() argument 338 file_depends(self, out=None) global() argument 349 seenit(self, dir) global() argument 353 add(self, list, data, clue='') global() argument 360 find_top(self, path, list) global() argument 369 find_obj(self, objroot, dir, path, input) global() argument 403 try_parse(self, name=None, file=None) global() argument 412 parse(self, name=None, file=None) global() argument 570 is_src(self, base, dir, rdir) global() argument 585 parse_path(self, path, cwd, op=None, w=[]) global() argument [all...] |
/freebsd/tests/atf_python/sys/net/ |
H A D | vnet.py | 21 def run_cmd(cmd: str, verbose=True) -> str: 27 def get_topology_id(test_id: str) -> str: 30 "test_ip6_output.py::TestIP6Output::test_output6_pktinfo[ipandif]" -> 33 return ":".join(test_id.split("::")[-2:]) 36 def convert_test_name(test_name: str) -> str: 40 if char.isalnum() or char in ("_", "-", ":"): 52 def __init__(self, iface_alias: str, iface_name: str): argument 53 self.name = iface_name 54 self.alias = iface_alias 55 self.vnet_name = "" [all …]
|
/freebsd/contrib/wpa/wpa_supplicant/examples/p2p/ |
H A D | p2p_connect.py | 17 print(" %s -i <interface_name> -m <wps_method> \ " \ 19 print(" -a <addr> [-p <pin>] [-g <go_intent>] \ ") 20 print(" [-w <wpas_dbus_interface>]") 22 print(" -i = interface name") 23 print(" -m = wps method") 24 print(" -a = peer address") 25 print(" -p = pin number (8 digits)") 26 print(" -g = group owner intent") 27 print(" -w = wpas dbus interface = fi.w1.wpa_supplicant1") 29 print(" %s -i wlan0 -a 0015008352c0 -m display -p 12345670" % sys.argv[0]) [all …]
|
/freebsd/tests/atf_python/sys/netpfil/ipfw/ |
H A D | ioctl.py | 57 def __init__(self, obj_type): argument 59 self.obj_type = obj_type.value 60 self._enum = obj_type 62 self.obj_type = obj_type 63 self._enum = enum_from_int(self.obj_enum_class, obj_type) 64 self.obj_list = [] 66 def add_obj(self, obj): argument 67 self.obj_list.append(obj) 70 def len(self): argument 71 return len(bytes(self)) [all …]
|
/freebsd/contrib/libucl/src/ |
H A D | tree.h | 1 /* tree.h -- AVL trees (in the spirit of BSD's 'queue.h') -*- C -*- */ 19 /* This file defines an AVL balanced binary tree [Georgii M. Adelson-Velskii and 21 * Doklady Akademii Nauk SSSR, 146:263-266, 1962 (Russian). Also in Myron 22 * J. Ricci (trans.), Soviet Math, 3:1259-1263, 1962 (English)]. 27 * the root and two pointers to child nodes (singly-linked for minimum space, at 30 * tree may be traversed in two directions: forward (in-order left-to-right) and 31 * reverse (in-order, right-to-left). 70 #define TREE_DELTA(self, field) \ argument 71 (( (((self)->field.avl_left) ? (self)->field.avl_left->field.avl_height : 0)) \ 72 - (((self)->field.avl_right) ? (self)->field.avl_right->field.avl_height : 0)) [all …]
|
/freebsd/contrib/llvm-project/lldb/bindings/interface/ |
H A D | SBDataExtensions.i | 6 def __len__(self): 7 return self.GetByteSize() 10 def __init__(self, sbdata, readerfunc, item_size): 11 self.sbdata = sbdata 12 self.readerfunc = readerfunc 13 self.item_size = item_size 14 def __getitem__(self,key): 17 for x in range(*key.indices(self.__len__())): 18 list.append(self.__getitem__(x)) 22 …key = key * self.item_size # SBData uses byte-based indexes, but we want to use itemsize-based ind… [all …]
|