Home
last modified time | relevance | path

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

12345678910

/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/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/security/apparmor/
H A Dfile.c1 // SPDX-License-Identifier: GPL-2.0-only
7 * Copyright (C) 1998-2008 Novell/SUSE
8 * Copyright 2009-2010 Canonical Ltd.
40 * file_audit_cb - call back for file specific audit fields
48 kuid_t fsuid = ad->subj_cred ? ad->subj_cred->fsuid : current_fsuid(); in file_audit_cb()
51 if (ad->request & AA_AUDIT_FILE_MASK) { in file_audit_cb()
53 map_mask_to_chr_mask(ad->request)); in file_audit_cb()
56 if (ad->denied & AA_AUDIT_FILE_MASK) { in file_audit_cb()
58 map_mask_to_chr_mask(ad->denied)); in file_audit_cb()
61 if (ad->request & AA_AUDIT_FILE_MASK) { in file_audit_cb()
[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 = list_first_entry(&profile->rules, in profile_setrlimit() local
[all …]
H A Dtask.c1 // SPDX-License-Identifier: GPL-2.0-only
24 * aa_get_task_label - Get another task's label
41 * aa_replace_current_label - replace the current tasks label
58 return -EBUSY; in aa_replace_current_label()
62 return -ENOMEM; in aa_replace_current_label()
64 if (ctx->nnp && label_is_stale(ctx->nnp)) { in aa_replace_current_label()
65 struct aa_label *tmp = ctx->nnp; in aa_replace_current_label()
67 ctx->nnp = aa_get_newest_label(tmp); in aa_replace_current_label()
79 * is possible that the cred labels's->proxy->label is the reference in aa_replace_current_label()
93 * aa_set_current_onexec - set the tasks change_profile to happen onexec
[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-volatile=1)) || \
8 (CC_IS_GCC && $(cc-option,-fsanitize=thread --param tsan-distinguish-volatile=1))
11 <file:Documentation/dev-tools/kcsan.rst>.
21 data-race detector that relies on compile-time instrumentation.
22 KCSAN uses a watchpoint-based sampling approach to detect races.
29 See <file:Documentation/dev-tools/kcsan.rst> for more details.
34 …def_bool (CC_IS_CLANG && $(cc-option,-fsanitize=thread -mllvm -tsan-compound-read-before-write=1))…
35 (CC_IS_GCC && $(cc-option,-fsanitize=thread --param tsan-compound-read-before-write=1))
37 The compiler instruments plain compound read-write operations
[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 -*-
21 logger = logging.getLogger("hidtools.test.base")
142 name = f"uhid test {self.__class__.__name__}"
143 if not name.startswith("uhid test "):
144 name = "uhid test " + self.name
156 # List of kernel modules to load before starting the test
157 # if any module is not available (not compiled), the test will skip.
159 # for example ("playstation", "hid-playstation")
162 # 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 …]
/linux/tools/testing/selftests/
H A DMakefile1 # SPDX-License-Identifier: GPL-2.0
4 TARGETS += amd-pstate
15 TARGETS += cpu-hotplug
19 TARGETS += dmabuf-heaps
20 TARGETS += drivers/dma-buf
38 TARGETS += filesystems/mount-notify
60 TARGETS += memory-hotplug
110 TARGETS += tc-testing
133 TARGETS_HOTPLUG = cpu-hotplug
134 TARGETS_HOTPLUG += memory-hotplug
[all …]
/linux/Documentation/networking/devlink/
H A Dnetdevsim.rst1 .. SPDX-License-Identifier: GPL-2.0
13 .. list-table:: Generic parameters implemented
15 * - Name
16 - Mode
17 * - ``max_macs``
18 - driverinit
20 The ``netdevsim`` driver also implements the following driver-specific
23 .. list-table:: Driver-specific parameters implemented
26 * - Name
27 - Type
[all …]
/linux/Documentation/security/
H A Dipe.rst1 .. SPDX-License-Identifier: GPL-2.0
3 Integrity Policy Enforcement (IPE) - Kernel Documentation
10 :doc:`IPE admin guide </admin-guide/LSM/ipe>`.
13 ---------------------
16 of a locked-down system. This system would be born-secure, and have
27 2. DM-Verity
29 Both options were carefully considered, however the choice to use DM-Verity
46 modify filesystem offline, the attacker could wipe all the xattrs -
50 With DM-Verity, as the xattrs are saved as part of the Merkel tree, if
51 offline mount occurs against the filesystem protected by dm-verity, the
[all …]

12345678910