/tools/testing/selftests/powerpc/ptrace/ |
D | ptrace-vsx.h | 15 int i; in validate_vsx() local 17 for (i = 0; i < VSX_MAX; i++) { in validate_vsx() 18 if (vsx[i] != load[2 * i + 1]) { in validate_vsx() 20 i, vsx[i], 2 * i + 1, load[2 * i + 1]); in validate_vsx() 33 int i; in validate_vmx() local 35 for (i = 0; i < VMX_MAX; i++) { in validate_vmx() 37 if ((vmx[i][0] != load[64 + 2 * i]) || in validate_vmx() 38 (vmx[i][1] != load[65 + 2 * i])) { in validate_vmx() 40 i, vmx[i][0], 64 + 2 * i, in validate_vmx() 41 load[64 + 2 * i]); in validate_vmx() [all …]
|
D | ptrace-gpr.h | 23 int i, found = 1; in validate_gpr() local 25 for (i = 0; i < 18; i++) { in validate_gpr() 26 if (gpr[i] != val) { in validate_gpr() 28 i+14, gpr[i], val); in validate_gpr() 41 int i, found = 1; in validate_fpr() local 43 for (i = 0; i < 32; i++) { in validate_fpr() 44 if (fpr[i] != val) { in validate_fpr() 45 printf("FPR[%d]: %lx Expected: %lx\n", i, fpr[i], val); in validate_fpr() 58 int i, found = 1; in validate_fpr_float() local 60 for (i = 0; i < 32; i++) { in validate_fpr_float() [all …]
|
/tools/testing/selftests/zram/ |
D | zram_lib.sh | 50 local i= 51 for i in $(seq $dev_start $dev_makeswap); do 52 swapoff /dev/zram$i 55 for i in $(seq $dev_start $dev_mounted); do 56 umount /dev/zram$i 59 for i in $(seq $dev_start $dev_end); do 60 echo 1 > /sys/block/zram${i}/reset 61 rm -rf zram$i 65 for i in $(seq $dev_start $dev_end); do 66 echo $i > /sys/class/zram-control/hot_remove [all …]
|
/tools/testing/selftests/bpf/prog_tests/ |
D | bpf_obj_id.c | 28 __u32 i, next_id, info_len, nr_id_found, duration = 0; in test_bpf_obj_id() local 49 for (i = 0; i < nr_iters; i++) { in test_bpf_obj_id() 52 &objs[i], &prog_fds[i]); in test_bpf_obj_id() 60 map_fds[i] = bpf_find_map(__func__, objs[i], "test_map_id"); in test_bpf_obj_id() 61 if (CHECK_FAIL(map_fds[i] < 0)) in test_bpf_obj_id() 63 err = bpf_map_update_elem(map_fds[i], &array_key, in test_bpf_obj_id() 68 prog = bpf_object__find_program_by_title(objs[i], in test_bpf_obj_id() 72 links[i] = bpf_program__attach(prog); in test_bpf_obj_id() 73 err = libbpf_get_error(links[i]); in test_bpf_obj_id() 74 if (CHECK(err, "prog_attach", "prog #%d, err %d\n", i, err)) { in test_bpf_obj_id() [all …]
|
D | cpu_mask.c | 10 int i; in validate_mask() local 12 for (i = 0; exp[i]; i++) { in validate_mask() 13 if (exp[i] == '1') { in validate_mask() 14 if (CHECK(i + 1 > n, "mask_short", in validate_mask() 16 case_nr, n, i + 1)) in validate_mask() 18 CHECK(!mask[i], "cpu_not_set", in validate_mask() 20 case_nr, i); in validate_mask() 22 CHECK(i < n && mask[i], "cpu_set", in validate_mask() 24 case_nr, i); in validate_mask() 27 CHECK(i < n, "mask_long", in validate_mask() [all …]
|
D | cgroup_attach_autodetach.c | 30 int cg = 0, i; in test_cgroup_attach_autodetach() local 33 for (i = 0; i < ARRAY_SIZE(allow_prog); i++) { in test_cgroup_attach_autodetach() 34 allow_prog[i] = prog_load(); in test_cgroup_attach_autodetach() 35 if (CHECK(allow_prog[i] < 0, "prog_load", in test_cgroup_attach_autodetach() 51 for (i = 0; i < ARRAY_SIZE(allow_prog); i++) in test_cgroup_attach_autodetach() 52 if (CHECK(bpf_prog_attach(allow_prog[i], cg, in test_cgroup_attach_autodetach() 55 "prog_attach", "prog[%d], errno=%d\n", i, errno)) in test_cgroup_attach_autodetach() 72 for (i = 0; i < ARRAY_SIZE(allow_prog); i++) { in test_cgroup_attach_autodetach() 73 close(allow_prog[i]); in test_cgroup_attach_autodetach() 74 allow_prog[i] = -1; in test_cgroup_attach_autodetach() [all …]
|
/tools/testing/radix-tree/ |
D | idr-test.c | 35 unsigned long i; in idr_alloc_test() local 43 for (i = 0x3ffe; i < 0x4003; i++) { in idr_alloc_test() 47 if (i < 0x4000) in idr_alloc_test() 48 item = item_create(i, 0); in idr_alloc_test() 50 item = item_create(i - 0x3fff, 0); in idr_alloc_test() 78 int i; in idr_null_test() local 93 for (i = 0; i < 10; i++) { in idr_null_test() 94 assert(idr_alloc(&idr, NULL, 0, 0, GFP_KERNEL) == i); in idr_null_test() 105 for (i = 0; i < 9; i++) { in idr_null_test() 106 idr_remove(&idr, i); in idr_null_test() [all …]
|
D | multiorder.c | 38 int i, j, err; in multiorder_iteration() local 46 for (i = 0; i < NUM_ENTRIES; i++) { in multiorder_iteration() 47 err = item_insert_order(xa, index[i], order[i]); in multiorder_iteration() 52 for (i = 0; i < NUM_ENTRIES; i++) in multiorder_iteration() 53 if (j <= (index[i] | ((1 << order[i]) - 1))) in multiorder_iteration() 58 int height = order[i] / XA_CHUNK_SHIFT; in multiorder_iteration() 60 unsigned long mask = (1UL << order[i]) - 1; in multiorder_iteration() 62 assert((xas.xa_index | mask) == (index[i] | mask)); in multiorder_iteration() 65 assert((item->index | mask) == (index[i] | mask)); in multiorder_iteration() 66 assert(item->order == order[i]); in multiorder_iteration() [all …]
|
/tools/testing/selftests/powerpc/math/ |
D | vsx_preempt.c | 50 int i; in vsx_memcmp() local 54 for(i = 0; i < 12; i++) { in vsx_memcmp() 55 if (memcmp(&a[i + 12], &zero, sizeof(vector int)) == 0) { in vsx_memcmp() 56 fprintf(stderr, "Detected zero from the VSX reg %d\n", i + 12); in vsx_memcmp() 64 for (i = 0; i < 24; i=i+2) in vsx_memcmp() 66 i/2 + i%2 + 20, p[i], p[i + 1], p[i + 24], p[i + 25]); in vsx_memcmp() 74 int i, j; in preempt_vsx_c() local 77 for (i = 0; i < 12; i++) in preempt_vsx_c() 79 varray[i][j] = rand(); in preempt_vsx_c() 81 if (varray[i][j] == 0) in preempt_vsx_c() [all …]
|
/tools/testing/selftests/powerpc/pmu/ |
D | per_event_excludes.c | 26 int i; in per_event_excludes() local 67 for (i = 1; i < 4; i++) in per_event_excludes() 68 FAIL_IF(event_open_with_group(&events[i], events[0].fd)); in per_event_excludes() 77 for (i = 0; i < INT_MAX; i++) in per_event_excludes() 82 for (i = 0; i < 4; i++) { in per_event_excludes() 83 FAIL_IF(event_read(&events[i])); in per_event_excludes() 84 event_report(&events[i]); in per_event_excludes() 91 for (i = 0; i < 4; i++) in per_event_excludes() 92 FAIL_IF(events[i].result.running != events[i].result.enabled); in per_event_excludes() 99 for (i = 1; i < 4; i++) in per_event_excludes() [all …]
|
/tools/gpio/ |
D | gpio-hammer.c | 33 int i, j; in hammer_device() local 48 for (i = 0; i < num_lines; i++) in hammer_device() 49 gpiotools_set_bit(&values.mask, i); in hammer_device() 56 for (i = 0; i < num_lines; i++) { in hammer_device() 57 fprintf(stdout, "%d", lines[i]); in hammer_device() 58 if (i != (num_lines - 1)) in hammer_device() 62 for (i = 0; i < num_lines; i++) { in hammer_device() 63 fprintf(stdout, "%d", gpiotools_test_bit(values.bits, i)); in hammer_device() 64 if (i != (num_lines - 1)) in hammer_device() 73 for (i = 0; i < num_lines; i++) in hammer_device() [all …]
|
/tools/testing/selftests/core/ |
D | close_range_test.c | 59 int i, ret; in TEST() local 62 for (i = 0; i < ARRAY_SIZE(open_fds); i++) { in TEST() 71 open_fds[i] = fd; in TEST() 81 for (i = 0; i <= 50; i++) in TEST() 82 EXPECT_EQ(-1, fcntl(open_fds[i], F_GETFL)); in TEST() 84 for (i = 51; i <= 100; i++) in TEST() 85 EXPECT_GT(fcntl(open_fds[i], F_GETFL), -1); in TEST() 97 for (i = 51; i <= 92; i++) in TEST() 98 EXPECT_EQ(-1, fcntl(open_fds[i], F_GETFL)); in TEST() 100 for (i = 93; i <= 100; i++) in TEST() [all …]
|
/tools/arch/x86/tools/ |
D | gen-insn-attr-x86.awk | 115 function array_size(arr, i,c) { 117 for (i in arr) 132 for (i = 2; i <= NF; i++) 133 ref = ref $i 163 for (i = 0; i < n; i++) { 239 function convert_operands(count,opnd, i,j,imm,mod) 244 i = opnd[j] 245 if (match(i, imm_expr) == 1) { 246 if (!imm_flag[i]) 249 if (i != "Ib") [all …]
|
/tools/testing/selftests/powerpc/tm/ |
D | tm-tmspr.c | 42 int i; in tfiar_tfhar() local 55 for (i = 0; i < num_loops; i++) { in tfiar_tfhar() 68 unsigned long i; in texasr() local 71 for (i = 0; i < num_loops; i++) { in texasr() 96 unsigned long i; in test_tmspr() local 109 for (i = 0; i < thread_num; i += 2) { in test_tmspr() 110 if (pthread_create(&thread[i], NULL, (void *)tfiar_tfhar, in test_tmspr() 111 (void *)i)) in test_tmspr() 115 for (i = 1; i < thread_num; i += 2) { in test_tmspr() 116 if (pthread_create(&thread[i], NULL, (void *)texasr, (void *)i)) in test_tmspr() [all …]
|
/tools/perf/util/ |
D | values.c | 49 int i; in perf_read_values_destroy() local 54 for (i = 0; i < values->threads; i++) in perf_read_values_destroy() 55 zfree(&values->value[i]); in perf_read_values_destroy() 60 for (i = 0; i < values->counters; i++) in perf_read_values_destroy() 61 zfree(&values->countername[i]); in perf_read_values_destroy() 91 int i; in perf_read_values__findnew_thread() local 93 for (i = 0; i < values->threads; i++) in perf_read_values__findnew_thread() 94 if (values->pid[i] == pid && values->tid[i] == tid) in perf_read_values__findnew_thread() 95 return i; in perf_read_values__findnew_thread() 98 i = perf_read_values__enlarge_threads(values); in perf_read_values__findnew_thread() [all …]
|
D | thread_map.c | 39 int i; in thread_map__new_by_pid() local 48 for (i = 0; i < items; i++) in thread_map__new_by_pid() 49 perf_thread_map__set_pid(threads, i, atoi(namelist[i]->d_name)); in thread_map__new_by_pid() 54 for (i=0; i<items; i++) in thread_map__new_by_pid() 55 zfree(&namelist[i]); in thread_map__new_by_pid() 77 int max_threads = 32, items, i; in __thread_map__new_all_cpus() local 129 for (i = 0; i < items; i++) { in __thread_map__new_all_cpus() 130 perf_thread_map__set_pid(threads, threads->nr + i, in __thread_map__new_all_cpus() 131 atoi(namelist[i]->d_name)); in __thread_map__new_all_cpus() 134 for (i = 0; i < items; i++) in __thread_map__new_all_cpus() [all …]
|
/tools/testing/selftests/rlimits/ |
D | rlimits-per-userns.c | 87 size_t i; in main() local 108 for (i = 0; i < NR_CHILDS; i++) { in main() 109 child[i] = fork_child(); in main() 110 wstatus[i] = 0; in main() 115 for (i = 0; i < NR_CHILDS; i++) { in main() 116 if (child[i] <= 0) in main() 120 pid_t ret = waitpid(child[i], &wstatus[i], WNOHANG); in main() 122 if (!ret || (!WIFEXITED(wstatus[i]) && !WIFSIGNALED(wstatus[i]))) in main() 126 warn("(pid=%d): waitpid(%d)", pid, child[i]); in main() 128 child[i] *= -1; in main() [all …]
|
/tools/testing/selftests/rcutorture/bin/ |
D | kvm-recheck.sh | 25 for i in $dirs 30 resdir=`echo $i | sed -e 's,/$,,' -e 's,/[^/]*$,,'` 33 TORTURE_SUITE="`cat $i/../torture_suite`" 34 configfile=`echo $i | sed -e 's,^.*/,,'` 35 rm -f $i/console.log.*.diags 36 kvm-recheck-${TORTURE_SUITE}.sh $i 37 …if test -f "$i/qemu-retval" && test "`cat $i/qemu-retval`" -ne 0 && test "`cat $i/qemu-retval`" -n… 40 cat $i/qemu-output 41 elif test -f "$i/console.log" 43 if test -f "$i/qemu-retval" && test "`cat $i/qemu-retval`" -eq 137 [all …]
|
/tools/testing/selftests/net/ |
D | reuseport_dualstack.c | 36 int opt, i; in build_rcv_fd() local 55 for (i = 0; i < count; ++i) { in build_rcv_fd() 56 rcv_fds[i] = socket(family, proto, 0); in build_rcv_fd() 57 if (rcv_fds[i] < 0) in build_rcv_fd() 61 if (setsockopt(rcv_fds[i], SOL_SOCKET, SO_REUSEPORT, &opt, in build_rcv_fd() 65 if (bind(rcv_fds[i], (struct sockaddr *)&addr, sizeof(addr))) in build_rcv_fd() 68 if (proto == SOCK_STREAM && listen(rcv_fds[i], 10)) in build_rcv_fd() 105 int i, fd; in receive_once() local 108 i = epoll_wait(epfd, &ev, 1, -1); in receive_once() 109 if (i < 0) in receive_once() [all …]
|
/tools/testing/selftests/drivers/net/mlxsw/spectrum/ |
D | devlink_resources.sh | 27 local i 31 for i in $KVD_PROFILES; do 33 devlink_sp_resource_kvd_profile_set $i 34 log_test "'$i' profile" 46 local i 51 for i in $KVD_CHILDREN; do 53 size=$(devlink_resource_get kvd "$i" | jq '.["size_min"]') 54 devlink_resource_size_set "$size" kvd "$i" 57 if [[ "$i" == "linear" ]]; then 65 log_test "'$i' minimize [$size]" [all …]
|
/tools/testing/selftests/vm/ |
D | virtual_address_range.c | 102 unsigned long i, lchunks, hchunks; in main() local 104 for (i = 0; i < NR_CHUNKS_LOW; i++) { in main() 105 ptr[i] = mmap(NULL, MAP_CHUNK_SIZE, PROT_READ | PROT_WRITE, in main() 108 if (ptr[i] == MAP_FAILED) { in main() 114 if (validate_addr(ptr[i], 0)) in main() 117 lchunks = i; in main() 119 for (i = 0; i < NR_CHUNKS_HIGH; i++) { in main() 121 hptr[i] = mmap(hint, MAP_CHUNK_SIZE, PROT_READ | PROT_WRITE, in main() 124 if (hptr[i] == MAP_FAILED) in main() 127 if (validate_addr(hptr[i], 1)) in main() [all …]
|
D | hmm-tests.c | 229 unsigned long i; in TEST_F() local 256 i = 2 * self->page_size / sizeof(*ptr); in TEST_F() 257 for (ptr = buffer->ptr; i < size / sizeof(*ptr); ++i) in TEST_F() 258 ptr[i] = i; in TEST_F() 276 for (i = 0; i < 2 * self->page_size / sizeof(*ptr); ++i) in TEST_F() 277 ASSERT_EQ(ptr[i], 0); in TEST_F() 278 for (; i < size / sizeof(*ptr); ++i) in TEST_F() 279 ASSERT_EQ(ptr[i], i); in TEST_F() 293 unsigned long i; in TEST_F() local 316 for (i = 0, ptr = buffer->ptr; i < size / sizeof(*ptr); ++i) in TEST_F() [all …]
|
/tools/testing/selftests/kvm/lib/ |
D | guest_modes.c | 45 int i; in for_each_guest_mode() local 47 for (i = 0; i < NUM_VM_MODES; ++i) { in for_each_guest_mode() 48 if (!guest_modes[i].enabled) in for_each_guest_mode() 50 TEST_ASSERT(guest_modes[i].supported, in for_each_guest_mode() 52 i, vm_guest_mode_string(i)); in for_each_guest_mode() 53 func(i, arg); in for_each_guest_mode() 59 int i; in guest_modes_help() local 65 for (i = 0; i < NUM_VM_MODES; ++i) { in guest_modes_help() 66 printf(" %d: %s%s\n", i, vm_guest_mode_string(i), in guest_modes_help() 67 guest_modes[i].supported ? " (supported)" : ""); in guest_modes_help() [all …]
|
/tools/testing/selftests/sync/ |
D | sync_stress_merge.c | 38 int i, size, ret; in test_merge_stress_random_merge() local 48 for (i = 0; i < timeline_count; i++) in test_merge_stress_random_merge() 49 timelines[i] = sw_sync_timeline_create(); in test_merge_stress_random_merge() 62 for (i = 0; i < merge_count; i++) { in test_merge_stress_random_merge() 86 for (i = 0; i < timeline_count; i++) in test_merge_stress_random_merge() 87 if (fence_map[i] != -1) in test_merge_stress_random_merge() 95 for (i = 0; i < timeline_count; i++) { in test_merge_stress_random_merge() 96 if (fence_map[i] != -1) { in test_merge_stress_random_merge() 101 sw_sync_timeline_inc(timelines[i], fence_map[i]); in test_merge_stress_random_merge() 111 for (i = 0; i < timeline_count; i++) in test_merge_stress_random_merge() [all …]
|
/tools/testing/selftests/firmware/ |
D | fw_filesystem.sh | 217 for i in $(seq 0 3); do 218 config_set_read_fw_idx $i 224 echo "request #$i: firmware was not loaded" >&2 246 for i in $(seq 0 3); do 247 config_set_read_fw_idx $i 253 echo "request #$i: partial firmware was not loaded" >&2 261 for i in $(seq 0 3); do 262 config_set_read_fw_idx $i 265 echo "request $i: file was not expected to match" >&2 445 for i in $(seq 1 5); do [all …]
|