| /linux/tools/rcu/ |
| H A D | extract-stall.sh | 2 # SPDX-License-Identifier: GPL-2.0+ 6 echo Filter out clocksource lines. Note that preceding-lines excludes the 7 echo initial line of the stall warning but trailing-lines includes it. 9 echo Usage: $(basename $0) dmesg-file [ preceding-lines [ trailing-lines ] ] 16 if test -f "$1" && test -r "$1" 25 preceding_lines="${2-3}" 26 trailing_lines="${3-10}" 28 awk -v preceding_lines="$preceding_lines" -v trailing_lines="$trailing_lines" ' 30 for (i = preceding_lines; i > 0; i--) 31 last[i] = last[i - 1]; [all …]
|
| /linux/security/ipe/ |
| H A D | policy_tests.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2020-2024 Microsoft Corporation. All rights reserved. 9 #include <kunit/test.h> 28 "trailing comment", 35 "trailing newline", 56 "policy_name=boot_verified policy_version=-1236.0.0\n" 58 -EINVAL, 68 "policy_name=test policy_version=999999.0.0\n" 70 -ERANGE, 74 "policy_name=test policy_version=255.0\n" [all …]
|
| /linux/tools/perf/util/ |
| H A D | PERF-VERSION-GEN | 2 # SPDX-License-Identifier: GPL-2.0 4 if [ $# -eq 1 ] ; then 8 GVF=${OUTPUT}PERF-VERSION-FILE 15 # PERF-VERSION-FILE exists 19 if test -d ../../.git -o -f ../../.git 21 TAG=$(MAKEFLAGS= make -sC ../.. kernelversion) 22 CID=$(git log -1 --abbrev=12 --pretty=format:"%h" --no-show-signature 2>/dev/null) && CID="-g$CID" 23 elif test -f ../../PERF-VERSION-FILE 25 TAG=$(cut -d' ' -f3 ../../PERF-VERSION-FILE | sed -e 's/\"//g') 27 if test -z "$TAG" [all …]
|
| /linux/tools/testing/selftests/exec/ |
| H A D | binfmt_script.py | 2 # SPDX-License-Identifier: GPL-2.0 4 # Test that truncation of bprm->buf doesn't cause unexpected execs paths, along 33 # test - produce a binfmt_script hashbang line for testing 35 # @size: bytes for bprm->buf line, including hashbang but not newline 45 def test(name, size, good=True, leading="", root="./", target="/perl", function 54 remaining = size - len(hashbang) - len(leading) - len(root) - len(target) - len(arg) 57 middle += fill * (NAME_MAX - 1) 59 remaining -= NAME_MAX 73 script = "binfmt_script-%s" % (name) 83 print("ok %d - binfmt_script %s (successful good exec)" [all …]
|
| /linux/tools/memory-model/scripts/ |
| H A D | parseargs.sh | 2 # SPDX-License-Identifier: GPL-2.0+ 8 # Include into other Linux kernel tools/memory-model scripts. 19 echo if test -z '"$'$1'"' > $T/s 29 initparam LKMM_HERD_OPTIONS "-conf linux-kernel.cfg" 39 echo " --destdir path (place for .litmus.out, default by .litmus)" 40 echo " --herdopts -conf linux-kernel.cfg ..." 41 echo " --hw AArch64" 42 echo " --jobs N (number of jobs, default one per CPU)" 43 echo " --procs N (litmus tests with at most this many processes)" 44 echo " --timeout N (herd7 timeout (e.g., 10s, 1m, 2hr, 1d, '')" [all …]
|
| /linux/security/landlock/ |
| H A D | domain.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Landlock - Domain management 5 * Copyright © 2016-2020 Mickaël Salaün <mic@digikod.net> 6 * Copyright © 2018-2020 ANSSI 7 * Copyright © 2024-2025 Microsoft Corporation 10 #include <kunit/test.h> 30 * get_current_exe - Ge 161 test_get_layer_deny_mask(struct kunit * const test) test_get_layer_deny_mask() argument 222 test_landlock_get_deny_masks(struct kunit * const test) test_landlock_get_deny_masks() argument [all...] |
| /linux/lib/ |
| H A D | test_hexdump.c | 2 * Test cases for lib/hexdump.c module. 13 '\xbe', '\x32', '\xdb', '\x7b', '\x0a', '\x18', '\x93', '\xb2', /* 00 - 07 */ 14 '\x70', '\xba', '\xc4', '\x24', '\x7d', '\x83', '\x34', '\x9b', /* 08 - 0f */ 15 '\xa6', '\x9c', '\x31', '\xad', '\x9c', '\x0f', '\xac', '\xe9', /* 10 - 17 */ 16 '\x4c', '\xd1', '\x19', '\x99', '\x43', '\xb1', '\xaf', '\x0c', /* 18 - 1f */ 68 int groupsize, char *test, in test_hexdump_prepare_test() argument 97 p = test; in test_hexdump_prepare_test() 108 p--; in test_hexdump_prepare_test() 114 } while (p < test + rs * 2 + rs / gs + 1); in test_hexdump_prepare_test() 128 char test[TEST_HEXDUMP_BUF_SIZE]; in test_hexdump() local [all …]
|
| /linux/tools/testing/selftests/openat2/ |
| H A D | resolve_test.c | |
| H A D | openat2_test.c | |
| /linux/kernel/module/ |
| H A D | procfs.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 24 * Always include a trailing , so userspace can differentiate in print_unload_info() 25 * between this and the old multi-field proc format. in print_unload_info() 27 list_for_each_entry(use, &mod->source_list, source_list) { in print_unload_info() 29 seq_printf(m, "%s,", use->source->name); in print_unload_info() 32 if (mod->init && !mod->exit) { in print_unload_info() 38 seq_puts(m, "-"); in print_unload_info() 44 seq_puts(m, " - -"); in print_unload_info() 70 size += mod->mem[type].size; in module_total_size() 82 if (mod->state == MODULE_STATE_UNFORMED) in m_show() [all …]
|
| H A D | sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 36 return -EINVAL; in module_sect_read() 40 * trailing NUL byte that sprintf will write: if "buf" is in module_sect_read() 47 kallsyms_show_value(file->f_cred) in module_sect_read() 48 ? battr->private : NULL); in module_sect_read() 59 for (bin_attr = sect_attrs->grp.bin_attrs; *bin_attr; bin_attr++) in free_sect_attrs() 60 kfree((*bin_attr)->attr.name); in free_sect_attrs() 61 kfree(sect_attrs->grp.bin_attrs); in free_sect_attrs() 74 for (i = 0; i < info->hdr->e_shnum; i++) in add_sect_attrs() 75 if (!sect_empty(&info->sechdrs[i])) in add_sect_attrs() [all …]
|
| /linux/tools/testing/selftests/arm64/fp/ |
| H A D | kernel-test.c | 1 // SPDX-License-Identifier: GPL-2.0-only 49 "sha1-ce", 50 "sha224-arm64", 51 "sha224-arm64-neon", 52 "sha224-ce", 53 "sha256-arm64", 54 "sha256-arm64-neon", 55 "sha256-ce", 56 "sha384-ce", 57 "sha512-ce", [all …]
|
| /linux/include/linux/ |
| H A D | pxa2xx_ssp.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 5 * This driver supports the following PXA CPU/SSP ports:- 37 #define SSITR (0x0C) /* SSP Interrupt Test Register */ 50 #define SSCR0_DataSize(x) ((x) - 1) /* Data Size Select [4..16] */ 65 #define SSCR0_SlotsPerFrm(x) (((x) - 1) << 24) /* Time slots per frame [1..8] */ 72 #define SSCR1_LBM BIT(2) /* Loop-Back Mode */ 92 #define SSCR1_TxTresh(x) (((x) - 1) << 6) /* level [1..16] */ 94 #define SSCR1_RxTresh(x) (((x) - 1) << 10) /* level [1..16] */ 103 #define CE4100_SSCR1_TxTresh(x) (((x) - 1) << 6) /* level [1..4] */ 105 #define CE4100_SSCR1_RxTresh(x) (((x) - 1) << 10) /* level [1..4] */ [all …]
|
| /linux/arch/m68k/fpsp040/ |
| H A D | decbin.S | 5 | register A6 to extended-precision value in FP0. 9 | Output: Exact floating-point representation of the packed bcd value. 11 | Saves and Modifies: D2-D5 20 | Expected is a normal bcd (i.e. non-exceptional; all inf, zero, 33 | assumed following the least-significant digit. 36 | A3. Count the number of leading/trailing zeros in the 38 | if negative, count the trailing zeros. Set the adjusted 43 | SM = 0 a non-zero digit in the integer position 44 | SM = 1 a non-zero digit in Mant0, lsd of the fraction 47 | representation (ex. 0.1E2, 1E1, 10E0, 100E-1), is converted [all …]
|
| /linux/tools/testing/selftests/proc/ |
| H A D | fd-001-lookup.c | 16 // Test /proc/*/fd lookup. 32 /* lstat(2) has more "coverage" in case non-symlink pops up somehow. */ 50 assert(rv == -1 && errno == ENOENT); in test_lookup_fail() 71 /* trailing junk */ in test_lookup() 83 for (i = -1024; i < 0; i++) { in test_lookup() 87 for (u = INT_MAX - 1024; u <= (unsigned int)INT_MAX + 1024; u++) { in test_lookup() 91 for (u = UINT_MAX - 1024; u != 0; u++) { in test_lookup() 104 if (unshare(CLONE_FILES) == -1) in main() 116 assert(de->d_type == DT_DIR); in main() 117 assert(streq(de->d_name, ".")); in main() [all …]
|
| /linux/tools/testing/vsock/ |
| H A D | control.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* Control socket for client/server test execution 32 static int control_fd = -1; 52 for (ai = result; ai; ai = ai->ai_next) { in control_init() 55 fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); in control_init() 60 if (connect(fd, ai->ai_addr, ai->ai_addrlen) < 0) in control_init() 71 if (bind(fd, ai->ai_addr, ai->ai_addrlen) < 0) in control_init() 107 control_fd = -1; in control_cleanup() 169 /* Return the next line from the control socket (without the trailing newline).
|
| /linux/arch/sh/lib/ |
| H A D | memcpy-sh4.S | 1 /* SPDX-License-Identifier: GPL-2.0 */ 7 * Modified from memcpy.S and micro-optimised for SH4 21 ! GHIJ KLMN OPQR --> ...G HIJK LMNO PQR. 24 ! Size is 16 or greater, and may have trailing bytes 30 add #-1,r5 ! 79 EX 34 add #-4,r5 ! 50 EX 55 mov.l r3,@-r0 ! 30 LS 72 mov.l r3,@-r0 ! 30 LS 79 add #-6,r2 ! 50 EX 87 mov.b r1,@-r0 ! 29 LS [all …]
|
| /linux/tools/testing/selftests/timers/ |
| H A D | leap-a-day.c | 1 /* Leap second stress test 7 * This test signals the kernel to insert a leap second 9 * kernel's leap-second behavior, as well as how well applications 10 * handle the leap-second discontinuity. 12 * Usage: leap-a-day [-s] [-i <num>] 15 * -s: Each iteration, set the date to 10 seconds before midnight GMT. 21 * -i: Number of iterations to run (default: infinite) 27 * $ gcc leap-a-day.c -o leap-a-day -lrt 75 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add() 103 * -stable), had an issue with the state machine in clear_time_state() [all …]
|
| /linux/fs/autofs/ |
| H A D | dev-ioctl.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 34 return -EINVAL; in check_name() 46 return -EINVAL; in invalid_str() 60 if ((param->ver_major != AUTOFS_DEV_IOCTL_VERSION_MAJOR) || in check_dev_ioctl_version() 61 (param->ver_minor > AUTOFS_DEV_IOCTL_VERSION_MINOR)) { in check_dev_ioctl_version() 66 param->ver_major, param->ver_minor, cmd); in check_dev_ioctl_version() 67 err = -EINVAL; in check_dev_ioctl_version() 71 param->ver_major = AUTOFS_DEV_IOCTL_VERSION_MAJOR; in check_dev_ioctl_version() 72 param->ver_minor = AUTOFS_DEV_IOCTL_VERSION_MINOR; in check_dev_ioctl_version() 87 return ERR_PTR(-EFAULT); in copy_dev_ioctl() [all …]
|
| /linux/drivers/firmware/psci/ |
| H A D | psci_checker.c | 1 // SPDX-License-Identifier: GPL-2.0-only 31 static int tos_resident_cpu = -1; 42 * "enable-method" property of each CPU in the DT, but given that there is no 43 * arch-specific way to check this, we assume that the DT is sensible. 47 int migrate_type = -1; in psci_ops_check() 52 return -EOPNOTSUPP; in psci_ops_check() 66 if (tos_resident_cpu == -1) in psci_ops_check() 94 if (ret != -EBUSY) { in down_and_up_cpus() 101 if (ret != -EPERM) { in down_and_up_cpus() 156 return -ENOMEM; in alloc_init_cpu_groups() [all …]
|
| /linux/tools/testing/kunit/ |
| H A D | kunit_parser.py | 1 # SPDX-License-Identifier: GPL-2.0 3 # Parses KTAP test results from a kernel dmesg log and incrementally prints 4 # results with reader-friendly format. Stores and returns test results in a 5 # Test object. 22 class Test: class 24 A class to represent a test parsed from KTAP results. All KTAP 25 results within a test lo 254 check_version(version_num: int, accepted_versions: List[int], version_type: str, test: Test, printer: Printer) global() argument 273 parse_ktap_header(lines: LineStream, test: Test, printer: Printer) global() argument 305 parse_test_header(lines: LineStream, test: Test) global() argument 329 parse_test_plan(lines: LineStream, test: Test) global() argument 359 peek_test_name_match(lines: LineStream, test: Test) global() argument 384 parse_test_result(lines: LineStream, test: Test, expected_num: int, printer: Printer) global() argument 492 print_test_header(test: Test, printer: Printer) global() argument 522 format_test_result(test: Test, printer: Printer) global() argument 549 print_test_result(test: Test, printer: Printer) global() argument 562 print_test_footer(test: Test, printer: Printer) global() argument 577 print_test(test: Test, failed_only: bool, printer: Printer) global() argument 604 _summarize_failed_tests(test: Test) global() argument 607 failed_names(test: Test, parent_name: str) global() argument 636 print_summary_line(test: Test, printer: Printer) global() argument 670 bubble_up_test_results(test: Test) global() argument [all...] |
| /linux/tools/perf/pmu-events/ |
| H A D | metric.py | 1 # SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) 16 def LoadEvents(directory: str) -> None: 23 "context\\-switches", 24 "cpu\\-cycles", 62 def CheckPmu(name: str) -> bool: 66 def CheckEvent(name: str) -> boo [all...] |
| /linux/arch/alpha/lib/ |
| H A D | stxncpy.S | 1 /* SPDX-License-Identifier: GPL-2.0 */ 6 * Copy no more than COUNT bytes of the null-terminated string from 29 * Furthermore, v0, a3-a5, t11, and $at are untouched. 55 lda t2, -1 # e1 : build a mask against false zero 79 the end-of-count bit is set in t8 iff it applies. 107 /* Add the end-of-count bit to the eos detection bitmask. */ 121 /* Are source and destination co-aligned? */ 128 srl a2, 3, a2 # e0 : a2 = loop counter = (count - 1)/8 133 /* We are co-aligned; take care of a partial first word. */ 143 /* The source and destination are not co-aligned. Align the destination [all …]
|
| /linux/tools/testing/selftests/sysctl/ |
| H A D | sysctl.sh | 2 # SPDX-License-Identifier: GPL-2.0-or-later OR copyleft-next-0.3.1 7 # Kselftest framework requirement - SKIP code is 4. 19 # TEST_ID: is the test id number 20 # TEST_COUNT: number of times we should run the test 22 # TARGET: test target file required on the test_sysctl module 26 # Once these are enabled please leave them as-is. Write your own test, 43 if [ -z $DIR ]; then 46 if [ -z $DEFAULT_NUM_TESTS ]; then 49 if [ -z $SYSCTL ]; then 52 if [ -z $PROD_SYSCTL ]; then [all …]
|
| /linux/tools/testing/selftests/net/mptcp/ |
| H A D | mptcp_lib.sh | 2 # SPDX-License-Identifier: GPL-2.0 11 readonly KSFT_TEST="${MPTCP_LIB_KSFT_TEST:-$(basename "${0}" .sh)}" 13 # These variables are used in some selftests, read-only 14 declare -rx MPTCP_LIB_EVENT_CREATED=1 # MPTCP_EVENT_CREATED 15 declare -rx MPTCP_LIB_EVENT_ESTABLISHED=2 # MPTCP_EVENT_ESTABLISHED 16 declare -rx MPTCP_LIB_EVENT_CLOSED=3 # MPTCP_EVENT_CLOSED 17 declare -rx MPTCP_LIB_EVENT_ANNOUNCED=6 # MPTCP_EVENT_ANNOUNCED 18 declare -rx MPTCP_LIB_EVENT_REMOVED=7 # MPTCP_EVENT_REMOVED 19 declare -rx MPTCP_LIB_EVENT_SUB_ESTABLISHED=10 # MPTCP_EVENT_SUB_ESTABLISHED 20 declare -rx MPTCP_LIB_EVENT_SUB_CLOSED=11 # MPTCP_EVENT_SUB_CLOSED [all …]
|