/linux/Documentation/dev-tools/kunit/ |
H A D | usage.rst | 1 .. SPDX-License-Identifier: GPL-2.0 6 Test Cases 7 ---------- 13 .. code-block:: c 38 .. code-block:: c 59 To learn about more KUnit expectations, see Documentation/dev-tools/kunit/api/test.rst. 66 additional tests cases which would test each property that an ``add`` function 69 .. code-block:: c 79 KUNIT_EXPECT_EQ(test, 0, add(-1, 1)); 85 KUNIT_EXPECT_EQ(test, -1, add(INT_MAX, INT_MIN)); [all …]
|
H A D | architecture.rst | 1 .. SPDX-License-Identifier: GPL-2.0 9 - `In-Kernel Testing Framework`_ 10 - `kunit_tool (Command-line Test Harness)`_ 12 In-Kernel Testing Framework 19 - Organizes tests 20 - Reports test results 21 - Provides test utilities 23 Test Cases 24 ---------- 26 The test case is the fundamental unit in KUnit. KUnit test cases are organised [all …]
|
/linux/Documentation/process/ |
H A D | deprecated.rst | 1 .. SPDX-License-Identifier: GPL-2.0 21 ------------ 33 ------------------ 34 Use WARN() and WARN_ON() instead, and handle the "impossible" 35 error condition as gracefully as possible. While the BUG()-family 42 <https://lore.kernel.org/lkml/CA+55aFy6jNLsywVYdGp83AMrXBo_P-pkjkphPGrO=82SPKCpLQ@mail.gmail.com/>`_ 44 <https://lore.kernel.org/lkml/CAHk-=whDHsbK3HTOpTF=ue_o04onRwTEaK_ZoJp_fjbqq4+=Jw@mail.gmail.com/>`… 46 Note that the WARN()-family should only be used for "expected to 48 but undesirable" situations, please use the pr_warn()-family of 54 open-coded arithmetic in allocator arguments [all …]
|
/linux/Documentation/arch/powerpc/ |
H A D | ultravisor.rst | 1 .. SPDX-License-Identifier: GPL-2.0 16 (PVR=0x004e1203) or greater will be PEF-capable. A new ISA release 25 +------------------+ 29 +------------------+ 31 +------------------+ 33 +------------------+ 35 +------------------+ 62 to return to a SVM it must use an ultracall. It can determine if 75 +---+---+---+---------------+ 79 +---+---+---+---------------+ [all …]
|
/linux/Documentation/devicetree/bindings/iommu/ |
H A D | iommu.txt | 13 Example: 32-bit DMA to 64-bit physical addresses 15 * Implement scatter-gather at page level granularity so that the device does 29 IOMMUs can be single-master or multiple-master. Single-master IOMMU devices 30 typically have a fixed association to the master device, whereas multiple- 34 "dma-ranges" property that describes how the physical address space of the 35 IOMMU maps to memory. An empty "dma-ranges" property means that there is a 39 -------------------- 40 - #iommu-cells: The number of cells in an IOMMU specifier needed to encode an 44 the specific IOMMU. Below are a few examples of typical use-cases: 46 - #iommu-cells = <0>: Single master IOMMU devices are not configurable and [all …]
|
/linux/tools/usb/ |
H A D | hcd-tests.sh | 2 # SPDX-License-Identifier: GPL-2.0 6 # - control: any device can do this 7 # - out, in: out needs 'bulk sink' firmware, in needs 'bulk src' 8 # - iso-out, iso-in: out needs 'iso sink' firmware, in needs 'iso src' 9 # - halt: needs bulk sink+src, tests halt set/clear from host 10 # - unlink: needs bulk sink and/or src, test HCD unlink processing 11 # - loop: needs firmware that will buffer N transfers 25 # - include unlink tests 26 # - add some ${RANDOM}ness 27 # - connect several devices concurrently (same HC) [all …]
|
/linux/Documentation/bpf/ |
H A D | ringbuf.rst | 12 ---------- 18 - more efficient memory utilization by sharing ring buffer across CPUs; 19 - preserving ordering of events that happen sequentially in time, even across 23 Both are a result of a choice to have per-CPU perf ring buffer. Both can be 25 problem could technically be solved for perf buffer with some in-kernel 30 ------------------ 39 with existing perf buffer use in BPF, but would fail if application needed more 42 Additionally, given the performance of BPF ringbuf, many use cases would just 56 The approach chosen has an advantage of re-using existing BPF map 62 combined with ``ARRAY_OF_MAPS`` and ``HASH_OF_MAPS`` map-in-maps to implement [all …]
|
H A D | bpf_devel_QA.rst | 10 Documentation/process/submitting-patches.rst. This document only describes 21 -------------------------------------------- 48 ------------------------------------------------------------------------ 49 A: BPF CI is GitHub based and hosted at https://github.com/kernel-patches/bpf. 55 - Create a fork of the aforementioned repository in your own account (one time 58 - Clone the fork locally, check out a new branch tracking either the bpf-next 59 or bpf branch, and apply your to-be-tested patches on top of it 61 - Push the local branch to your fork and create a pull request against 62 kernel-patches/bpf's bpf-next_base or bpf_base branch, respectively 68 Note furthermore that both base branches (bpf-next_base and bpf_base) will be [all …]
|
/linux/Documentation/userspace-api/ |
H A D | mseal.rst | 1 .. SPDX-License-Identifier: GPL-2.0 17 such an attacker primitive can break control-flow integrity guarantees 18 since read-only memory that is supposed to be trusted can become writable 29 ----------------------- 34 - The start address must be in an allocated VMA. 35 - The start address must be page aligned. 36 - The end address (**addr** + **len**) must be in an allocated VMA. 37 - no gap (unallocated memory) between start and end address. 41 **flags**: reserved for future use. 44 - **0**: Success. [all …]
|
/linux/drivers/base/firmware_loader/builtin/ |
H A D | main.c | 1 // SPDX-License-Identifier: GPL-2.0 24 if (size < fw->size) in fw_copy_to_prealloc_buf() 26 memcpy(buf, fw->data, fw->size); in fw_copy_to_prealloc_buf() 31 * firmware_request_builtin() - load builtin firmware 35 * Some use cases in the kernel have a requirement so that no memory allocator 37 * the x86 CPU microcode loader. In these cases all the caller wants is to see 38 * if the firmware was built-in and if so use it right away. This can be used 39 * for such cases. 41 * This looks for the firmware in the built-in kernel. Only if the kernel was 42 * built-in with the firmware you are looking for will this return successfully. [all …]
|
/linux/Documentation/livepatch/ |
H A D | reliable-stacktrace.rst | 16 to identify which functions are live is to use a stacktrace. 19 functions with live state, and best-effort approaches which can be helpful for 38 * The return code is non-zero to indicate that the trace is not reliable. 41 In some cases it is legitimate to omit specific functions from the trace, 42 but all other functions must be reported. These cases are described in 45 Secondly, the reliable stacktrace function must be robust to cases where 47 function should attempt to detect such cases and return a non-zero error 49 an unsafe way. Specific cases are described in further detail below. 52 3. Compile-time analysis 55 To ensure that kernel code can be correctly unwound in all cases, [all …]
|
/linux/tools/testing/selftests/tc-testing/creating-plugins/ |
H A D | AddingPlugins.txt | 1 tdc - Adding plugins for tdc 3 Author: Brenda J. Butler - bjb@mojatatu.com 6 -------------- 9 There are some examples in plugin-lib. 14 - adding commands to be run before and/or after the test suite 15 - adding commands to be run before and/or after the test cases 16 - adding commands to be run before and/or after the execute phase of the test cases 17 - ability to alter the command to be run in any phase: 18 pre (the pre-suite stage) 23 post (the post-suite stage) [all …]
|
/linux/tools/testing/selftests/tc-testing/ |
H A D | README | 1 tdc - Linux Traffic Control (tc) unit testing suite 3 Author: Lucas Bates - lucasb@mojatatu.com 10 ------------ 23 * All tc-related features being tested must be built in or available as 25 ./tdc.py -c 29 teardown commands - which includes not being able to run a test simply 31 handled in a future version - the current workaround is to run the tests 36 -------------- 43 using the -p option when running tdc: 44 ./tdc.py -p /path/to/tc [all …]
|
/linux/tools/memory-model/Documentation/ |
H A D | simple.txt | 2 memory-ordering lives simple, as is necessary for those whose domain 3 is complex. After all, there are bugs other than memory-ordering bugs, 4 and the time spent gaining memory-ordering knowledge is not available 5 for gaining domain knowledge. Furthermore Linux-kernel memory model 15 of MMIO-based device drivers will often need to use mb(), rmb(), and 22 Single-threaded code 25 In single-threaded code, there is no reordering, at least assuming 38 this lock at a given time, your code will be executed single-threaded. 52 Please use the standard locking primitives provided by the kernel rather 56 surprisingly hard to correctly code production-quality lock acquisition [all …]
|
/linux/Documentation/i2c/ |
H A D | fault-codes.rst | 5 This is a summary of the most important conventions for use of fault 10 ---------------------------------- 14 some cases, such as re-initializing (and maybe resetting). After such 27 ------------------------- 29 some positive number indicating a non-fault return. The specific 31 though most Linux systems use <asm-generic/errno*.h> numbering. 34 codes that may be returned, and other cases where these codes should 36 cases (unless the hardware doesn't provide unique fault reports). 44 they are requested to use such an address. 61 host. Note that even if PECs are in use, you should not rely [all …]
|
/linux/Documentation/networking/ |
H A D | mptcp.rst | 1 .. SPDX-License-Identifier: GPL-2.0 11 `RFC 8684 (MPTCPv1) <https://www.rfc-editor.org/rfc/rfc8684.html>`_. It allows a 12 device to make use of multiple interfaces at once to send and receive TCP 15 fail-over if one path is down, and the traffic is seamlessly reinjected on other 22 Use cases 25 Thanks to MPTCP, being able to use multiple paths in parallel or simultaneously 26 brings new use-cases, compared to TCP: 28 - Seamless handovers: switching from one path to another while preserving 29 established connections, e.g. to be used in mobility use-cases, like on 31 - Best network selection: using the "best" available path depending on some [all …]
|
/linux/lib/kunit/ |
H A D | kunit-example-test.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Example KUnit test to show how to use KUnit. 55 * This is run once before all test cases in the suite. 66 * This is run once after all test cases in the suite. 150 KUNIT_EXPECT_GT_MSG(test, sizeof(int), 0, "Your ints are 0-bit?!"); in example_all_expect_macros_test() 151 KUNIT_ASSERT_GT_MSG(test, sizeof(int), 0, "Your ints are 0-bit?!"); in example_all_expect_macros_test() 168 return i - 1; in subtract_one() 174 * to change the static function to a non-static exported function. 182 * This test shows the use of static stubs. 201 * This test shows the use of static stubs when the function being [all …]
|
/linux/net/bluetooth/ |
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 20 Bluetooth is low-cost, low-power, short-range wireless technology. 21 It was designed as a replacement for cables and other short-range 42 To use Linux Bluetooth subsystem, you will need several user-space 70 Bluetooth Low Energy includes support low-energy physical 130 cases are run first thing at module load time. When the Bluetooth 131 subsystem is compiled into the kernel image, then the test cases 135 bool "ECDH test cases" 138 Run test cases for ECDH cryptographic functionality used by the 142 bool "SMP test cases" [all …]
|
/linux/drivers/media/dvb-core/ |
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 7 bool "Enable DVB memory-mapped API (EXPERIMENTAL)" 12 This option enables DVB experimental memory-mapped API, which 14 the buffers can use mmap() syscalls. 16 Support for it is experimental. Use with care. If unsure, 26 on Set-Top-Boxes. It can also be used to access the Internet via the 41 Only values in the range 4-32 are tested. 43 If you are unsure about this, use the default value 16 50 If you say Y here, the DVB subsystem will use dynamic minor 65 Should not be enabled on normal cases, as logs can [all …]
|
/linux/Documentation/RCU/ |
H A D | rcuref.rst | 1 .. SPDX-License-Identifier: GPL-2.0 4 Reference-count design for elements of lists/arrays protected by RCU 8 Please note that the percpu-ref feature is likely your first 10 include/linux/percpu-refcount.h for more information. However, in 11 those unusual cases where percpu-ref would consume too much memory, 14 ------------------------------------------------------------------------ 26 atomic_set(&el->rc, 1); atomic_inc(&el->rc); 37 if(atomic_dec_and_test(&el->rc)) ... 42 if (atomic_dec_and_test(&el->rc)) 51 has already been deleted from the list/array. Use atomic_inc_not_zero() [all …]
|
/linux/net/can/ |
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 24 tristate "Raw CAN Protocol (raw access with CAN-ID filtering)" 28 the BSD socket API. You probably want to use the raw socket in 29 most cases where no higher level protocol is being used. The raw 31 To receive/send raw CAN messages, use AF_CAN with protocol CAN_RAW. 41 You probably want to use the bcm socket in most cases where cyclic 43 To use the Broadcast Manager, use AF_CAN with protocol CAN_BCM. 59 tristate "ISO 15765-2 CAN transport protocol" 61 CAN Transport Protocols offer support for segmented Point-to-Point 65 introduced with ISO 15765-2:2016. [all …]
|
/linux/arch/mips/ |
H A D | Kconfig.debug | 1 # SPDX-License-Identifier: GPL-2.0 23 If you say Y here, it will be possible to use a 8250/16550 serial 30 bool "Built-in kernel command line" 36 For such cases, this option allows you to hardcode your own 41 The built-in options will be concatenated to the default command 43 command line will be ignored and replaced by the built-in string. 46 the command line from the firmware or the second-stage bootloader. 53 pass arguments to the kernel. For these platforms, and for the cases 55 the default command line, you can supply some command-line options at 56 build time by entering them here. In other cases you can specify [all …]
|
/linux/scripts/coccinelle/misc/ |
H A D | cond_no_effect.cocci | 1 // SPDX-License-Identifier: GPL-2.0-only 5 // There can be false positives in cases where the positional 7 // is a placeholder for not yet handled cases. 8 // Unfortunately there also seems to be a tendency to use 9 // the last if else/else as a "default behavior" - which some 17 // the two known cases are: 22 // user-mode SHcompact yet, and for a kernel fault, this would 24 // return -EFAULT; 27 // return -EFAULT; 31 // * look that way and give @of->mutex different static lockdep keys. [all …]
|
/linux/Documentation/power/regulator/ |
H A D | design.rst | 9 ------ 11 - Errors in regulator configuration can have very serious consequences 13 - It is not possible to automatically determine the power configuration 14 of the system - software-equivalent variants of the same chip may 24 Consumer use cases 25 ------------------ 27 - The overwhelming majority of devices in a system will have no 31 - Many of the power supplies in the system will be shared between many 36 The consumer API should be structured so that these use cases are
|
/linux/Documentation/gpu/ |
H A D | vkms.rst | 7 .. kernel-doc:: drivers/gpu/drm/vkms/vkms_drv.c 31 Now, to load the driver, use:: 39 which are exposed as module options. You can use the `modinfo` command 46 use:: 50 To disable the driver, use :: 52 sudo modprobe -r vkms 60 `here <https://gitlab.freedesktop.org/drm/igt-gpu-tools>`_ . 65 sudo systemctl isolate multi-user.target 71 Once you are in text only mode, you can run tests using the --device switch 73 to test. IGT_DEVICE can also be used with the run-test.sh script to run the [all …]
|