Cleanup: doc/examples makefile
[urcu.git] / tests / runhash.sh
1 #!/bin/sh
2
3 # TODO: missing tests:
4 # - send kill signals during tests to change the behavior between
5 # add/remove/random
6 # - validate that "nr_leaked" is always 0 in SUMMARY for all tests
7
8 # 30 seconds per test
9 TIME_UNITS=30
10
11 TESTPROG=./test_urcu_hash
12
13 #thread multiplier
14 THREAD_MUL=1
15
16 EXTRA_PARAMS=-v
17
18 # ** test update coherency with single-value table
19
20 # rw test, single key, replace and del randomly, 4 threads, auto resize.
21 # key range: init, lookup, and update: 0 to 0
22 ${TESTPROG} 0 $((4*${THREAD_MUL})) ${TIME_UNITS} -A -s -M 1 -N 1 -O 1 ${EXTRA_PARAMS} || exit 1
23
24 # rw test, single key, add unique and del randomly, 4 threads, auto resize.
25 # key range: init, lookup, and update: 0 to 0
26 ${TESTPROG} 0 $((4*${THREAD_MUL})) ${TIME_UNITS} -A -u -M 1 -N 1 -O 1 ${EXTRA_PARAMS} || exit 1
27
28 # rw test, single key, replace and del randomly, 2 lookup threads, 2 update threads, auto resize.
29 # key range: init, lookup, and update: 0 to 0
30 ${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -s -M 1 -N 1 -O 1 ${EXTRA_PARAMS} || exit 1
31
32 # rw test, single key, add and del randomly, 2 lookup threads, 2 update threads, auto resize.
33 # key range: init, lookup, and update: 0 to 0
34 ${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -M 1 -N 1 -O 1 ${EXTRA_PARAMS} || exit 1
35
36
37 # ** test updates vs lookups with default table
38
39 # rw test, 2 lookup, 2 update threads, add and del randomly, auto resize.
40 # max 1048576 buckets
41 # key range: init, lookup, and update: 0 to 999999
42 ${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A ${EXTRA_PARAMS} || exit 1
43
44 # rw test, 2 lookup, 2 update threads, add_replace and del randomly, auto resize.
45 # max 1048576 buckets
46 # key range: init, lookup, and update: 0 to 999999
47 ${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -s ${EXTRA_PARAMS} || exit 1
48
49 # rw test, 2 lookup, 2 update threads, add_unique and del randomly, auto resize.
50 # max 1048576 buckets
51 # key range: init, lookup, and update: 0 to 999999
52 ${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -u ${EXTRA_PARAMS} || exit 1
53
54
55 # test memory management backends
56
57 # rw test, 2 lookup, 2 update threads, add only, auto resize.
58 # max buckets: 1048576
59 # key range: init, lookup, and update: 0 to 99999999
60 # mm backend: "order"
61 ${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -m 1 -n 1048576 -i \
62 -M 100000000 -N 100000000 -O 100000000 -B order ${EXTRA_PARAMS} || exit 1
63
64 # rw test, 2 lookup, 2 update threads, add only, auto resize.
65 # max buckets: 1048576
66 # key range: init, lookup, and update: 0 to 99999999
67 # mm backend: "chunk"
68 ${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -m 1 -n 1048576 -i \
69 -M 100000000 -N 100000000 -O 100000000 -B chunk ${EXTRA_PARAMS} || exit 1
70
71 # rw test, 2 lookup, 2 update threads, add only, auto resize.
72 # max buckets: 1048576
73 # key range: init, lookup, and update: 0 to 99999999
74 # mm backend: "mmap"
75 ${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A -m 1 -n 1048576 -i \
76 -M 100000000 -N 100000000 -O 100000000 -B mmap ${EXTRA_PARAMS} || exit 1
77
78
79 # ** key range tests
80
81 # rw test, 2 lookup, 2 update threads, add and del randomly, auto resize.
82 # max 1048576 buckets
83 # key range: init, and update: 0 to 999999
84 # key range: lookup: 1000000 to 1999999
85 # NOTE: reader threads in this test should never have a successful
86 # lookup. TODO
87 ${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
88 -R 1000000 ${EXTRA_PARAMS} || exit 1
89
90 # ** small key range
91
92 # rw test, 2 lookup, 2 update threads, add and del randomly, auto resize.
93 # max 1048576 buckets
94 # key range: init, update, and lookups: 0 to 9
95 ${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
96 -M 10 -N 10 -O 10 ${EXTRA_PARAMS} || exit 1
97
98 # rw test, 2 lookup, 2 update threads, add_unique and del randomly, auto resize.
99 # max 1048576 buckets
100 # key range: init, update, and lookups: 0 to 9
101 ${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
102 -M 10 -N 10 -O 10 -u ${EXTRA_PARAMS} || exit 1
103
104 # rw test, 2 lookup, 2 update threads, add_replace and del randomly, auto resize.
105 # max 1048576 buckets
106 # key range: init, update, and lookups: 0 to 9
107 ${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
108 -M 10 -N 10 -O 10 -s ${EXTRA_PARAMS} || exit 1
109
110 # ** lookup for known keys
111
112 # rw test, 2 lookup, 2 update threads, add_replace and del randomly, auto resize.
113 # max 1048576 buckets
114 # lookup range is entirely populated.
115 # key range: init, and lookups: 0 to 9
116 # key range: updates: 10 to 19
117 # NOTE: reader threads in this test should always have successful
118 # lookups. TODO
119 ${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
120 -M 10 -N 10 -O 10 -R 0 -T 0 -S 10 -k 10 -s ${EXTRA_PARAMS} || exit 1
121
122 # ** Uniqueness test
123
124 # rw test, 2 lookup, 2 update threads, add_unique, add_replace and del randomly, auto resize.
125 # max 1048576 buckets
126 # asserts that no duplicates are observed by reader threads
127 # standard length hash chains
128 ${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
129 -U ${EXTRA_PARAMS} || exit 1
130
131 # rw test, 2 lookup, 2 update threads, add_unique, add_replace and del randomly, auto resize.
132 # max 1048576 buckets
133 # asserts that no duplicates are observed by reader threads
134 # create long hash chains: using modulo 4 on keys as hash
135 ${TESTPROG} $((2*${THREAD_MUL})) $((2*${THREAD_MUL})) ${TIME_UNITS} -A \
136 -U -C 4 ${EXTRA_PARAMS} || exit 1
This page took 0.031773 seconds and 4 git commands to generate.