| /linux/tools/perf/tests/shell/ |
| H A D | stat.sh | 3 # SPDX-License-Identifier: GPL-2.0 5 set -e 8 stat_output=$(mktemp /tmp/perf-stat-test-output.XXXXX) 11 rm -f "${stat_output}" 12 trap - EXIT TERM INT 24 echo "Basic stat command test" 25 if ! perf stat true 2>&1 | grep -E -q "Performance counter stats for 'true':" 27 echo "Basic stat command test [Failed]" 31 echo "Basic stat command test [Success]" 35 echo "Null stat command test" [all …]
|
| H A D | record_offcpu.sh | 3 # SPDX-License-Identifier: GPL-2.0 5 set -e 14 rm -f ${perfdata} 15 rm -f ${perfdata}.old 16 trap - EXIT TERM INT 25 test_above_thresh="Threshold test (above threshold)" 26 test_below_thresh="Threshold test (below threshold)" 29 echo "Checking off-cpu privilege" 31 if [ "$(id -u)" != 0 ] 33 echo "off-cpu test [Skipped permission]" [all …]
|
| H A D | record_bpf_filter.sh | 3 # SPDX-License-Identifier: GPL-2.0 5 set -e 11 rm -f "${perfdata}" 12 rm -f "${perfdata}".old 13 trap - EXIT TERM INT 23 echo "Checking BPF-filter privilege" 25 if ! perf record -e task-clock --filter 'period > 1' \ 26 -o /dev/null --quiet true 2>&1 28 if [ "$(id -u)" != 0 ] 30 echo "try 'sudo perf record --setup-filter pin' first." [all …]
|
| H A D | test_intel_pt.sh | 3 # SPDX-License-Identifier: GPL-2.0 5 set -e 8 perf list pmu | grep -q 'intel_pt//' || exit 2 18 temp_dir=$(mktemp -d /tmp/perf-test-intel-pt-sh.XXXXXXXXXX) 20 tmpfile="${temp_dir}/tmp-perf.data" 21 perfdatafile="${temp_dir}/test-perf.data" 22 outfile="${temp_dir}/test-out.txt" 23 errfile="${temp_dir}/test-err.txt" 31 trap - EXIT TERM INT 32 sane=$(echo "${temp_dir}" | cut -b 1-26) [all …]
|
| H A D | evlist.sh | 3 # SPDX-License-Identifier: GPL-2.0 5 set -e 11 rm -f "${perfdata}" 12 trap - EXIT TERM INT 23 echo "Simple evlist test" 24 if ! perf record -e cpu-clock -o "${perfdata}" true 2> /dev/null 30 if ! perf evlist -i "${perfdata}" | grep -q "cpu-clock" 36 echo "Simple evlist test [Success]" 40 echo "Group evlist test" 41 if ! perf record -e "{cpu-clock,task-clock}" -o "${perfdata}" \ [all …]
|
| /linux/kernel/events/ |
| H A D | hw_breakpoint_test.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * KUnit test for hw_breakpoint constraints accounting logic. 8 #include <kunit/test.h> 15 #define TEST_REQUIRES_BP_SLOTS(test, slots) \ argument 18 kunit_skip((test), "Requires breakpoint slots: %d > %d", slots, \ 23 #define TEST_EXPECT_NOSPC(expr) KUNIT_EXPECT_EQ(test, -ENOSPC, PTR_ERR(expr)) 31 static struct perf_event *register_test_bp(int cpu, struct task_struct *tsk, int idx) in register_test_bp() argument 42 return perf_event_create_kernel_counter(&attr, cpu, tsk, NULL, NULL); in register_test_bp() 65 static void fill_one_bp_slot(struct kunit *test, int *id, int cpu, struct task_struct *tsk) in fill_one_bp_slot() argument 67 struct perf_event *bp = register_test_bp(cpu, tsk, *id); in fill_one_bp_slot() [all …]
|
| /linux/lib/ |
| H A D | test_objpool.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Test module for lockless object pool 61 /* per-cpu worker */ 64 struct ot_test *test; /* test parameters */ member 85 static void *ot_kzalloc(struct ot_test *test, long size) in ot_kzalloc() argument 90 atomic_long_add(size, &test->data.kmalloc.alloc); in ot_kzalloc() 94 static void ot_kfree(struct ot_test *test, void *ptr, long size) in ot_kfree() argument 98 atomic_long_add(size, &test->data.kmalloc.free); in ot_kfree() 102 static void ot_mem_report(struct ot_test *test) in ot_mem_report() argument 106 pr_info("memory allocation summary for %s\n", test->name); in ot_mem_report() [all …]
|
| /linux/tools/testing/selftests/drivers/net/ |
| H A D | netcons_sysdata.sh | |
| /linux/tools/perf/tests/ |
| H A D | topology.c | 1 // SPDX-License-Identifier: GPL-2.0 15 #define TEMPL "/tmp/perf-test-XXXXXX" 27 return -1; in get_temp() 46 session->evlist = evlist__new_default(&target, /*sample_callchains=*/false); in session_write_header() 47 TEST_ASSERT_VAL("can't get evlist", session->evlist); in session_write_header() 48 session->evlis in session_write_header() 72 struct perf_cpu cpu; check_cpu_topology() local [all...] |
| /linux/Documentation/devicetree/bindings/sound/ |
| H A D | test-component.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/sound/test-component.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Test Component 10 - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> 15 - test-cpu 16 - test-cpu-verbose 17 - test-cpu-verbose-dai 18 - test-cpu-verbose-component [all …]
|
| /linux/kernel/irq/ |
| H A D | irq_test.c | 1 // SPDX-License-Identifier: LGPL-2.1+ 4 #include <linux/cpu.h> 11 #include <kunit/test.h> 44 static int irq_test_setup_fake_irq(struct kunit *test, struct irq_affinity_desc *affd) in irq_test_setup_fake_irq() argument 49 virq = irq_domain_alloc_descs(-1, 1, 0, NUMA_NO_NODE, affd); in irq_test_setup_fake_irq() 50 KUNIT_ASSERT_GE(test, virq, 0); in irq_test_setup_fake_irq() 55 KUNIT_ASSERT_PTR_NE(test, desc, NULL); in irq_test_setup_fake_irq() 63 static void irq_disable_depth_test(struct kunit *test) in irq_disable_depth_test() argument 68 virq = irq_test_setup_fake_irq(test, NULL); in irq_disable_depth_test() 71 KUNIT_ASSERT_PTR_NE(test, desc, NULL); in irq_disable_depth_test() [all …]
|
| /linux/tools/testing/selftests/mm/ |
| H A D | uffd-stress.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 * This test allocates two virtual areas and bounces the physical 11 * There are three threads running per CPU: 13 * 1) one per-CPU thread takes a per-page pthread_mutex in a random 15 * area_src), and increments a per-page counter in the same page, 18 * 2) another per-CPU thread handles the userfaults generated by 22 * 3) one last per-CPU thread transfers the memory in the background 24 * 2). Each cpu thread takes cares of transferring a portion of the 32 * per-CPU threads 1 by triggering userfaults inside 37 #include "uffd-common.h" [all …]
|
| /linux/tools/testing/selftests/kvm/ |
| H A D | rseq_test.c | 1 // SPDX-License-Identifier: GPL-2.0-only 33 * Any bug related to task migration is likely to be timing-dependent; perform 51 static int next_cpu(int cpu) in next_cpu() argument 54 * Advance to the next CPU, skipping those that weren't in the original in next_cpu() 58 * burn a lot cycles and the test will take longer than normal to in next_cpu() 62 cpu++; in next_cpu() 63 if (cpu > max_cpu) { in next_cpu() 64 cpu = min_cpu; in next_cpu() 65 TEST_ASSERT(CPU_ISSET(cpu, &possible_mask), in next_cpu() 66 "Min CPU = %d must always be usable", cpu); in next_cpu() [all …]
|
| /linux/tools/testing/selftests/sched_ext/ |
| H A D | peek_dsq.bpf.c | 1 // SPDX-License-Identifier: GPL-2.0 23 /* Global variables to store test results */ 24 int dsq_peek_result1 = -1; 25 long dsq_inserted_pid = -1; 26 int insert_test_cpu = -1; /* Set to the cpu that performs the test */ 27 long dsq_peek_result2 = -1; 28 long dsq_peek_result2_pid = -1; 29 long dsq_peek_result2_expected = -1; 32 int enqueue_count = -1; 33 int dispatch_count = -1; [all …]
|
| /linux/tools/testing/selftests/cgroup/ |
| H A D | test_cpuset_prs.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # Test for cpuset v2 partition root state (PRS) 12 echo "Test SKIPPED" 16 [[ $(id -u) -eq 0 ]] || skip_test "Test must be run as root!" 23 CGROUP2=$(mount -t cgroup2 | head -1 | awk -e '{print $3}') 24 [[ -n "$CGROUP2" ]] || skip_test "Cgroup v2 mount point not found!" 28 NR_CPUS=$(lscpu | grep "^CPU(s):" | sed -e "s/.*:[[:space:]]*//") 29 [[ $NR_CPUS -lt 8 ]] && skip_test "Test needs at least 8 cpus available!" 32 if [[ -c /dev/console && -w /dev/console ]] 44 while [[ "$1" = -* ]] [all …]
|
| H A D | test_cpuset_v1_hp.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # Test the special cpuset v1 hotplug case where a cpuset become empty of 10 echo "Test SKIPPED" 14 [[ $(id -u) -eq 0 ]] || skip_test "Test must be run as root!" 17 CPUSET=$(mount -t cgroup | grep cpuset | head -1 | awk -e '{print $3}') 18 [[ -n "$CPUSET" ]] || skip_test "cpuset v1 mount point not found!" 21 # Create a test cpuset, put a CPU and a task there and offline that CPU 23 TDIR=test$$ 24 [[ -d $CPUSET/$TDIR ]] || mkdir $CPUSET/$TDIR 32 echo "Unexpected cpuset $NEWCS, test FAILED!" [all …]
|
| /linux/tools/testing/selftests/resctrl/ |
| H A D | resctrl.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 31 #define PHYS_ID_PATH "/sys/devices/system/cpu/cpu" 35 * CPU vendor IDs 78 * @cpu: CPU number to which the benchmark will be bound to 82 * NULL if user did not provide parameters and test 86 int cpu; 84 int cpu; global() member [all...] |
| H A D | cat_test.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Cache Allocation Technology (CAT) test 18 * Minimum difference in LLC misses between a test with n+1 bits CBM to the 19 * test with n bits is MIN_DIFF_PERCENT_PER_BIT * (n - 1). With e.g. 5 vs 4 21 * MIN_DIFF_PERCENT_PER_BIT * (4 - 1) = 3 percent. 44 float delta = (__s64)(avg_llc_val - *prev_avg_llc_val); in show_results_info() 81 fp = fopen(param->filenam in check_results() 156 cat_test(const struct resctrl_test * test,const struct user_params * uparams,struct resctrl_val_param * param,size_t span,unsigned long current_mask) cat_test() argument 235 cat_run_test(const struct resctrl_test * test,const struct user_params * uparams) cat_run_test() argument 291 arch_supports_noncont_cat(const struct resctrl_test * test) arch_supports_noncont_cat() argument 313 noncont_cat_run_test(const struct resctrl_test * test,const struct user_params * uparams) noncont_cat_run_test() argument 371 noncont_cat_feature_check(const struct resctrl_test * test) noncont_cat_feature_check() argument [all...] |
| /linux/drivers/soc/fsl/qbman/ |
| H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 26 Compiles in additional checks, to sanity-check the drivers and 30 tristate "BMan self-tests" 32 Compile the BMan self-test code. These tests will 37 bool "High-level API self-test" 41 This requires the presence of cpu-affine portals, and performs 42 high-level API testing with them (whichever portal(s) are affine 43 to the cpu(s) the test executes on). 46 tristate "QMan self-tests" 48 Compile self-test code for QMan. [all …]
|
| /linux/tools/testing/selftests/amd-pstate/ |
| H A D | run.sh | 2 # SPDX-License-Identifier: GPL-2.0 18 # amd-pstate-ut only run on x86/x86_64 AMD systems. 19 ARCH=$(uname -m 2>/dev/null | sed -e 's/i.86/x86/' -e 's/x86_64/x86/') 20 VENDOR=$(cat /proc/cpuinfo | grep -m 1 'vendor_id' | awk '{print $NF}') 38 CURRENT_TEST=amd-pstate 41 # Kselftest framework requirement - SKIP code is 4. 43 all_scaling_names=("acpi-cpufreq" "amd-pstate") 60 for cpu in `ls $CPUROOT | grep "cpu[0-9].*"`; do 61 if [ -d $CPUROOT/$cpu/cpufreq ]; then 77 policies=$(ls $CPUFREQROOT| grep "policy[0-9].*") [all …]
|
| /linux/tools/testing/selftests/rcutorture/bin/ |
| H A D | kvm-assign-cpus.sh | 2 # SPDX-License-Identifier: GPL-2.0+ 4 # Produce awk statements roughly depicting the system's CPU and cache 8 # Usage: kvm-assign-cpus.sh /path/to/sysfs 10 T="`mktemp -d ${TMPDIR-/tmp}/kvm-assign-cpus.sh.XXXXXX`" 11 trap 'rm -rf $T' 0 2 13 sysfsdir=${1-/sys/devices/system/node} 16 sed -e 's/^/# /' < $T/msg 19 nodelist="`ls -d node*`" 22 if ! test -d $i/ 27 for j in $i/cpu*/cache/index* [all …]
|
| H A D | kvm-get-cpus-script.sh | 2 # SPDX-License-Identifier: GPL-2.0+ 7 # Usage: kvm-get-cpus-script.sh /path/to/cpu/arrays /path/to/put/script [ /path/to/state ] 9 # The CPU arrays are output by kvm-assign-cpus.sh, and are valid awk 13 # non-empty), and can also be output by this script. 15 cpuarrays="${1-/sys/devices/system/node}" 19 if ! test -f "$cpuarrays" 25 if ! test -d "$scriptdir" || ! test -x "$scriptdir" || ! test -w "$scriptdir" 35 if test -r "$statefile" 42 # Do we have the system architecture to guide CPU affinity? 48 # Return a comma-separated list of the next n CPUs. [all …]
|
| /linux/tools/power/cpupower/bench/ |
| H A D | README-BENCH | 1 This is cpufreq-bench, a microbenchmark for the cpufreq framework. 7 - Identify worst case performance loss when doing dynamic frequency 9 - Identify average reaction time of a governor to CPU load changes 10 - (Stress) Testing whether a cpufreq low level driver or governor works 12 - Identify cpufreq related performance regressions between kernels 13 - Possibly Real time priority testing? -> what happens if there are 15 - ... 18 - Power saving related regressions (In fact as better the performance 21 - Real world (workloads) 27 cpufreq-bench helps to test the condition of a given cpufreq governor. [all …]
|
| /linux/tools/testing/selftests/net/ |
| H A D | reuseport_bpf_cpu.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Test functionality of BPF filters with SO_REUSEPORT. This program creates 4 * an SO_REUSEPORT receiver group containing one socket per CPU core. It then 45 addr4->sin_family = AF_INET; in build_rcv_group() 46 addr4->sin_addr.s_addr = htonl(INADDR_ANY); in build_rcv_group() 47 addr4->sin_port = htons(PORT); in build_rcv_group() 51 addr6->sin6_family = AF_INET6; in build_rcv_group() 52 addr6->sin6_add in build_rcv_group() 184 static void test(int *rcv_fd, int len, int family, int proto) test() function 187 int epfd, cpu; test() local [all...] |
| /linux/tools/testing/selftests/drivers/platform/x86/intel/ifs/ |
| H A D | test_ifs.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # Test the functionality of the Intel IFS(In Field Scan) driver. 13 readonly CPU_SYSFS="/sys/devices/system/cpu" 34 # Matches arch/x86/include/asm/intel-family.h and 61 echo -e "$1" | tee -a "$IFS_LOG" 68 local cpu="" 73 if [[ -n "$target_cpus" ]]; then 74 for cpu in $(echo "$target_cpus" | tr ',' ' '); do 75 if [[ "$cpu" == *"-"* ]]; then 79 cpu_start=$(echo "$cpu" | cut -d "-" -f 1) [all …]
|