7 plan_tests
${NUM_TESTS}
9 diag
"Executing Hash table test"
11 # TODO: missing tests:
12 # - send kill signals during tests to change the behavior between
14 # - validate that "nr_leaked" is always 0 in SUMMARY for all tests
16 # 1st parameter: seconds per test
19 TESTPROG
=.
/test_urcu_hash
22 for i
in nproc gnproc
; do
23 NUM_CPUS
=$
($i 2>/dev
/null
)
24 if [ "$?" -eq "0" ]; then
31 #thread multiplier: number of processors divided by 4.
32 if [[ ${NUM_CPUS} -lt 4 ]]; then
33 NUM_CPUS
=4 # Floor at 4 due to following assumptions.
36 THREAD_MUL
=$
(( ${NUM_CPUS} / 4 ))
40 # ** test update coherency with single-value table
42 # rw test, single key, replace and del randomly, 4 threads, auto resize.
43 # key range: init, lookup, and update: 0 to 0
44 okx
${TESTPROG} 0 $((4*${THREAD_MUL})) ${TIME_UNITS} -A -s -M 1 -N 1 -O 1 ${EXTRA_PARAMS}
46 # rw test, single key, add unique and del randomly, 4 threads, auto resize.
47 # key range: init, lookup, and update: 0 to 0
48 okx
${TESTPROG} 0 $((4*${THREAD_MUL})) ${TIME_UNITS} -A -u -M 1 -N 1 -O 1 ${EXTRA_PARAMS}
50 # rw test, single key, replace and del randomly, 2 lookup threads, 2 update threads, auto resize.
51 # key range: init, lookup, and update: 0 to 0
52 okx
${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -s -M 1 -N 1 -O 1 ${EXTRA_PARAMS}
54 # rw test, single key, add and del randomly, 2 lookup threads, 2 update threads, auto resize.
55 # key range: init, lookup, and update: 0 to 0
56 okx
${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -M 1 -N 1 -O 1 ${EXTRA_PARAMS}
59 # ** test updates vs lookups with default table
61 # rw test, 2 lookup, 2 update threads, add and del randomly, auto resize.
63 # key range: init, lookup, and update: 0 to 999999
64 okx
${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A ${EXTRA_PARAMS}
66 # rw test, 2 lookup, 2 update threads, add_replace and del randomly, auto resize.
68 # key range: init, lookup, and update: 0 to 999999
69 okx
${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -s ${EXTRA_PARAMS}
71 # rw test, 2 lookup, 2 update threads, add_unique and del randomly, auto resize.
73 # key range: init, lookup, and update: 0 to 999999
74 okx
${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -u ${EXTRA_PARAMS}
77 # test memory management backends
79 # rw test, 2 lookup, 2 update threads, add only, auto resize.
80 # max buckets: 1048576
81 # key range: init, lookup, and update: 0 to 99999999
83 okx
${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -m 1 -n 1048576 -i \
84 -M 100000000 -N 100000000 -O 100000000 -B order
${EXTRA_PARAMS}
86 # rw test, 2 lookup, 2 update threads, add only, auto resize.
87 # max buckets: 1048576
88 # key range: init, lookup, and update: 0 to 99999999
90 okx
${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -m 1 -n 1048576 -i \
91 -M 100000000 -N 100000000 -O 100000000 -B chunk
${EXTRA_PARAMS}
93 # rw test, 2 lookup, 2 update threads, add only, auto resize.
94 # max buckets: 1048576
95 # key range: init, lookup, and update: 0 to 99999999
97 okx
${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -m 1 -n 1048576 -i \
98 -M 100000000 -N 100000000 -O 100000000 -B mmap
${EXTRA_PARAMS}
103 # rw test, 2 lookup, 2 update threads, add and del randomly, auto resize.
104 # max 1048576 buckets
105 # key range: init, and update: 0 to 999999
106 # key range: lookup: 1000000 to 1999999
107 # NOTE: reader threads in this test should never have a successful
109 okx
${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
110 -R 1000000 ${EXTRA_PARAMS}
114 # rw test, 2 lookup, 2 update threads, add and del randomly, auto resize.
115 # max 1048576 buckets
116 # key range: init, update, and lookups: 0 to 9
117 okx
${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
118 -M 10 -N 10 -O 10 ${EXTRA_PARAMS}
120 # rw test, 2 lookup, 2 update threads, add_unique and del randomly, auto resize.
121 # max 1048576 buckets
122 # key range: init, update, and lookups: 0 to 9
123 okx
${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
124 -M 10 -N 10 -O 10 -u ${EXTRA_PARAMS}
126 # rw test, 2 lookup, 2 update threads, add_replace and del randomly, auto resize.
127 # max 1048576 buckets
128 # key range: init, update, and lookups: 0 to 9
129 okx
${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
130 -M 10 -N 10 -O 10 -s ${EXTRA_PARAMS}
132 # ** lookup for known keys
134 # rw test, 2 lookup, 2 update threads, add_replace and del randomly, auto resize.
135 # max 1048576 buckets
136 # lookup range is entirely populated.
137 # key range: init, and lookups: 0 to 9
138 # key range: updates: 10 to 19
139 # NOTE: reader threads in this test should always have successful
141 okx
${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
142 -M 10 -N 10 -O 10 -R 0 -T 0 -S 10 -k 10 -s ${EXTRA_PARAMS}
146 # rw test, 2 lookup, 2 update threads, add_unique, add_replace and del randomly, auto resize.
147 # max 1048576 buckets
148 # asserts that no duplicates are observed by reader threads
149 # standard length hash chains
150 okx
${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
153 # rw test, 2 lookup, 2 update threads, add_unique, add_replace and del randomly, auto resize.
154 # max 1048576 buckets
155 # asserts that no duplicates are observed by reader threads
156 # create long hash chains: using modulo 4 on keys as hash
157 okx
${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
158 -U -C 4 ${EXTRA_PARAMS}
This page took 0.032698 seconds and 4 git commands to generate.