Home
last modified time | relevance | path

Searched refs:rand (Results 1 – 25 of 72) sorted by relevance

123

/Linux-v4.19/tools/testing/radix-tree/
Dmain.c58 __gang_check(start, rand() % 113 + 1, rand() % 71, in __big_gang_check()
59 rand() % 157, rand() % 91 + 1); in __big_gang_check()
61 start += rand() % 1000000; in __big_gang_check()
164 start = rand(); in copy_tag_check()
165 end = rand(); in copy_tag_check()
166 if (start > end && (rand() % 10)) { in copy_tag_check()
173 cur = rand(); in copy_tag_check()
203 idx[i] = rand(); in copy_tag_check()
207 if (rand() & 1) { in copy_tag_check()
225 tmp = rand() % (count / 10 + 2); in copy_tag_check()
[all …]
Dtag_check.c180 index = rand() % THRASH_SIZE; in do_thrash()
192 index = rand() % THRASH_SIZE; in do_thrash()
210 index = rand() % THRASH_SIZE; in do_thrash()
225 index = rand() % THRASH_SIZE; in do_thrash()
/Linux-v4.19/arch/x86/kernel/
Despfix_64.c105 unsigned long rand; in init_espfix_random() local
111 if (!arch_get_random_long(&rand)) { in init_espfix_random()
113 rand = rdtsc(); in init_espfix_random()
114 rand *= 0xc345c6b72fd16123UL; in init_espfix_random()
117 slot_random = rand % ESPFIX_STACKS_PER_PAGE; in init_espfix_random()
118 page_random = (rand / ESPFIX_STACKS_PER_PAGE) in init_espfix_random()
/Linux-v4.19/tools/testing/selftests/vm/
Dmlock-random-test.c161 int is_mlock = !!(rand() % 2); in test_mlock_within_limit()
162 int lock_size = rand() % alloc_size; in test_mlock_within_limit()
163 int start_offset = rand() % (alloc_size - lock_size); in test_mlock_within_limit()
232 int is_mlock = !!(rand() % 2); in test_mlock_outof_limit()
233 int lock_size = (rand() % (alloc_size - cur.rlim_cur)) in test_mlock_outof_limit()
235 int start_offset = rand() % (alloc_size - lock_size); in test_mlock_outof_limit()
/Linux-v4.19/arch/x86/mm/
Dkaslr.c77 unsigned long rand, memory_tb; in kernel_randomize_memory() local
126 prandom_bytes_state(&rand_state, &rand, sizeof(rand)); in kernel_randomize_memory()
128 entropy = (rand % (entropy + 1)) & P4D_MASK; in kernel_randomize_memory()
130 entropy = (rand % (entropy + 1)) & PUD_MASK; in kernel_randomize_memory()
/Linux-v4.19/tools/testing/selftests/bpf/
Dbpf_rand.h11 return (((uint64_t)(uint32_t)rand()) | in bpf_rand_mask()
12 ((uint64_t)(uint32_t)rand() << 32)) & mask; in bpf_rand_mask()
37 switch (rand() % 39) { in bpf_semi_rand_get()
Dtest_lpm_map.c183 rand() % 0xff, in test_lpm_order()
184 rand() % 0xff, in test_lpm_order()
185 }, rand() % 16 + 1); in test_lpm_order()
191 uint8_t key[] = { rand() % 0xff, rand() % 0xff }; in test_lpm_order()
245 value[j] = rand() & 0xff; in test_lpm_map()
246 value[keysize] = rand() % (8 * keysize + 1); in test_lpm_map()
258 data[j] = rand() & 0xff; in test_lpm_map()
295 data[j] = rand() & 0xff; in test_lpm_map()
/Linux-v4.19/tools/testing/selftests/powerpc/ptrace/
Dptrace-tm-spd-vsx.c140 fp_load[i] = 1 + rand(); in ptrace_tm_spd_vsx()
141 fp_load_new[i] = 1 + 2 * rand(); in ptrace_tm_spd_vsx()
142 fp_load_ckpt[i] = 1 + 3 * rand(); in ptrace_tm_spd_vsx()
143 fp_load_ckpt_new[i] = 1 + 4 * rand(); in ptrace_tm_spd_vsx()
Dptrace-tm-vsx.c124 fp_load[i] = 1 + rand(); in ptrace_tm_vsx()
125 fp_load_ckpt[i] = 1 + 2 * rand(); in ptrace_tm_vsx()
126 fp_load_ckpt_new[i] = 1 + 3 * rand(); in ptrace_tm_vsx()
Dptrace-vsx.c71 fp_load[i] = i + rand(); in ptrace_vsx()
74 fp_load_new[i] = i + 2 * rand(); in ptrace_vsx()
/Linux-v4.19/net/rds/
Dthreads.c125 unsigned long rand; in rds_queue_reconnect() local
147 get_random_bytes(&rand, sizeof(rand)); in rds_queue_reconnect()
149 rand % cp->cp_reconnect_jiffies, cp->cp_reconnect_jiffies, in rds_queue_reconnect()
154 rand % cp->cp_reconnect_jiffies); in rds_queue_reconnect()
/Linux-v4.19/tools/testing/selftests/powerpc/dscr/
Ddscr_explicit_test.c32 double ret = uniform_deviate(rand()); in dscr_explicit()
49 ret = uniform_deviate(rand()); in dscr_explicit()
/Linux-v4.19/samples/bpf/
Dmap_perf_test_user.c378 key->prefixlen = rand() % 33; in fill_lpm_trie()
379 key->data[0] = rand() & 0xff; in fill_lpm_trie()
380 key->data[1] = rand() & 0xff; in fill_lpm_trie()
381 key->data[2] = rand() & 0xff; in fill_lpm_trie()
382 key->data[3] = rand() & 0xff; in fill_lpm_trie()
/Linux-v4.19/tools/testing/selftests/sync/
Dsync_stress_merge.c64 timeline_offset = rand() % timeline_count; in test_merge_stress_random_merge()
66 sync_point = rand(); in test_merge_stress_random_merge()
/Linux-v4.19/kernel/rcu/
Drcutorture.c617 static DEFINE_TORTURE_RANDOM(rand); in srcu_torture_cleanup()
619 if (torture_random(&rand) & 0x800) in srcu_torture_cleanup()
1018 static DEFINE_TORTURE_RANDOM(rand); in rcu_torture_writer()
1075 udelay(torture_random(&rand) & 0x3ff); in rcu_torture_writer()
1088 switch (synctype[torture_random(&rand) % nsynctypes]) { in rcu_torture_writer()
1101 i = torture_random(&rand) % 16; in rcu_torture_writer()
1104 udelay(torture_random(&rand) % 1000); in rcu_torture_writer()
1122 !(torture_random(&rand) & 0xff & (!!expediting - 1))) { in rcu_torture_writer()
1159 DEFINE_TORTURE_RANDOM(rand); in rcu_torture_fakewriter()
1165 schedule_timeout_uninterruptible(1 + torture_random(&rand)%10); in rcu_torture_fakewriter()
[all …]
/Linux-v4.19/net/rose/
Drose_subr.c259 facilities->rand = ((p[1] << 8) & 0xFF00) + ((p[2] << 0) & 0x00FF); in rose_parse_national()
443 if (rose->rand != 0 || rose->source_ndigis == 1 || rose->dest_ndigis == 1) { in rose_create_facilities()
447 if (rose->rand != 0) { in rose_create_facilities()
449 *p++ = (rose->rand >> 8) & 0xFF; in rose_create_facilities()
450 *p++ = (rose->rand >> 0) & 0xFF; in rose_create_facilities()
/Linux-v4.19/tools/testing/selftests/timers/
Dfreq-step.c171 usleep(rand() % 2000000 * STEP_INTERVAL / 10); in run_test()
176 usleep(rand() % 2000000 * MEAN_SAMPLE_INTERVAL); in run_test()
259 freq_base = (rand() % (1 << 24) - (1 << 23)) / 65536e6; in main()
/Linux-v4.19/kernel/locking/
Dlocktorture.c635 static DEFINE_TORTURE_RANDOM(rand); in lock_torture_writer()
641 if ((torture_random(&rand) & 0xfffff) == 0) in lock_torture_writer()
644 cxt.cur_ops->task_boost(&rand); in lock_torture_writer()
653 cxt.cur_ops->write_delay(&rand); in lock_torture_writer()
672 static DEFINE_TORTURE_RANDOM(rand); in lock_torture_reader()
678 if ((torture_random(&rand) & 0xfffff) == 0) in lock_torture_reader()
687 cxt.cur_ops->read_delay(&rand); in lock_torture_reader()
/Linux-v4.19/net/bluetooth/
Dsmp.h85 __le64 rand; member
194 int smp_generate_oob(struct hci_dev *hdev, u8 hash[16], u8 rand[16]);
/Linux-v4.19/include/net/
Drose.h123 unsigned int rand; member
135 unsigned int lci, rand; member
/Linux-v4.19/lib/
Dtest_printf.c91 int rand; in __test() local
110 rand = 1 + prandom_u32_max(elen+1); in __test()
112 failed_tests += do_test(rand, expect, elen, fmt, ap); in __test()
/Linux-v4.19/net/ipv4/
Dtcp_nv.c323 unsigned char rand; in tcpnv_acked() local
327 get_random_bytes(&rand, 1); in tcpnv_acked()
329 now + ((nv_reset_period * (384 + rand) * HZ) >> 9); in tcpnv_acked()
/Linux-v4.19/tools/testing/selftests/media_tests/
Dmedia_device_test.c76 count = rand(); in main()
Dvideo_device_test.c70 count = rand(); in main()
/Linux-v4.19/tools/testing/selftests/powerpc/math/
Dfpu_preempt.c51 darray[i] = rand(); in preempt_fpu_c()

123