Home
last modified time | relevance | path

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

123

/f-stack/freebsd/contrib/libsodium/test/default/
H A Donetimeauth7.c23 c[rand() % clen] += 1 + (rand() % 255); in main()
28 a[rand() % sizeof a] += 1 + (rand() % 255); in main()
H A Dauth5.c23 c[rand() % clen] += 1 + (rand() % 255); in main()
28 a[rand() % sizeof a] += 1 + (rand() % 255); in main()
H A Dauth7.c23 c[(size_t) rand() % clen] += 1 + (rand() % 255); in main()
28 a[rand() % sizeof a] += 1 + (rand() % 255); in main()
H A Dsecretbox8.c26 c[rand() % (mlen + crypto_secretbox_ZEROBYTES)] = rand(); in main()
H A Dbox8.c39 c[rand() % (mlen + crypto_box_ZEROBYTES)] = rand(); in main()
H A Dcmptest.h32 # undef rand
33 # define rand(X) arc4random(X) macro
/f-stack/app/redis-5.0.5/tests/support/
H A Dutil.tcl2 set len [expr {$min+int(rand()*($max-$min+1))}]
104 expr {int(rand()*$max)}
110 if {rand() > 0.5} {
117 set path [expr {int(rand()*[llength $args])}]
177 if {rand() < 0.1} {
183 set d [expr {rand()}]
185 set d [expr {rand()}]
187 set d [expr {rand()}]
189 set d [expr {rand()}]
191 set d [expr {rand()}]
[all …]
/f-stack/app/redis-5.0.5/utils/lru/
H A Dlfu-simulation.c38 double r = (double)rand()/RAND_MAX; in log_incr()
104 scan_entry(entries+(rand()%keyspace_size)); in main()
112 while((rand() % 21) != 0 && idx < keyspace_size) idx *= 2; in main()
114 idx = rand() % idx; in main()
117 idx = rand() % keyspace_size; in main()
133 idx = 10+(rand()%10); in main()
/f-stack/app/redis-5.0.5/utils/
H A Dcorrupt_rdb.c35 unsigned long offset = rand()%stat.st_size; in main()
36 int writelen = 1+rand()%31; in main()
39 for (j = 0; j < writelen; j++) buf[j] = (char)rand(); in main()
/f-stack/app/redis-5.0.5/src/
H A Dlolwut5.c193 float r1 = (float)rand() / RAND_MAX / squares_per_col * y; in lwDrawSchotter()
194 float r2 = (float)rand() / RAND_MAX / squares_per_col * y; in lwDrawSchotter()
195 float r3 = (float)rand() / RAND_MAX / squares_per_col * y; in lwDrawSchotter()
196 if (rand() % 2) r1 = -r1; in lwDrawSchotter()
197 if (rand() % 2) r2 = -r2; in lwDrawSchotter()
198 if (rand() % 2) r3 = -r3; in lwDrawSchotter()
H A Dintset.c261 return _intsetGet(is,rand()%intrev32ifbe(is->length)); in intsetRandom()
325 value = (rand()*rand()) & mask; in createSet()
327 value = rand() & mask; in createSet()
390 is = intsetAdd(is,rand()%0x800,&success); in intsetTest()
469 for (i = 0; i < num; i++) intsetSearch(is,rand() % ((1<<bits)-1),NULL); in intsetTest()
478 v1 = rand() % 0xfff; in intsetTest()
482 v2 = rand() % 0xfff; in intsetTest()
/f-stack/app/redis-5.0.5/tests/helpers/
H A Dgen_write_load.tcl8 $r set [expr rand()] [expr rand()]
/f-stack/dpdk/app/test/
H A Dtest_hash_readwrite.c91 uint32_t rand = rte_rand() % (i + 1 - offset); in test_hash_readwrite_worker() local
94 tbl_rw_test_param.keys + rand) != ret[rand]) in test_hash_readwrite_worker()
99 tbl_rw_test_param.keys + rand) != ret[rand]) in test_hash_readwrite_worker()
102 ret[rand] = rte_hash_add_key(tbl_rw_test_param.h, in test_hash_readwrite_worker()
103 tbl_rw_test_param.keys + rand); in test_hash_readwrite_worker()
104 if (ret[rand] < 0) in test_hash_readwrite_worker()
108 tbl_rw_test_param.keys + rand) != ret[rand]) in test_hash_readwrite_worker()
H A Dtest_hash_functions.c193 key[i] = rand() & 0xff; in verify_jhash_32bits()
230 key[i] = rand(); in verify_jhash_words()
/f-stack/app/redis-5.0.5/tests/unit/type/
H A Dlist-2.tcl28 set min [expr {int(rand()*$startlen)}]
29 set max [expr {$min+int(rand()*$startlen)}]
H A Dzset.tcl807 set score [expr rand()]
822 set score [expr rand()]
843 set score [expr rand()]
850 if {[expr rand()] < .2} {
851 set j [expr int(rand()*1000)]
853 set score [expr rand()]
886 r zadd zset [expr rand()] $i
891 set min [expr rand()]
892 set max [expr rand()]
1092 if {[expr rand()] < .2} {
[all …]
/f-stack/dpdk/lib/librte_net/
H A Drte_ether.c16 uint64_t rand = rte_rand(); in rte_eth_random_addr()
17 uint8_t *p = (uint8_t *)&rand; in rte_eth_random_addr()
/f-stack/freebsd/contrib/openzfs/tests/zfs-tests/include/
H A Dmath.shlib137 typeset -i rand=0
139 while [[ $rand -lt $min ]] ; do
140 rand=$(( $RANDOM % $max + 1))
143 echo $rand
/f-stack/app/redis-5.0.5/tests/integration/
H A Dpsync2-reg.tcl43 if {rand() < .05} {
48 if {rand() < .05} {
/f-stack/freebsd/contrib/openzfs/tests/zfs-tests/tests/functional/channel_program/lua_core/
H A Dtst.lib_table.lua47 function rand() function
168 a[i] = rand()
179 a[i] = rand()
200 for i=1,10 do a[i] = {val=rand(100)}; setmetatable(a[i], tt); end
/f-stack/freebsd/contrib/openzfs/tests/zfs-tests/cmd/xattrtest/
H A Dxattrtest.c422 int rand; in get_random_bytes() local
425 rand = open("/dev/urandom", O_RDONLY); in get_random_bytes()
427 if (rand < 0) in get_random_bytes()
428 return (rand); in get_random_bytes()
431 ssize_t rc = read(rand, buf + bytes_read, bytes - bytes_read); in get_random_bytes()
437 (void) close(rand); in get_random_bytes()
/f-stack/app/redis-5.0.5/tests/unit/
H A Dhyperloglog.tcl48 for {set j 0} {$j < 100} {incr j} {lappend elements [expr rand()]}
68 lappend elements [expr rand()]
124 lappend items [expr {rand()}]
135 if {rand() < 0.5} break
/f-stack/freebsd/netinet/cc/
H A Dcc_chd.c159 unsigned long p, rand; in should_backoff() local
161 rand = random(); in should_backoff()
173 if (V_chd_loss_fair && rand < p) in should_backoff()
181 return (rand < p); in should_backoff()
/f-stack/freebsd/contrib/openzfs/tests/zfs-tests/cmd/file_write/
H A Dfile_write.c51 char rnd = rand() & 0xff; in randomize_buffer()
165 nxtfillchar = rand() & 0xff; in main()
/f-stack/freebsd/contrib/libsodium/test/quirks/
H A Dquirks.h49 return (long) rand(); in random()

123