Home
last modified time | relevance | path

Searched +full:test +full:- +full:rules (Results 1 – 25 of 252) sorted by relevance

1234567891011

/linux/Documentation/admin-guide/aoe/
H A Dudev-install.sh1 # install the aoe-specific udev rules from udev.txt into
10 if test -z "$conf"; then
11 if test -r /etc/udev/udev.conf; then
14 conf="`find /etc -type f -name udev.conf 2> /dev/null`"
15 if test -z "$conf" || test ! -r "$conf"; then
22 # find the directory where udev rules are stored, often
23 # /etc/udev/rules.d
25 rules_d="`sed -n '/^udev_rules=/{ s!udev_rules=!!; s!\"!!g; p; }' $conf`"
26 if test -z "$rules_d" ; then
27 rules_d=/etc/udev/rules.d
[all …]
/linux/security/apparmor/
H A Dcapability.c1 // SPDX-License-Identifier: GPL-2.0-only
7 * Copyright (C) 1998-2008 Novell/SUSE
8 * Copyright 2009-2010 Canonical Ltd.
43 * audit_cb - call back for capability components of audit struct
52 audit_log_untrustedstring(ab, capability_names[sa->u.cap]); in audit_cb()
56 * audit_caps - audit a capability
60 * @error: error code returned by test
65 * Returns: 0 or ad->error on success, error code on failure
72 struct aa_ruleset *rules = profile->label.rules[0]; in audit_caps() local
76 ad->error = error; in audit_caps()
[all …]
H A Dfile.c1 // SPDX-License-Identifier: GPL-2.0-only
7 * Copyright (C) 1998-2008 Novell/SUSE
8 * Copyright 2009-2010 Canonical Ltd.
41 * file_audit_cb - call back for file specific audit fields
49 kuid_t fsuid = ad->subj_cred ? ad->subj_cred->fsuid : current_fsuid(); in file_audit_cb()
52 if (ad->request & AA_AUDIT_FILE_MASK) { in file_audit_cb()
54 map_mask_to_chr_mask(ad->request)); in file_audit_cb()
57 if (ad->denied & AA_AUDIT_FILE_MASK) { in file_audit_cb()
59 map_mask_to_chr_mask(ad->denied)); in file_audit_cb()
62 if (ad->request & AA_AUDIT_FILE_MASK) { in file_audit_cb()
[all …]
H A Ddomain.c1 // SPDX-License-Identifier: GPL-2.0-only
7 * Copyright (C) 2002-2008 Novell/SUSE
8 * Copyright 2009-2010 Canonical Ltd.
33 "conflicting profile attachments - ix fallback";
35 "conflicting profile attachments - ux fallback";
38 * may_change_ptraced_domain - check if can change profile on ptraced task
82 /**** TODO: dedup to aa_label_match - needs perm and dfa, merging
85 * and policy->dfa with file->dfa
88 * Assumes visibility test has already been done.
90 * visibility test.
[all …]
H A Dresource.c1 // SPDX-License-Identifier: GPL-2.0-only
7 * Copyright (C) 1998-2008 Novell/SUSE
8 * Copyright 2009-2010 Canonical Ltd.
36 rlim_names[ad->rlim.rlim], ad->rlim.max); in audit_cb()
37 if (ad->peer) { in audit_cb()
39 aa_label_xaudit(ab, labels_ns(ad->subj_label), ad->peer, in audit_cb()
45 * audit_resource - audit setting resource limit
54 * Returns: 0 or ad->error else other error code on failure
75 * aa_map_resource - map compiled policy resource to internal #
92 struct aa_ruleset *rules = profile->label.rules[0]; in profile_setrlimit() local
[all …]
H A Dlabel.c1 // SPDX-License-Identifier: GPL-2.0-only
27 * code - will take a ref count on a label if it needs the label
29 * profiles - each profile is a label
30 * secids - a pinned secid will keep a refcount of the label it is
32 * objects - inode, files, sockets, ...
45 /* p->label will not updated any more as p is dead */ in free_proxy()
46 aa_put_label(rcu_dereference_protected(proxy->label, true)); in free_proxy()
48 RCU_INIT_POINTER(proxy->label, (struct aa_label *)PROXY_POISON); in free_proxy()
66 kref_init(&new->count); in aa_alloc_proxy()
67 rcu_assign_pointer(new->label, aa_get_label(label)); in aa_alloc_proxy()
[all …]
/linux/tools/perf/tests/shell/lib/
H A Dperf_metric_validation.py1 # SPDX-License-Identifier: GPL-2.0
19 def __repr__(self) -> str:
42 self.rules = None
56 # vars for test pass/failure statistics
78 def read_json(self, filename: str) -> dict:
102 def get_bounds(self, lb, ub, error, alias={}, ridx: int = 0) -> list:
111 upper bound, return -1 if the upper bound is a metric value and is not collected
134 ubv = get_bound_value(ub, -1, ridx)
143 def get_value(self, name: str, ridx: int = 0) -> list:
147 All future test(s) on this metric will fail.
[all …]
/linux/tools/testing/selftests/drivers/net/mlxsw/
H A Dtc_flower_scale.sh2 # SPDX-License-Identifier: GPL-2.0
4 # Test for resource limit of offloaded flower rules. The test adds a given
6 # indication for all of the tc flower rules. This file contains functions to set
7 # up a testing topology and run the test, and is meant to be sourced from a test
8 # script that calls the testing routine with a given number of rules.
56 if [[ -v TC_FLOWER_BATCH_FILE ]]; then
57 rm -f $TC_FLOWER_BATCH_FILE
76 cat >> $TC_FLOWER_BATCH_FILE <<-EOF
86 tc -b $TC_FLOWER_BATCH_FILE
94 local last=$((count - 1))
[all …]
/linux/tools/testing/selftests/net/netfilter/
H A Dxt_string.sh2 # SPDX-License-Identifier: GPL-2.0
4 # return code to signal skipped test
10 checktool "socat -h" "run test without socat"
11 checktool "iptables --version" "test needs iptables"
18 rm -f "$infile"
25 ip -net "$netns" link add d0 type dummy
26 ip -net "$netns" link set d0 up
27 ip -net "$netns" addr add 10.1.2.1/24 dev d0
33 #ip netns exec "$netns" tcpdump -npXi d0 &
39 iptables -A OUTPUT -o d0 -m string \
[all …]
H A Dnft_audit.sh2 # SPDX-License-Identifier: GPL-2.0
9 if [ -r /var/run/auditd.pid ];then
13 if [ "$pid" -eq "$p" ]; then
19 nft --version >/dev/null 2>&1 || {
25 nft --check -f /dev/stdin >/dev/null 2>&1 <<EOF
28 reset rules t c
31 if [ "$?" -ne 0 ];then
32 echo -n "SKIP: nft reset feature test failed: "
33 nft --version
38 [ "${1}" != "run" ] && { unshare -n "${0}" run; exit $?; }
[all …]
/linux/lib/
H A DKconfig.kcsan1 # SPDX-License-Identifier: GPL-2.0-only
7 def_bool (CC_IS_CLANG && $(cc-option,-fsanitize=thread -mllvm -tsan-distinguish-volatil
[all...]
/linux/drivers/net/phy/
H A Ddp83td510.c1 // SPDX-License-Identifier: GPL-2.0
16 /* Bit 7 - mii_interrupt, active high. Clears on read.
40 * 32-bit or 16-bit counters for TX and RX statistics and must be read in
43 * - DP83TD510E_PKT_STAT_1: Contains TX packet count bits [15:0].
44 * - DP83TD510E_PKT_STAT_2: Contains TX packet count bits [31:16].
45 * - DP83TD510E_PKT_STAT_3: Contains TX error packet count.
46 * - DP83TD510E_PKT_STAT_4: Contains RX packet count bits [15:0].
47 * - DP83TD510E_PKT_STAT_5: Contains RX packet count bits [31:16].
48 * - DP83TD510E_PKT_STAT_6: Contains RX error packet count.
68 * "Application Report - DP83TD510E Cable Diagnostics Toolkit":
[all …]
/linux/tools/testing/selftests/hid/tests/
H A Dbase.py2 # SPDX-License-Identifier: GPL-2.0
3 # -*- coding: utf-8 -*-
22 logger = logging.getLogger("hidtools.test.base")
143 name = f"uhid test {self.__class__.__name__}"
144 if not name.startswith("uhid test "):
145 name = "uhid test " + self.name
169 # List of kernel modules to load before starting the test
170 # if any module is not available (not compiled), the test will skip.
172 # KernelModule("playstation", "hid-playstation")
175 # List of in kernel HID-BPF object files to load
[all …]
/linux/drivers/net/ethernet/microchip/vcap/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
9 bool "VCAP (Versatile Content-Aware Processor) library"
13 A VCAP is essentially a TCAM with rules consisting of
15 - Programmable key fields
16 - Programmable action fields
17 - A counter (which may be only one bit wide)
21 - A number of lookups
22 - A keyset configuration per port per lookup
24 The VCAP implementation provides switchcore independent handling of rules
27 - Creating and deleting rules
[all …]
H A Dvcap_api_kunit.c1 // SPDX-License-Identifier: BSD-3-Clause
3 * Microchip VCAP API kunit test suite
6 #include <kunit/test.h>
11 /* First we have the test infrastructure that emulates the platform
39 if (kslist->cnt > 0) { in test_val_keyset()
40 switch (admin->vtype) { in test_val_keyset()
42 for (idx = 0; idx < kslist->cnt; idx++) { in test_val_keyset()
43 if (kslist->keysets[idx] == VCAP_KFS_ETAG) in test_val_keyset()
44 return kslist->keysets[idx]; in test_val_keyset()
45 if (kslist->keysets[idx] == VCAP_KFS_PURE_5TUPLE_IP4) in test_val_keyset()
[all …]
H A Dvcap_api_debugfs_kunit.c1 // SPDX-License-Identifier: BSD-3-Clause
3 * Microchip VCAP API kunit test suite
6 #include <kunit/test.h>
12 /* First we have the test infrastructure that emulates the platform
43 if (kslist->cnt > 0) { in test_val_keyset()
44 switch (admin->vtype) { in test_val_keyset()
46 for (idx = 0; idx < kslist->cnt; idx++) { in test_val_keyset()
47 if (kslist->keysets[idx] == VCAP_KFS_ETAG) in test_val_keyset()
48 return kslist->keysets[idx]; in test_val_keyset()
49 if (kslist->keysets[idx] == in test_val_keyset()
[all …]
/linux/samples/bpf/
H A Dcookie_uid_helper_example.c1 /* This test is a demo of using get_socket_uid and get_socket_cookie
6 * TEST:
7 * ./run_cookie_uid_helper_example.sh -option
9 * -t: do traffic monitoring test, the program will continuously
22 * -s: do getsockopt SO_COOKIE test, the program will set up a pair of
92 /* pc2-4: save &socketCookie to r7 for future usage*/ in prog_load()
93 BPF_STX_MEM(BPF_DW, BPF_REG_10, BPF_REG_0, -8), in prog_load()
95 BPF_ALU64_IMM(BPF_ADD, BPF_REG_7, -8), in prog_load()
97 * pc5-8: set up the registers for BPF_FUNC_map_lookup_elem, in prog_load()
107 * Otherwise do pc10-22 to setup a new data entry. in prog_load()
[all …]
/linux/tools/testing/selftests/landlock/
H A Dfs_test.c1 // SPDX-License-Identifier: GPL-2.0
3 * Landlock tests - Filesystem
5 * Copyright © 2017-2020 Mickaël Salaün <mic@digikod.net>
7 * Copyright © 2020-2022 Microsoft Corporation
169 /* Ignores too-long filesystem names. */ in supports_filesystem()
255 for (i = strlen(walker); i > 0; i--) { in remove_path()
290 return mount(mnt->source ?: mnt->type, target, mnt->type, mnt->flags, in mount_opt()
291 mnt->data); in mount_opt()
309 TH_LOG("Failed to mount the %s filesystem: %s", mnt->type, in prepare_layout_opt()
333 * According to the test environment, the mount point of the in cleanup_layout()
[all …]
/linux/tools/memory-model/Documentation/
H A Drecipes.txt8 and the third section provides a few rules of thumb.
20 ------------------------------------
31 2. Compilers are permitted to use the "as-if" rule. That is, a
33 as long as the results of a single-threaded execution appear
34 just as if the compiler had followed all the relevant rules.
41 your full-ordering warranty, as do undersized accesses that load
51 holding the update-side lock, reads from that variable
62 -------
66 locklessly accessing lock-protected shared variables.
68 Locking is well-known and straightforward, at least if you don't think
[all …]
/linux/tools/testing/selftests/mm/
H A DMakefile1 # SPDX-License-Identifier: GPL-2.0
12 uname_M := $(shell uname -m 2>/dev/null || echo not)
14 uname_M := $(shell echo $(CROSS_COMPILE) | grep -o '^[a-z0-9]\+')
16 ARCH ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/' -e 's/ppc64.*/powerpc/')
19 # Without this, failed build products remain, with up-to-date timestamps,
24 # Avoid accidental wrong builds, due to built-in rules working just a little
25 # bit too well--but not quite as well as required for our situation here.
29 # However, the built-in rules, if not suppressed, will pick up CFLAGS and the
30 # initial LDLIBS (but not the target-specific LDLIBS, because those are only
34 MAKEFLAGS += --no-builtin-rules
[all …]
/linux/tools/testing/selftests/kexec/
H A Dtest_kexec_file_load.sh2 # SPDX-License-Identifier: GPL-2.0
8 # To determine whether the kernel image is signed, this test depends
9 # on pesign and getfattr. This test also requires the kernel to be
11 # enabled or access to the extract-ikconfig script.
13 TEST="KEXEC_FILE_LOAD"
16 trap "{ rm -f $IKCONFIG ; }" EXIT
19 # be signed, but these policy rules may be replaced with a custom
30 if [ $? -eq 1 ]; then
36 # kexec kernel image be signed. Policy rules are walked
38 # might not necessarily be used. This test assumes if a policy
[all …]
/linux/drivers/hid/bpf/progs/
H A DREADME1 # HID-BPF programs
9 They should be loaded in the kernel by `udev-hid-bpf`:
11 https://gitlab.freedesktop.org/libevdev/udev-hid-bpf
14 "upstream" them, but also this way we can test them thanks to the HID
17 Once a .bpf.c file is accepted here, it is duplicated in `udev-hid-bpf`
20 land in distributions when they update `udev-hid-bpf`
30 Just run `sudo udev-hid-bpf install ./my-awesome-fix.bpf.o`
34 - copy the `.bpf.o` you want in `/etc/udev-hid-bpf/`
35 - create a new udev rule to automatically load it
37 The following should do the trick (assuming udev-hid-bpf is available in
[all …]
/linux/tools/testing/selftests/powerpc/nx-gzip/
H A DREADME1 Test the nx-gzip function:
5 /dev/crypto/nx-gzip
7 sudo chmod go+rw /dev/crypto/nx-gzip
10 /etc/udev/rules.d/99-nx-gzip.rules
14 $ gcc -O3 -I./include -o gzfht_test gzfht_test.c gzip_vas.c
15 $ gcc -O3 -I./include -o gunz_test gunz_test.c gzip_vas.c
40 Note that the code here are intended for testing the nx-gzip hardware function.
45 https://github.com/libnxz/power-gzip
/linux/tools/usb/
H A DMakefile1 # SPDX-License-Identifier: GPL-2.0
12 # Do not use make's built-in rules
13 # (this improves performance and avoids hard-to-debug behaviour);
14 MAKEFLAGS += -r
16 override CFLAGS += -O2 -Wall -Wextra -g -D_GNU_SOURCE -I$(OUTPUT)include -I$(srctree)/tools/include
17 override LDFLAGS += -lpthread
19 ALL_TARGETS := testusb ffs-test
27 TESTUSB_IN := $(OUTPUT)testusb-in.o
31 $(QUIET_LINK)$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
33 FFS_TEST_IN := $(OUTPUT)ffs-test-in.o
[all …]
/linux/tools/testing/selftests/firmware/
H A Dfw_fallback.sh2 # SPDX-License-Identifier: GPL-2.0
7 set -e
27 echo -n "$name" >"$DIR"/trigger_request &
31 while [ ! -e "$DIR"/"$name"/loading ]; do
33 timeout=$(( $timeout - 1 ))
34 if [ "$timeout" -eq 0 ]; then
54 echo -n "$name" >"$DIR"/trigger_request 2>/dev/null &
58 while [ ! -e "$DIR"/"$name"/loading ]; do
60 timeout=$(( $timeout - 1 ))
61 if [ "$timeout" -eq 0 ]; then
[all …]

1234567891011